Changed: Save default profile when clicking on Play or Configure

--HG--
branch : develop
This commit is contained in:
kervala 2016-10-19 10:49:51 +02:00
parent 142155d8c8
commit b62562c896

View file

@ -145,7 +145,11 @@ void CMainWindow::onPlayClicked()
bool started = QProcess::startDetached(executable, arguments, server.getDirectory());
// define this profile as default one
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
if (started)
{
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
CConfigFile::getInstance()->save();
}
}
void CMainWindow::onConfigureClicked()
@ -174,7 +178,11 @@ void CMainWindow::onConfigureClicked()
bool started = QProcess::startDetached(executable, arguments);
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
if (started)
{
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
CConfigFile::getInstance()->save();
}
}
void CMainWindow::onProfiles()