mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 17:38:44 +00:00
Changed: Display previous profile after one is deleted
--HG-- branch : develop
This commit is contained in:
parent
a37752e213
commit
a9ec60ad69
1 changed files with 9 additions and 2 deletions
|
@ -128,7 +128,7 @@ void CProfilesDialog::displayProfile(int index)
|
||||||
|
|
||||||
void CProfilesDialog::saveProfile(int index)
|
void CProfilesDialog::saveProfile(int index)
|
||||||
{
|
{
|
||||||
if (index < 0) return;
|
if (index < 0 || index >= m_model->rowCount()) return;
|
||||||
|
|
||||||
CProfile &profile = m_model->getProfiles()[index];
|
CProfile &profile = m_model->getProfiles()[index];
|
||||||
|
|
||||||
|
@ -146,7 +146,14 @@ void CProfilesDialog::deleteProfile(int index)
|
||||||
|
|
||||||
m_model->removeRow(index);
|
m_model->removeRow(index);
|
||||||
|
|
||||||
COperationDialog dialog;
|
// decrement profile index
|
||||||
|
--index;
|
||||||
|
|
||||||
|
// select row and update content
|
||||||
|
profilesListView->setCurrentIndex(m_model->index(index, 0));
|
||||||
|
displayProfile(index);
|
||||||
|
|
||||||
|
// TODO: delete files for delete profile
|
||||||
}
|
}
|
||||||
|
|
||||||
void CProfilesDialog::addProfile()
|
void CProfilesDialog::addProfile()
|
||||||
|
|
Loading…
Reference in a new issue