Preserve preference dialog size

Change-Id: Ibc4a0d62eab0823253e4050001c7d7904fef4d33
Task-number: QTCREATORBUG-14522
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-08-12 11:39:13 +02:00
parent a802ca771f
commit ad5b6e60b5

View File

@@ -705,9 +705,13 @@ bool SettingsDialog::execDialog()
if (!m_running) { if (!m_running) {
m_running = true; m_running = true;
m_finished = false; m_finished = false;
static const QLatin1String kPreferenceDialogSize("Core/PreferenceDialogSize");
if (ICore::settings()->contains(kPreferenceDialogSize))
resize(ICore::settings()->value(kPreferenceDialogSize).toSize());
exec(); exec();
m_running = false; m_running = false;
m_instance = 0; m_instance = 0;
ICore::settings()->setValue(kPreferenceDialogSize, size());
// make sure that the current "single" instance is deleted // make sure that the current "single" instance is deleted
// we can't delete right away, since we still access the m_applied member // we can't delete right away, since we still access the m_applied member
deleteLater(); deleteLater();