commit 9313f8565b41c9de4b1990e155fe3fe8468f3446
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Wed Sep 14 22:33:56 2016 +0200
Set window title before stting modified state
Fixes message "QWidget::setWindowModified: The window title does not
contain a '[*]' placeholder" when opening a non-existent file.
---
src/frontends/qt4/GuiView.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 4c67ff0..251b664 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -1170,12 +1170,6 @@ void GuiView::updateWindowTitle(GuiWorkArea * wa)
|| wa->bufferView().buffer().isInternal())
return;
Buffer const & buf = wa->bufferView().buffer();
- // Sets the path for the window: this is used by OSX to
- // allow a context click on the title bar showing a menu
- // with the path up to the file
- setWindowFilePath(toqstr(buf.absFileName()));
- // Tell Qt whether the current document is changed
- setWindowModified(!buf.isClean());
// Set the windows title
docstring title = buf.fileName().displayName(130) + from_ascii("[*]");
#ifndef Q_WS_MAC
@@ -1183,6 +1177,12 @@ void GuiView::updateWindowTitle(GuiWorkArea * wa)
title += from_ascii(" ") + char_type(0x2014) + from_ascii(" LyX");
#endif
setWindowTitle(toqstr(title));
+ // Sets the path for the window: this is used by OSX to
+ // allow a context click on the title bar showing a menu
+ // with the path up to the file
+ setWindowFilePath(toqstr(buf.absFileName()));
+ // Tell Qt whether the current document is changed
+ setWindowModified(!buf.isClean());
if (buf.isReadonly())
read_only_->show();