From: nds Date: Thu, 2 Apr 2015 06:02:46 +0000 (+0300) Subject: Issue #422 - Application hangs up when apply Fillet constraint on preselected segments X-Git-Tag: V_1.1.0~65 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4a84220d2c18d4120fe72b9e6a4e9d5915d90182;p=modules%2Fshaper.git 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. --- 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"> - +