Skip to content

Commit

Permalink
Refs #10302 Make inserted use new group ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Oct 2, 2014
1 parent aa28f0c commit 35c62ef
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -424,7 +424,10 @@ namespace MantidQt
std::vector<size_t> rows = m_view->getSelectedRowIndexes();
if (rows.size() == 0)
{
const int groupId = getUnusedGroup();
const size_t row = m_model->rowCount();
m_model->appendRow();
m_model->Int(row, COL_GROUP) = groupId;
}
else
{
Expand All @@ -433,7 +436,9 @@ namespace MantidQt
std::sort (rows.begin(), rows.end());
for (size_t idx = rows.size(); 0 < idx; --idx)
{
m_model->insertRow(rows.at(0));
const int groupId = getUnusedGroup();
const size_t row = m_model->insertRow(rows.at(0));
m_model->Int(row, COL_GROUP) = groupId;
}
}

Expand Down

0 comments on commit 35c62ef

Please sign in to comment.