diff main/MainWindow.cpp @ 454:1604cb12ce11 toggle

Save window size and position on exit only if we are not in minimal mode -- since application always starts up in "maximal" mode
author Chris Cannam
date Fri, 24 Jun 2011 14:08:15 +0100
parents 794850d517f2
children a94be56cf98f
line wrap: on
line diff
--- a/main/MainWindow.cpp	Fri Jun 24 12:18:05 2011 +0100
+++ b/main/MainWindow.cpp	Fri Jun 24 14:08:15 2011 +0100
@@ -2868,11 +2868,16 @@
 	return;
     }
 
-    QSettings settings;
-    settings.beginGroup("MainWindow");
-    settings.setValue("size", size());
-    settings.setValue("position", pos());
-    settings.endGroup();
+    // Don't save size and position if in minimal mode (because we
+    // always start up in full mode)
+    bool minimal = m_viewManager->getMinimalModeEnabled();
+    if (!minimal) {
+        QSettings settings;
+        settings.beginGroup("MainWindow");
+        settings.setValue("size", size());
+        settings.setValue("position", pos());
+        settings.endGroup();
+    }
 
     delete m_keyReference;
     m_keyReference = 0;