]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_SelectionMgr.cpp
Salome HOME
Debug of CompSolid selection
[modules/shaper.git] / src / XGUI / XGUI_SelectionMgr.cpp
index 6136e93f80f3550866ef9e587f4f19c4713e7715..770cc593566992380acec624b8119dec3612a43e 100644 (file)
@@ -107,11 +107,10 @@ void XGUI_SelectionMgr::onViewerSelection()
   QObjectPtrList aFeatures;
   Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
   if (!aContext.IsNull()) {
-    for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) {
-      Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
-      ObjectPtr aResult = myWorkshop->displayer()->getObject(anIO);
-      if (aResult)
-        aFeatures.append(aResult);
+    QList<ModuleBase_ViewerPrs> aPresentations = selection()->getSelected(ModuleBase_ISelection::Viewer);
+    foreach(ModuleBase_ViewerPrs aPrs, aPresentations) {
+      if (aPrs.object().get())
+        aFeatures.append(aPrs.object());
     }
   }
   bool aBlocked = myWorkshop->objectBrowser()->blockSignals(true);