From 1834431e0e067cbb4616f42679562d56af528f5e Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 25 May 2015 16:02:42 +0300 Subject: [PATCH] A fix for the next case: preselection of a point, start a line creation. A line is created with the second point in the origin. The same problem is for the preselection in the translation operation. --- src/ModuleBase/ModuleBase_Operation.cpp | 7 +++++-- src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index ae623079c..d688e90aa 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -274,11 +274,14 @@ void ModuleBase_Operation::activateByPreselection() aFilledWgt = aWgt; }*/ - // 3. activate the next obligatory widget - myPropertyPanel->activateNextWidget(aFilledWgt); + // 3. a signal should be emitted before the next widget activation + // because, the activation of the next widget will give a focus to the widget. As a result + // the value of the widget is initialized. And commit may happens until the value is entered. if (aFilledWgt) emit activatedByPreselection(); + // 4. activate the next obligatory widget + myPropertyPanel->activateNextWidget(aFilledWgt); } void ModuleBase_Operation::setParentFeature(CompositeFeaturePtr theParent) diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index 976972a60..6ee99f6cf 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -230,7 +230,6 @@ bool ModuleBase_WidgetMultiSelector::setSelection(const QList