Salome HOME
Rectangle correction to have coincidence with point/line selected for the first point...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetSelector.cpp
index 02bb297ff5d9f1f415c1bc0c160bf80469e0f710..e8c6093438fc650319046cad21c6f5ddeeb31844 100755 (executable)
@@ -44,8 +44,6 @@ void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrs& the
 //********************************************************************
 void ModuleBase_WidgetSelector::onSelectionChanged()
 {
-  clearAttribute();
-
   QList<ModuleBase_ViewerPrs> aSelected = getFilteredSelected();
 
   bool isDone = setSelection(aSelected, true/*false*/);
@@ -58,11 +56,11 @@ void ModuleBase_WidgetSelector::onSelectionChanged()
   // calls validators for the feature and, as a result, updates the Apply button state.
   updateObject(myFeature);
 
-  if (isDone)
-    updateFocus();
-
   // we need to forget about previous validation result as the current selection can influence on it
   clearValidatedCash();
+
+  if (isDone)
+    updateFocus();
 }
 
 //********************************************************************
@@ -117,7 +115,7 @@ bool ModuleBase_WidgetSelector::acceptSubShape(const GeomShapePtr& theShape,
 }
 
 //********************************************************************
-void ModuleBase_WidgetSelector::activateSelectionAndFilters(bool toActivate)
+bool ModuleBase_WidgetSelector::activateSelectionAndFilters(bool toActivate)
 {
   updateSelectionName();
 
@@ -126,7 +124,7 @@ void ModuleBase_WidgetSelector::activateSelectionAndFilters(bool toActivate)
   } else {
     myWorkshop->deactivateSubShapesSelection();
   }
-  activateFilters(toActivate);
+  return activateFilters(toActivate);
 }
 
 //********************************************************************