Salome HOME
Delete key regression corrections: in previous implementation sketch entities did...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSelector.cpp
index d4ed903ec4b882de9328a8118efc852085ad1854..0f0b2c15a8eda3efe5a491fa3fa50df0ec93a98b 100755 (executable)
@@ -8,11 +8,10 @@
 
 #include <ModuleBase_ISelection.h>
 #include <ModuleBase_IWorkshop.h>
+#include <ModuleBase_Tools.h>
 
 #include <ModelAPI_ResultConstruction.h>
 
-#include <GeomValidators_Tools.h>
-
 #include <TopoDS_Iterator.hxx>
 
 ModuleBase_WidgetSelector::ModuleBase_WidgetSelector(QWidget* theParent,
@@ -90,7 +89,7 @@ bool ModuleBase_WidgetSelector::acceptSubShape(const GeomShapePtr& theShape,
     // for compounds check sub-shapes: it may be compound of needed type:
     // Booleans may produce compounds of Solids
     if (aShapeType == TopAbs_COMPOUND) {
-      aShapeType = GeomValidators_Tools::getCompoundSubType(aTopoShape);
+      aShapeType = ModuleBase_Tools::getCompoundSubType(aTopoShape);
     }
   }
 
@@ -165,8 +164,20 @@ bool ModuleBase_WidgetSelector::setSelectionCustom(const ModuleBase_ViewerPrs& t
 //********************************************************************
 void ModuleBase_WidgetSelector::deactivate()
 {
+  ModuleBase_ModelWidget::deactivate();
   disconnect(myWorkshop, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
   activateSelectionAndFilters(false);
   ModuleBase_ModelWidget::deactivate();
 }
 
+//********************************************************************
+std::string ModuleBase_WidgetSelector::generateName(const AttributePtr& theAttribute)
+{
+  std::string aName;
+  if (theAttribute.get() != NULL) {
+    std::stringstream aStreamName;
+    aStreamName << theAttribute->owner()->data()->name() << "/"<< theAttribute->id();
+    aName = aStreamName.str();
+  }
+  return aName;
+}