From a7506326c9af96db4c4a8a345d184077ea2e8ff6 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 18 Dec 2020 14:35:17 +0100 Subject: [PATCH] Gui: [skip ci] avoid adding a wrong file name to the recent files list --- src/Gui/Document.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index e6463eec6a..51e97c648a 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -1189,6 +1189,8 @@ bool Document::saveAs(void) escapedstr = Base::Tools::escapeEncodeFilename(escapedstr); Command::doCommand(Command::Doc,"App.getDocument(\"%s\").saveAs(u\"%s\")" , DocName, escapedstr.c_str()); + // App::Document::saveAs() may modify the passed file name + fi.setFile(QString::fromUtf8(d->_pcDocument->FileName.getValue())); setModified(false); getMainWindow()->appendRecentFile(fi.filePath()); }