1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0027285: Visualization - selection of AIS_MultipleConnectedInteractive is broken

- method SelectMgr_SelectableObject::HasSelection became virtual, unnecessary variable was removed;
- redefined HasSelection method for multiple connected interactives;
- AIS_InteractiveContext::AddOrRemoveSelected was corrected to use global selection owner;
- test case for issue #27285
This commit is contained in:
vpa
2016-03-18 14:26:07 +03:00
committed by bugmaster
parent 1511c7e90f
commit 7411850ad7
6 changed files with 64 additions and 19 deletions

View File

@@ -402,3 +402,22 @@ Handle(SelectMgr_EntityOwner) AIS_MultipleConnectedInteractive::GlobalSelOwner()
{
return myAssemblyOwner;
}
//=======================================================================
//function : HasSelection
//purpose :
//=======================================================================
Standard_Boolean AIS_MultipleConnectedInteractive::HasSelection (const Standard_Integer theMode) const
{
for (PrsMgr_ListOfPresentableObjectsIter anIter (Children()); anIter.More(); anIter.Next())
{
Handle(AIS_InteractiveObject) aChild = Handle(AIS_InteractiveObject)::DownCast (anIter.Value());
if (aChild.IsNull())
continue;
if (!aChild->HasSelection (theMode))
return Standard_False;
}
return Standard_True;
}