]> SALOME platform Git repositories - plugins/hexoticplugin.git/blobdiff - src/GUI/HexoticPluginGUI_HypothesisCreator.cxx
Salome HOME
BUG: Hexotic Size Maps: The size maps were not always removed on user's request
[plugins/hexoticplugin.git] / src / GUI / HexoticPluginGUI_HypothesisCreator.cxx
index be613c8c5b2d9dfc4f3fd0eee772ca1cfca8d5df..6a180492fd4b0a47759a9de84d7457452e986747 100644 (file)
@@ -339,13 +339,17 @@ void HexoticPluginGUI_HypothesisCreator::onRemoveLocalSize()
   }
   else
   {
-    QTableWidgetSelectionRange& range = ranges.first();
-    for ( int row = range.topRow(); row < range.rowCount(); row++ )
+    QList<QTableWidgetSelectionRange>::iterator it;
+    for ( it = ranges.begin(); it != ranges.end(); ++it )
     {
-      std::string entry = mySmpWidget->tableWidget->item( row, ENTRY_COL )->text().toStdString();
-      mySizeMapsToRemove.push_back(entry);
+      for ( int row = it->topRow(); row <= it->bottomRow(); row++ )
+      {
+        std::string entry = mySmpWidget->tableWidget->item( row, ENTRY_COL )->text().toStdString();
+        mySizeMapsToRemove.push_back(entry);
+        MESSAGE("ADDING entry : "<<entry<<"to the Size Maps to remove")
+      }
+      mySmpWidget->tableWidget->model()->removeRows(it->topRow(), it->rowCount());
     }
-    mySmpWidget->tableWidget->model()->removeRows(range.topRow(), range.rowCount());
   }
 }