Skip to content

Commit

Permalink
Fixed selection of selected catalogs. Refs #9112.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawrainey committed Mar 11, 2014
1 parent e063506 commit 88c045f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Code/Mantid/MantidQt/MantidWidgets/src/CatalogSelector.cpp
Expand Up @@ -21,12 +21,13 @@ namespace MantidQt
*/
std::vector<std::string> CatalogSelector::getSelectedCatalogSessions()
{
QModelIndexList indexes = m_uiForm.selectedCatalogs->selectionModel()->selectedRows();

std::vector<std::string> selectedSessions;
for (int i = 0; i < indexes.count(); ++i)
for (int row = 0; row < m_uiForm.selectedCatalogs->count(); ++row)
{
selectedSessions.push_back(m_uiForm.selectedCatalogs->item(i)->data(Qt::UserRole).toString().toStdString());
if (m_uiForm.selectedCatalogs->item(row)->isSelected())
{
selectedSessions.push_back(m_uiForm.selectedCatalogs->item(row)->data(Qt::UserRole).toString().toStdString());
}
}
return selectedSessions;
}
Expand Down

0 comments on commit 88c045f

Please sign in to comment.