mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Merge pull request #404 from xiaoyifang/fix/restore-max
fix: windows can not restore the Geometry
This commit is contained in:
commit
669be41d9a
|
@ -706,14 +706,7 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
|
||||
connect( &ftsIndexing, &FTS::FtsIndexing::newIndexingName, this, &MainWindow::showFTSIndexingName );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
{
|
||||
if ( cfg.mainWindowGeometry.size() )
|
||||
restoreGeometry( cfg.mainWindowGeometry );
|
||||
if ( cfg.mainWindowState.size() )
|
||||
restoreState( cfg.mainWindowState, 1 );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
applyProxySettings();
|
||||
|
||||
|
@ -736,21 +729,28 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
|||
|
||||
setWindowTitle( "GoldenDict" );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
{
|
||||
if ( cfg.mainWindowGeometry.size() )
|
||||
restoreGeometry( cfg.mainWindowGeometry );
|
||||
if ( cfg.mainWindowState.size() )
|
||||
restoreState( cfg.mainWindowState, 1 );
|
||||
}
|
||||
#endif
|
||||
|
||||
blockUpdateWindowTitle = true;
|
||||
addNewTab();
|
||||
|
||||
// Create tab list menu
|
||||
createTabList();
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
{
|
||||
if( cfg.mainWindowGeometry.size() )
|
||||
restoreGeometry( cfg.mainWindowGeometry );
|
||||
if( cfg.mainWindowState.size() )
|
||||
restoreState( cfg.mainWindowState, 1 );
|
||||
}
|
||||
#else
|
||||
{
|
||||
if( cfg.mainWindowGeometry.size() )
|
||||
restoreGeometry( cfg.mainWindowGeometry );
|
||||
if( cfg.mainWindowState.size() )
|
||||
restoreState( cfg.mainWindowState, 1 );
|
||||
}
|
||||
#endif
|
||||
|
||||
// Show the initial welcome text
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue