]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
refs #226: the next non-filled widget should have focus after preselection processing
authornds <natalia.donis@opencascade.com>
Fri, 31 Oct 2014 09:11:37 +0000 (12:11 +0300)
committernds <natalia.donis@opencascade.com>
Fri, 31 Oct 2014 09:11:37 +0000 (12:11 +0300)
src/ModuleBase/ModuleBase_Operation.cpp

index a28d62d88e7dcc089b03b95b41beaf2412c84254..fa9183d31914f278f0addce86a44cbab52bbc6db 100644 (file)
@@ -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<ModuleBase_ModelWidget*>::const_iterator aWIt;
   QList<ModuleBase_ViewerPrs>::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) {