From cdc36dd94bbe16cf3e22bd06f022e15884c22606 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 25 Jun 2014 11:34:35 +0400 Subject: [PATCH] refs #80 - Sketch base GUI: create/draw point, circle and arc 1. WidgetActivation after focusTo. --- src/XGUI/XGUI_PropertyPanel.cpp | 5 ++++- src/XGUI/XGUI_Workshop.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index ae3df8179..69d071480 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -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); } diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 3b5068dfa..408497da8 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -839,7 +839,7 @@ void XGUI_Workshop::onWidgetValuesChanged() QList::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); } } -- 2.39.2