From cba7b7dc87fe4275d77137af1121251e4e7dff57 Mon Sep 17 00:00:00 2001 From: rnc Date: Mon, 7 Oct 2013 12:55:54 +0000 Subject: [PATCH] BUG: Hexotic Size Maps: The size maps were not always removed on user's request --- src/GUI/HexoticPluginGUI_HypothesisCreator.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx index be613c8..6a18049 100644 --- a/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/HexoticPluginGUI_HypothesisCreator.cxx @@ -339,13 +339,17 @@ void HexoticPluginGUI_HypothesisCreator::onRemoveLocalSize() } else { - QTableWidgetSelectionRange& range = ranges.first(); - for ( int row = range.topRow(); row < range.rowCount(); row++ ) + QList::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 : "<tableWidget->model()->removeRows(it->topRow(), it->rowCount()); } - mySmpWidget->tableWidget->model()->removeRows(range.topRow(), range.rowCount()); } } -- 2.39.2