]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_WidgetPoint2d.cpp
Salome HOME
Preselection using in operations: setSelection of widget returns a modified list...
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2d.cpp
index df7aab9dca3ce905ef015c06f7a799661210f926..964303fcd659a215d0e6008f80a48c2742233ad0 100644 (file)
@@ -125,12 +125,12 @@ PartSet_WidgetPoint2D::~PartSet_WidgetPoint2D()
 {
 }
 
-bool PartSet_WidgetPoint2D::setSelection(const QList<ModuleBase_ViewerPrs>& theValues, int& thePosition)
+bool PartSet_WidgetPoint2D::setSelection(QList<ModuleBase_ViewerPrs>& theValues)
 {
-  if (thePosition < 0 || thePosition >= theValues.size())
+  if (theValues.empty())
     return false;
-  ModuleBase_ViewerPrs aValue = theValues[thePosition];
-  thePosition++;
+
+  ModuleBase_ViewerPrs aValue = theValues.takeFirst();
 
   Handle(V3d_View) aView = myWorkshop->viewer()->activeView();
   bool isDone = false;