]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Focus regression in shape selector. Distance - select 1st object, focus is still...
authornds <natalia.donis@opencascade.com>
Wed, 24 Jun 2015 06:50:43 +0000 (09:50 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 24 Jun 2015 06:50:43 +0000 (09:50 +0300)
src/ModuleBase/ModuleBase_WidgetSelector.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp

index 5a9ce330a929e931518f4052e3031af14a00b42c..f4a4b456f80f83b9d491164624e8e65111f95fb5 100755 (executable)
@@ -46,14 +46,15 @@ void ModuleBase_WidgetSelector::onSelectionChanged()
 
   QList<ModuleBase_ViewerPrs> aSelected = myWorkshop->selection()->getSelected(
                                                               ModuleBase_ISelection::AllControls);
-  setSelection(aSelected);
+  bool isDone = setSelection(aSelected);
 
   emit valuesChanged();
   // the updateObject method should be called to flush the updated sigal. The workshop listens it,
   // calls validators for the feature and, as a result, updates the Apply button state.
   updateObject(myFeature);
 
-  updateFocus();
+  if (isDone)
+    updateFocus();
 }
 
 //********************************************************************
index c455309d710003bf86bc83cd61adb2591c1cbaa7..0064bcec127397240e7d4d26cd97ebabb5d0ef60 100644 (file)
@@ -182,9 +182,7 @@ QList<QWidget*> ModuleBase_WidgetShapeSelector::getControls() const
 
 void ModuleBase_WidgetShapeSelector::updateFocus()
 {
-  ObjectPtr anObject = GeomValidators_Tools::getObject(myFeature->attribute(attributeID()));
-  if (anObject.get())
-    emit focusOutWidget(this);
+  emit focusOutWidget(this);
 }
 
 //********************************************************************