mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026172: Visualization, AIS_LocalContext - locally selected object should not stay in the viewer after deactivation in the local context
Fix for AIS_LocalContext::ClearOutdatedSelection() Added test case bugs/vis/bug26172
This commit is contained in:
@@ -905,7 +905,7 @@ void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObjec
|
||||
|
||||
Standard_Boolean isAISRemainsDetected = Standard_False;
|
||||
|
||||
// 3. Remove entity owners from AIS_Selection
|
||||
// 3. AIS_Selection : remove entity owners from AIS_Selection
|
||||
const Handle(V3d_Viewer)& aViewer = myCTX->CurrentViewer();
|
||||
Handle(AIS_Selection) aSelection = AIS_Selection::Selection (mySelName.ToCString());
|
||||
AIS_NListTransient::Iterator anIter (aSelection->Objects());
|
||||
@@ -922,22 +922,23 @@ void AIS_LocalContext::ClearOutdatedSelection (const Handle(AIS_InteractiveObjec
|
||||
{
|
||||
isAISRemainsDetected = Standard_True;
|
||||
}
|
||||
|
||||
aRemoveEntites.Append (anOwner);
|
||||
anOwner->SetSelected (Standard_False);
|
||||
for (aViewer->InitActiveViews(); aViewer->MoreActiveViews(); aViewer->NextActiveViews())
|
||||
else
|
||||
{
|
||||
Unhilight (anOwner, aViewer->ActiveView());
|
||||
aRemoveEntites.Append (anOwner);
|
||||
anOwner->SetSelected (Standard_False);
|
||||
for (aViewer->InitActiveViews(); aViewer->MoreActiveViews(); aViewer->NextActiveViews())
|
||||
{
|
||||
Unhilight (anOwner, aViewer->ActiveView());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AIS_NListTransient::Iterator anIterRemove (aRemoveEntites);
|
||||
for (; anIterRemove.More(); anIterRemove.Next())
|
||||
{
|
||||
aSelection->Select (anIterRemove.Value());
|
||||
}
|
||||
|
||||
// 4. Remove entity owners from myMapOfOwner
|
||||
// 4. AIS_LocalContext - myMapOfOwner : remove entity owners from myMapOfOwner
|
||||
SelectMgr_IndexedMapOfOwner anOwnersToKeep;
|
||||
for (Standard_Integer anIdx = 1; anIdx <= myMapOfOwner.Extent(); anIdx++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user