comparison main/MainWindow.cpp @ 624:c0a20cd1a9ff

If maximised on exit, don't save (maximised) geometry but instead mark as maximised and maximise on restart
author Chris Cannam
date Fri, 20 Sep 2013 16:38:00 +0100
parents 110eecb5d9f6
children 2484381b53a1
comparison
equal deleted inserted replaced
622:2093255c8203 624:c0a20cd1a9ff
3092 return; 3092 return;
3093 } 3093 }
3094 3094
3095 QSettings settings; 3095 QSettings settings;
3096 settings.beginGroup("MainWindow"); 3096 settings.beginGroup("MainWindow");
3097 settings.setValue("size", size()); 3097 settings.setValue("maximised", isMaximized());
3098 settings.setValue("position", pos()); 3098 if (!isMaximized()) {
3099 settings.setValue("size", size());
3100 settings.setValue("position", pos());
3101 }
3099 settings.endGroup(); 3102 settings.endGroup();
3100 3103
3101 if (m_preferencesDialog && 3104 if (m_preferencesDialog &&
3102 m_preferencesDialog->isVisible()) { 3105 m_preferencesDialog->isVisible()) {
3103 closeSession(); // otherwise we'll have to wait for prefs changes 3106 closeSession(); // otherwise we'll have to wait for prefs changes