Mercurial > hg > sonic-visualiser
comparison 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 |
comparison
equal
deleted
inserted
replaced
453:d57fb8614567 | 454:1604cb12ce11 |
---|---|
2866 // SVDEBUG << "Ignoring close event" << endl; | 2866 // SVDEBUG << "Ignoring close event" << endl; |
2867 e->ignore(); | 2867 e->ignore(); |
2868 return; | 2868 return; |
2869 } | 2869 } |
2870 | 2870 |
2871 QSettings settings; | 2871 // Don't save size and position if in minimal mode (because we |
2872 settings.beginGroup("MainWindow"); | 2872 // always start up in full mode) |
2873 settings.setValue("size", size()); | 2873 bool minimal = m_viewManager->getMinimalModeEnabled(); |
2874 settings.setValue("position", pos()); | 2874 if (!minimal) { |
2875 settings.endGroup(); | 2875 QSettings settings; |
2876 settings.beginGroup("MainWindow"); | |
2877 settings.setValue("size", size()); | |
2878 settings.setValue("position", pos()); | |
2879 settings.endGroup(); | |
2880 } | |
2876 | 2881 |
2877 delete m_keyReference; | 2882 delete m_keyReference; |
2878 m_keyReference = 0; | 2883 m_keyReference = 0; |
2879 | 2884 |
2880 if (m_preferencesDialog && | 2885 if (m_preferencesDialog && |