From 4a84220d2c18d4120fe72b9e6a4e9d5915d90182 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 2 Apr 2015 09:02:46 +0300 Subject: [PATCH] Issue #422 - Application hangs up when apply Fillet constraint on preselected segments The fillet radius value is not obligatory, the default value should be applyed for it by preselection. --- src/ModuleBase/ModuleBase_Operation.cpp | 9 +++++++++ src/SketchPlugin/plugin-Sketch.xml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index ff2780957..084ba04bf 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -220,6 +220,7 @@ void ModuleBase_Operation::activateByPreselection() QList::const_iterator aWIt; QList::const_iterator aPIt; bool isSet = false; + // 1. apply the selection to controls for (aWIt = aWidgets.constBegin(), aPIt = myPreSelection.constBegin(); (aWIt != aWidgets.constEnd()) && (aPIt != myPreSelection.constEnd()); ++aWIt) { @@ -237,7 +238,15 @@ void ModuleBase_Operation::activateByPreselection() aFilledWgt = aWgt; } } + // 2. ignore not obligatory widgets + for (; aWIt != aWidgets.constEnd(); ++aWIt) { + aWgt = (*aWIt); + if (aWgt && aWgt->isObligatory()) + continue; + aFilledWgt = aWgt; + } + // 3. activate the next obligatory widget myPropertyPanel->activateNextWidget(aFilledWgt); if (aFilledWgt) emit activatedByPreselection(); diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 04730f8fc..8301d9d18 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -225,7 +225,7 @@ label="Last object" tooltip="Select line or arc" shape_types="edge"> - + -- 2.39.2