]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiView.C
Bug Fix: Window title was not updated in new window.
[features.git] / src / frontends / qt4 / GuiView.C
index a74dc452ba5e1980e13e8f5c6230658a255ca8d2..6696e69f84f3ea7766c2ecb88f78bedab982a5e3 100644 (file)
@@ -220,6 +220,10 @@ void GuiView::setGeometry(unsigned int width,
        }
        
        show();
+
+       // For an unknown reason, the Window title update is not effective for
+       // the second windows up until it is shown on screen (Qt bug?).
+       updateWindowTitle();
 }
 
 
@@ -231,8 +235,12 @@ void GuiView::updateMenu(QAction * /*action*/)
 
 void GuiView::setWindowTitle(docstring const & t, docstring const & it)
 {
-       QMainWindow::setWindowTitle(toqstr(t));
-       QMainWindow::setWindowIconText(toqstr(it));
+       QString title = windowTitle();
+       QString new_title = toqstr(t);
+       if (title != new_title) {
+               QMainWindow::setWindowTitle(new_title);
+               QMainWindow::setWindowIconText(toqstr(it));
+       }
 }