ui: fixed project settings did not update display correctly if source group gets removed

This commit is contained in:
mlangkabel
2018-06-11 20:57:12 +02:00
parent 963fbdc564
commit 61975757f4
@@ -578,7 +578,7 @@ void QtProjectWizzard::removeSelectedSourceGroup()
m_allSourceGroupSettings.erase(m_allSourceGroupSettings.begin() + currentRow);
updateSourceGroupList();
if (!m_allSourceGroupSettings.size())
if (m_allSourceGroupSettings.empty())
{
setNextEnabled(false);
generalButtonClicked();
@@ -590,6 +590,8 @@ void QtProjectWizzard::removeSelectedSourceGroup()
currentRow--;
}
m_previouslySelectedIndex = -1;
m_sourceGroupList->setCurrentRow(currentRow);
}
}
@@ -674,6 +676,9 @@ void QtProjectWizzard::duplicateSelectedSourceGroup()
m_allSourceGroupSettings.insert(m_allSourceGroupSettings.begin() + newRow, newSourceGroup);
updateSourceGroupList();
m_previouslySelectedIndex = -1;
m_sourceGroupList->setCurrentRow(newRow);
}
@@ -1126,6 +1131,8 @@ void QtProjectWizzard::createSourceGroup()
setNextEnabled(true);
m_previouslySelectedIndex = -1;
m_sourceGroupList->setCurrentRow(m_allSourceGroupSettings.size() - 1);
}