1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0027621: Highlighting with color remains visible when shape is erased.

This commit is contained in:
isk 2016-07-04 12:20:47 +03:00 committed by bugmaster
parent dcc1741921
commit 4f51d9d704
3 changed files with 60 additions and 0 deletions

View File

@ -2410,6 +2410,18 @@ void AIS_InteractiveContext::EraseGlobal (const Handle(AIS_InteractiveObject)& t
myMainPM->SetVisibility (theIObj, aDispModeIter.Value(), Standard_False);
}
if (aStatus->IsHilighted()
&& theIObj->HasHilightMode())
{
myMainPM->Unhighlight (theIObj, aDispMode);
}
if (!myLastPicked.IsNull()
&& myLastPicked->Selectable() == theIObj)
{
myMainPM->ClearImmediateDraw();
}
if (IsSelected (theIObj)
&& !aStatus->IsDModeIn (aDispMode))
{
@ -2478,6 +2490,12 @@ void AIS_InteractiveContext::ClearGlobal (const Handle(AIS_InteractiveObject)& t
myMainPM->Clear (theIObj, aDispModeIter.Value());
}
if (aStatus->IsHilighted()
&& theIObj->HasHilightMode())
{
myMainPM->Unhighlight (theIObj, theIObj->HilightMode());
}
// Object removes from Detected sequence
for(Standard_Integer aDetIter = 1; aDetIter < myAISDetectedSeq.Length(); ++aDetIter)
{

21
tests/bugs/vis/bug27621_1 Normal file
View File

@ -0,0 +1,21 @@
puts "========"
puts "CR27621_1"
puts "========"
puts ""
###################################################################
puts "Highlighting with color remains visible when shape is erased"
###################################################################
vclear
vinit View1
box b 1 2 3
vdisplay b -dispmode 1
vfit
vmoveto 250 250
vdump $imagedir/${casename}_highlighted.png
verase b
vdump $imagedir/${casename}_erased.png

21
tests/bugs/vis/bug27621_2 Normal file
View File

@ -0,0 +1,21 @@
puts "========"
puts "CR27621_2"
puts "========"
puts ""
###################################################################
puts "Highlighting with color remains visible when shape is erased"
###################################################################
vclear
vinit View1
box b 1 2 3
vdisplay b -dispmode 1
vfit
vmoveto 250 250
vdump $imagedir/${casename}_highlighted.png
vclear
vdump $imagedir/${casename}_erased.png