From d1d3a8c486da44618b09bc379dc7333fc4166786 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 30 Oct 2014 15:21:25 +0300 Subject: [PATCH] Issue #191: Processing of pre-selection is improved. --- src/ModuleBase/ModuleBase_Operation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 30410bfdc..a28d62d88 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -252,6 +252,7 @@ bool ModuleBase_Operation::activateByPreselection() ModuleBase_ViewerPrs aPrs; QList::const_iterator aWIt; QList::const_iterator aPIt; + bool isSet = false; for (aWIt = aWidgets.constBegin(), aPIt = myPreSelection.constBegin(); (aWIt != aWidgets.constEnd()) && (aPIt != myPreSelection.constEnd()); ++aWIt, ++aPIt) { @@ -262,10 +263,13 @@ bool ModuleBase_Operation::activateByPreselection() // Check if the selection has a selected point // for today it is impossible to do because // the selected point demands convertation to Sketch plane 2d - if (!aWgt->setValue(&aValue)) + if (!aWgt->setValue(&aValue)) { + isSet = false; break; + } else + isSet = true; } - if (canBeCommitted()) { + if (isSet && canBeCommitted()) { // if all widgets are filled with selection commit(); return true; -- 2.39.2