Gui: [skip ci] avoid adding a wrong file name to the recent files list

This commit is contained in:
wmayer
2020-12-18 14:35:17 +01:00
parent 5f497ab37a
commit a7506326c9

View File

@@ -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());
}