]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2943: Check state of "Show only" on Select press button
authorvsv <vsv@opencascade.com>
Tue, 30 Jul 2019 12:07:09 +0000 (15:07 +0300)
committervsv <vsv@opencascade.com>
Tue, 30 Jul 2019 12:07:32 +0000 (15:07 +0300)
src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp

index 78b3bb708066db55164497604d02b2a6a603d149..7f1a8a599ba8788c1480359033351033e43968a0 100644 (file)
@@ -469,6 +469,7 @@ void ModuleBase_WidgetSelectionFilter::onSelect()
     updatePreview(aComp);
   updateNumberSelected();
   updateObject(myFeature);
+  onShowOnly(myShowBtn->isChecked());
 }
 
 void ModuleBase_WidgetSelectionFilter::updatePreview(const TopoDS_Shape& theShape)
@@ -507,9 +508,11 @@ void ModuleBase_WidgetSelectionFilter::onShowOnly(bool theShow)
   Handle(AIS_InteractiveContext) aCtx = myWorkshop->viewer()->AISContext();
 
   if (theShow) {
-    myListIO.Clear();
-    aCtx->DisplayedObjects(AIS_KOI_Shape, -1, myListIO);
-    myListIO.Remove(myPreview);
+    AIS_ListOfInteractive aList;
+    aCtx->DisplayedObjects(AIS_KOI_Shape, -1, aList);
+    aList.Remove(myPreview);
+    if (aList.Size() > 0)
+      myListIO = aList;
   }
   AIS_ListOfInteractive::const_iterator aIt;
   Handle(AIS_Shape) aShapeIO;