From: nds Date: Fri, 31 Oct 2014 09:11:37 +0000 (+0300) Subject: refs #226: the next non-filled widget should have focus after preselection processing X-Git-Tag: V_0.5~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6920ebc7d04391d5a1de785c8bed0301c3fab205;p=modules%2Fshaper.git refs #226: the next non-filled widget should have focus after preselection processing --- diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index a28d62d88..fa9183d31 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -248,7 +248,7 @@ bool ModuleBase_Operation::activateByPreselection() if (aWidgets.empty()) return false; - ModuleBase_ModelWidget* aWgt; + ModuleBase_ModelWidget* aWgt, *aFilledWgt = 0; ModuleBase_ViewerPrs aPrs; QList::const_iterator aWIt; QList::const_iterator aPIt; @@ -266,14 +266,23 @@ bool ModuleBase_Operation::activateByPreselection() if (!aWgt->setValue(&aValue)) { isSet = false; break; - } else + } else { isSet = true; + aFilledWgt = aWgt; + } } if (isSet && canBeCommitted()) { // if all widgets are filled with selection commit(); return true; } + else { + //activate next widget + if (aFilledWgt) { + myPropertyPanel->activateNextWidget(aFilledWgt); + return true; + } + } //ModuleBase_ModelWidget* aActiveWgt = myPropertyPanel->activeWidget(); //if ((myPreSelection.size() > 0) && aActiveWgt) {