From: nds Date: Wed, 24 Jun 2015 06:50:43 +0000 (+0300) Subject: Focus regression in shape selector. Distance - select 1st object, focus is still... X-Git-Tag: V_1.3.0~203 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c81e2807e1293d6f35262a4de66ceb61d0322fda;p=modules%2Fshaper.git Focus regression in shape selector. Distance - select 1st object, focus is still on the first control --- diff --git a/src/ModuleBase/ModuleBase_WidgetSelector.cpp b/src/ModuleBase/ModuleBase_WidgetSelector.cpp index 5a9ce330a..f4a4b456f 100755 --- a/src/ModuleBase/ModuleBase_WidgetSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetSelector.cpp @@ -46,14 +46,15 @@ void ModuleBase_WidgetSelector::onSelectionChanged() QList 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(); } //******************************************************************** diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index c455309d7..0064bcec1 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -182,9 +182,7 @@ QList 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); } //********************************************************************