Core: Tweak handling of scratch buffer

If a temporary file is stored by using "Save As..."
the temporary state should get lost to properly handle
other actions, like closing a modified file, putting it
into the recent files list, or similar.

Change-Id: I94b3141bad1bd476056a774756071df5f60137aa
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2022-11-15 10:21:42 +01:00
parent e3b84dca1a
commit 8bbeef1f98

View File

@@ -2534,6 +2534,9 @@ bool EditorManagerPrivate::saveDocumentAs(IDocument *document)
// re-think part of the editors design.
if (success) {
// if document had been temporary before (scratch buffer) - remove the temporary flag
document->setTemporary(false);
addDocumentToRecentFiles(document);
emit m_instance->saved(document);
}