From: nds Date: Mon, 2 Mar 2015 11:39:46 +0000 (+0300) Subject: a lot of ObjectTypeFilter was created on the widget activate, not all of them are... X-Git-Tag: V_1.1.0~150^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd948824e8852bd1945dae7f0d6b4e22447aa587;p=modules%2Fshaper.git a lot of ObjectTypeFilter was created on the widget activate, not all of them are removed. Error: create part, extrusion, sketch - > it is not possible to select a sketch plane. --- diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 093780bae..34fc4ec41 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -444,10 +444,11 @@ void ModuleBase_WidgetShapeSelector::activateSelection(bool toActivate) //******************************************************************** void ModuleBase_WidgetShapeSelector::selectionFilters(SelectMgr_ListOfFilter& theFilters) { - if (!myObjectTypes.isEmpty()) { + if (!myObjectTypes.isEmpty() && myObjTypeFilter.IsNull()) { myObjTypeFilter = new ModuleBase_ObjectTypesFilter(myWorkshop, myObjectTypes); - theFilters.Append(myObjTypeFilter); } + theFilters.Append(myObjTypeFilter); + // apply filters loaded from the XML definition of the widget ModuleBase_FilterFactory* aFactory = myWorkshop->selectionFilters(); SelectMgr_ListOfFilter aFilters;