X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Selection.cpp;h=23b11c9fbeeb83e81414bc31e2b1a1c2cef6a3e7;hb=6958dab7cbbaf443a39b04a609c5f33573c73f9e;hp=7b4bb5ff1601e0c22f1ca481dd0fcc3c9969bd38;hpb=c0d8dd5e00c11f343fda909b8868f04986ced273;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index 7b4bb5ff1..23b11c9fb 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -157,16 +157,27 @@ void XGUI_Selection::selectedShapes(NCollection_List& theList, } } +//************************************************************** +void XGUI_Selection::selectedOwners(SelectMgr_IndexedMapOfOwner& theSelectedOwners) const +{ + Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); + + for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) { + theSelectedOwners.Add(aContext->SelectedOwner()); + } +} + //************************************************************** void XGUI_Selection::entityOwners(const Handle(AIS_InteractiveObject)& theObject, - const Handle(AIS_InteractiveContext)& theContext, - SelectMgr_IndexedMapOfOwner& theOwners) + SelectMgr_IndexedMapOfOwner& theOwners) const { - if (theObject.IsNull() || theContext.IsNull()) + Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); + + if (theObject.IsNull() || aContext.IsNull()) return; TColStd_ListOfInteger aModes; - theContext->ActivatedModes(theObject, aModes); + aContext->ActivatedModes(theObject, aModes); TColStd_ListIteratorOfListOfInteger anIt(aModes); for (; anIt.More(); anIt.Next()) {