]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
authornds <natalia.donis@opencascade.com>
Wed, 25 Jun 2014 07:34:35 +0000 (11:34 +0400)
committernds <natalia.donis@opencascade.com>
Wed, 25 Jun 2014 07:34:35 +0000 (11:34 +0400)
1. WidgetActivation after focusTo.

src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_Workshop.cpp

index ae3df8179508b0c5b0a9284f4a6a2bce40888081..69d071480327133372d9d3be5282f5f438a8baf1 100644 (file)
@@ -198,7 +198,10 @@ void XGUI_PropertyPanel::onActivateNextWidget(ModuleBase_ModelWidget* theWidget)
 
 void XGUI_PropertyPanel::activateWidget(ModuleBase_ModelWidget* theWidget)
 {
+  emit widgetActivated(theWidget);
+  // it is important that the signal widgetActivated goes before the focusTo() calling
+  // in order to handle next possible signal in the focusTo() method
+  // (e.g. the widget editor sends a signal about the widget deactivation)
   if (theWidget)
     theWidget->focusTo();
-  emit widgetActivated(theWidget);
 }
index 3b5068dfab64fac7fff402303c1f37c4b7d74355..408497da87ff710de4b59c0241d7663edc58c9be 100644 (file)
@@ -839,7 +839,7 @@ void XGUI_Workshop::onWidgetValuesChanged()
   QList<ModuleBase_ModelWidget*>::const_iterator anIt = aWidgets.begin(), aLast = aWidgets.end();
   for (; anIt != aLast; anIt++) {
     ModuleBase_ModelWidget* aCustom = *anIt;
-    if (aCustom && (!aCustom->isInitialized(aFeature) || aCustom == aSenderWidget)) {
+    if (aCustom && (/*!aCustom->isInitialized(aFeature) ||*/ aCustom == aSenderWidget)) {
       aCustom->storeValue(aFeature);
     }
   }