mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
fix: remove old unnecessary logic which blocks updating Windows Title
This commit is contained in:
parent
aef8bc81d1
commit
51a050c43b
|
@ -165,7 +165,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
wordFinder( this ),
|
wordFinder( this ),
|
||||||
wordListSelChanged( false ),
|
wordListSelChanged( false ),
|
||||||
wasMaximized( false ),
|
wasMaximized( false ),
|
||||||
blockUpdateWindowTitle( false ),
|
|
||||||
headwordsDlg( nullptr ),
|
headwordsDlg( nullptr ),
|
||||||
ftsIndexing( dictionaries ),
|
ftsIndexing( dictionaries ),
|
||||||
ftsDlg( nullptr ),
|
ftsDlg( nullptr ),
|
||||||
|
@ -734,8 +733,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
|
|
||||||
setWindowTitle( "GoldenDict-ng" );
|
setWindowTitle( "GoldenDict-ng" );
|
||||||
|
|
||||||
blockUpdateWindowTitle = true;
|
|
||||||
|
|
||||||
// Create tab list menu
|
// Create tab list menu
|
||||||
createTabList();
|
createTabList();
|
||||||
|
|
||||||
|
@ -763,7 +760,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
|
||||||
addNewTab();
|
addNewTab();
|
||||||
ArticleView * view = getCurrentArticleView();
|
ArticleView * view = getCurrentArticleView();
|
||||||
history.enableAdd( false );
|
history.enableAdd( false );
|
||||||
blockUpdateWindowTitle = true;
|
|
||||||
view->showDefinition( tr( "Welcome!" ), Instances::Group::HelpGroupId );
|
view->showDefinition( tr( "Welcome!" ), Instances::Group::HelpGroupId );
|
||||||
history.enableAdd( cfg.preferences.storeHistory );
|
history.enableAdd( cfg.preferences.storeHistory );
|
||||||
|
|
||||||
|
@ -1945,9 +1941,7 @@ void MainWindow::updateWindowTitle()
|
||||||
if ( view ) {
|
if ( view ) {
|
||||||
QString str = view->getTitle();
|
QString str = view->getTitle();
|
||||||
if ( !str.isEmpty() ) {
|
if ( !str.isEmpty() ) {
|
||||||
if ( !blockUpdateWindowTitle )
|
setWindowTitle( tr( "%1 - %2" ).arg( str, "GoldenDict-ng" ) );
|
||||||
setWindowTitle( tr( "%1 - %2" ).arg( str, "GoldenDict-ng" ) );
|
|
||||||
blockUpdateWindowTitle = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,8 +155,6 @@ private:
|
||||||
|
|
||||||
bool wasMaximized; // Window state before minimization
|
bool wasMaximized; // Window state before minimization
|
||||||
|
|
||||||
bool blockUpdateWindowTitle;
|
|
||||||
|
|
||||||
QPrinter & getPrinter(); // Creates a printer if it's not there and returns it
|
QPrinter & getPrinter(); // Creates a printer if it's not there and returns it
|
||||||
|
|
||||||
DictHeadwords * headwordsDlg;
|
DictHeadwords * headwordsDlg;
|
||||||
|
|
Loading…
Reference in a new issue