Salome HOME
#18314 [CEA 18312] MG-Hexa hypothesis Construction: Hypothesis construction Local...
[plugins/hexoticplugin.git] / src / GUI / HexoticPluginGUI_HypothesisCreator.cxx
index 2df61328da0b809f73f6f8eab160bd1279d542e7..83ed5f44d29a8b4d56dbb6cd3f763ee2168a5299 100644 (file)
@@ -384,7 +384,7 @@ void HexoticPluginGUI_HypothesisCreator::onRemoveLocalSize()
 {
   // Remove the selected rows in the table
   QList<QTableWidgetSelectionRange> ranges = mySmpWidget->tableWidget->selectedRanges();
-  if ( ranges.isEmpty() ) // If none is selected remove the last one
+  if ( ranges.isEmpty() && mySmpWidget->tableWidget->rowCount() > 0 ) // If none is selected remove the last one
   {
     int lastRow = mySmpWidget->tableWidget->rowCount() - 1;
     std::string entry = mySmpWidget->tableWidget->item( lastRow, ENTRY_COL )->text().toStdString();