Skip to content

Commit

Permalink
Merge pull request #1019 from shenlebantongying/temp_max_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang authored Jul 28, 2023
2 parents 69905ed + 1ffd729 commit 365899c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit 365899c

Please sign in to comment.