[vlmc-devel] MainWindow: Do not restore settings before they're all created

Hugo Beauzée-Luyssen git at videolan.org
Sun Feb 9 19:44:26 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Feb  9 20:35:01 2014 +0200| [369e34c316cc207ccbc2e0b8b6f3889981153abb] | committer: Hugo Beauzée-Luyssen

MainWindow: Do not restore settings before they're all created

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=369e34c316cc207ccbc2e0b8b6f3889981153abb
---

 src/Gui/MainWindow.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index c0f7129..1916f16 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -84,6 +84,10 @@ MainWindow::MainWindow( QWidget *parent ) :
     //Creating the project manager so it can create all the project variables
     GUIProjectManager::getInstance();
 
+    //All preferences have been created: restore them:
+    loadVlmcPreferences();
+    SettingsManager::getInstance()->setValue( "private/VlmcVersion", PROJECT_VERSION_MAJOR, SettingsManager::Vlmc );
+
     // GUI
     DockWidgetManager::getInstance( this )->setMainWindow( this );
     createGlobalPreferences();
@@ -328,10 +332,6 @@ MainWindow::initVlmcPreferences()
     VLMC_CREATE_PRIVATE_PREFERENCE_STRING( "private/RecentsProjects", "" );
     VLMC_CREATE_PRIVATE_PREFERENCE_BOOL( "private/ShowWizardStartup", true );
     VLMC_CREATE_PRIVATE_PREFERENCE_STRING( "private/VlmcVersion", PROJECT_VERSION_MAJOR );
-
-    //Load saved preferences :
-    loadVlmcPreferences();
-    SettingsManager::getInstance()->setValue( "private/VlmcVersion", PROJECT_VERSION_MAJOR, SettingsManager::Vlmc );
 }
 
 void



More information about the Vlmc-devel mailing list