mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0026870: Visualization - deactivated selections are not updated after object's re-computation
- update status in SelectMgr_SelectionManager::RecomputeSelection: 1) is set to full for all selections; 2) is switched to none only if selection was actually recomputed; - test case for issue #26870
This commit is contained in:
parent
75c262a97a
commit
eece3af2e2
@ -689,6 +689,7 @@ void SelectMgr_SelectionManager::RecomputeSelection (const Handle(SelectMgr_Sele
|
|||||||
for(theObject->Init(); theObject->More(); theObject->Next())
|
for(theObject->Init(); theObject->More(); theObject->Next())
|
||||||
{
|
{
|
||||||
const Handle(SelectMgr_Selection)& aSelection = theObject->CurrentSelection();
|
const Handle(SelectMgr_Selection)& aSelection = theObject->CurrentSelection();
|
||||||
|
aSelection->UpdateStatus (SelectMgr_TOU_Full);
|
||||||
Standard_Integer aSelMode = aSelection->Mode();
|
Standard_Integer aSelMode = aSelection->Mode();
|
||||||
|
|
||||||
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
|
for (TColStd_MapIteratorOfMapOfTransient aSelectorIter (mySelectors); aSelectorIter.More(); aSelectorIter.Next())
|
||||||
@ -699,12 +700,12 @@ void SelectMgr_SelectionManager::RecomputeSelection (const Handle(SelectMgr_Sele
|
|||||||
ClearSelectionStructures (theObject, aSelMode, aCurSelector);
|
ClearSelectionStructures (theObject, aSelMode, aCurSelector);
|
||||||
theObject->RecomputePrimitives(aSelMode);
|
theObject->RecomputePrimitives(aSelMode);
|
||||||
RestoreSelectionStructures (theObject, aSelMode, aCurSelector);
|
RestoreSelectionStructures (theObject, aSelMode, aCurSelector);
|
||||||
}
|
|
||||||
}
|
|
||||||
aSelection->UpdateStatus (SelectMgr_TOU_None);
|
aSelection->UpdateStatus (SelectMgr_TOU_None);
|
||||||
aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
|
aSelection->UpdateBVHStatus (SelectMgr_TBU_None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Update
|
//function : Update
|
||||||
|
37
tests/bugs/vis/bug26870
Normal file
37
tests/bugs/vis/bug26870
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "CR26870"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
puts "Visualization - deactivated selections are not updated after object's re-computation"
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
pload VISUALIZATION MODELING
|
||||||
|
|
||||||
|
vinit
|
||||||
|
box b 1 1 1
|
||||||
|
vdisplay b
|
||||||
|
vfit
|
||||||
|
|
||||||
|
vselmode b 2 1
|
||||||
|
vselmode b 4 1
|
||||||
|
vselmode b 4 0
|
||||||
|
|
||||||
|
box b 3 3 3
|
||||||
|
vdisplay b
|
||||||
|
vfit
|
||||||
|
|
||||||
|
vselmode 4 1
|
||||||
|
|
||||||
|
# pick a point onto previously computed face
|
||||||
|
vmoveto 80 265
|
||||||
|
if {[vreadpixel 90 206 name] == "CYAN1 1"} {
|
||||||
|
puts "ERROR: previously computed entities are highlighted! Selection mode 4 was not updated after redisplaying the box."
|
||||||
|
}
|
||||||
|
# pick a point onto box
|
||||||
|
if {[vreadpixel 29 216 name] == "YELLOW 1"} {
|
||||||
|
puts "ERROR: the box's face is not highlighted! Selection mode 4 was not updated after redisplaying the box."
|
||||||
|
}
|
||||||
|
|
||||||
|
set only_screen 1
|
Loading…
x
Reference in New Issue
Block a user