]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
a lot of ObjectTypeFilter was created on the widget activate, not all of them are...
authornds <natalia.donis@opencascade.com>
Mon, 2 Mar 2015 11:39:46 +0000 (14:39 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 2 Mar 2015 11:39:46 +0000 (14:39 +0300)
Error: create part, extrusion, sketch - > it is not possible to select a sketch plane.

src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp

index 093780bae232376dc2e313ed373f9fa37b5708e4..34fc4ec41627912086b5ceb8b940ad8c1e9cfdc6 100644 (file)
@@ -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;