From 7dd662d5119e57abf490f8170a51eb30cdcbff6d Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 30 Jul 2019 15:07:09 +0300 Subject: [PATCH] Issue #2943: Check state of "Show only" on Select press button --- src/ModuleBase/ModuleBase_WidgetSelectionFilter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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; -- 2.39.2