mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
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.
This commit is contained in:
parent
c79b7c1496
commit
9313f8565b
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user