diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 40a8690e..39f0cc8b 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -741,10 +741,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ): // Create tab list menu createTabList(); - if ( cfg.mainWindowState.size() && !cfg.resetState ) - restoreState( cfg.mainWindowState ); - if ( cfg.mainWindowGeometry.size() ) - restoreGeometry( cfg.mainWindowGeometry ); #if defined( Q_OS_LINUX ) #if ( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) ) @@ -915,6 +911,12 @@ MainWindow::MainWindow( Config::Class & cfg_ ): urlRegistry.endGroup(); #endif + // restore should be called after all UI initialized. + if ( cfg.mainWindowState.size() && !cfg.resetState ) + restoreState( cfg.mainWindowState ); + if ( cfg.mainWindowGeometry.size() ) + restoreGeometry( cfg.mainWindowGeometry ); + useSmallIconsInToolbarsTriggered(); if ( cfg.preferences.checkForNewReleases ) {