]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetValidated.cpp
Salome HOME
Preselection using in operations: setSelection of widget returns a modified list...
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetValidated.cpp
index b329e36c9ac6f065e7e90070cab6f0de0b691948..1225e1282173d223a19bf926af41dec182ff4fcb 100644 (file)
@@ -29,19 +29,21 @@ ModuleBase_WidgetValidated::~ModuleBase_WidgetValidated()
 }
 
 //********************************************************************
-bool ModuleBase_WidgetValidated::setSelection(const QList<ModuleBase_ViewerPrs>& theValues, int& thePosition)
+bool ModuleBase_WidgetValidated::setSelection(QList<ModuleBase_ViewerPrs>& theValues)
 {
-  if (thePosition < 0 || thePosition >= theValues.size())
+  if (theValues.empty())
     return false;
-  ModuleBase_ViewerPrs aValue = theValues[thePosition];
-  thePosition++;
-
+  // it removes the processed value from the parameters list
+  ModuleBase_ViewerPrs aValue = theValues.takeFirst();
   bool isDone = false;
 
   if (isValidSelection(aValue)) {
     isDone = setSelectionCustom(aValue);
-    updateObject(myFeature);
-    emit valuesChanged();
+    // updateObject - to update/redisplay feature
+    // it is commented in order to perfom it outside the method
+    //updateObject(myFeature);
+    // to storeValue()
+    //emit valuesChanged();
   }
   return isDone;
 }