[vlmc-devel] MainWindow: Restore settings after creating the entire UI

Hugo Beauzée-Luyssen git at videolan.org
Fri Jul 8 22:56:53 CEST 2016


vlmc | branch: medialibrary | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jul  8 22:12:58 2016 +0200| [feb9f282f3d995d511e46f6c21f369d6a6229e58] | committer: Hugo Beauzée-Luyssen

MainWindow: Restore settings after creating the entire UI

This mostly allows all medialibrary events to be processed properly by
the UI. Otherwise, there's nothing to receive those events

> https://code.videolan.org/videolan/vlmc/commit/feb9f282f3d995d511e46f6c21f369d6a6229e58
---

 src/Gui/MainWindow.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 5eb6999..f0758bc 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -78,8 +78,6 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
     Core::instance()->logger()->setup();
     //Preferences
     initVlmcPreferences();
-    //All preferences have been created: restore them:
-    Core::instance()->settings()->load();
 
     // GUI
     createGlobalPreferences();
@@ -136,6 +134,9 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
     // Restore the layout
     restoreState( VLMC_GET_BYTEARRAY( "private/MainWindowState" ) );
     retranslateUi();
+
+    //All preferences have been created: restore them:
+    Core::instance()->settings()->load();
 }
 
 MainWindow::~MainWindow()



More information about the Vlmc-devel mailing list