From: vsv Date: Tue, 30 Jul 2019 12:07:09 +0000 (+0300) Subject: Issue #2943: Check state of "Show only" on Select press button X-Git-Tag: VEDF2019Lot4~73 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7dd662d5119e57abf490f8170a51eb30cdcbff6d;p=modules%2Fshaper.git Issue #2943: Check state of "Show only" on Select press button --- diff --git a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp index 78b3bb708..7f1a8a599 100644 --- a/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp @@ -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;