From 2ee8f1445c91743b8ea10ece2361429fe0011048 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 21 Dec 2014 10:12:12 +0100 Subject: [PATCH] reset window title every time we change the state of a subwindow to show the correct title When maximizing a subwindow it remembers the title the mainwindow had before and resets it after unmaximizing/closing. As the title might have changed due to a project switch, we have to reset the title again as it would else show an incorrect/old title. --- src/gui/MainWindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index f476ec70d..fa7b38c00 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -529,6 +529,11 @@ void MainWindow::finalize() setupDialog sd( setupDialog::AudioSettings ); sd.exec(); } + // reset window title every time we change the state of a subwindow to show the correct title + foreach( QMdiSubWindow * subWindow, workspace()->subWindowList() ) + { + connect( subWindow, SIGNAL( windowStateChanged(Qt::WindowStates,Qt::WindowStates) ), this, SLOT( resetWindowTitle() ) ); + } }