forked from qt-creator/qt-creator
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:
@@ -2534,6 +2534,9 @@ bool EditorManagerPrivate::saveDocumentAs(IDocument *document)
|
|||||||
// re-think part of the editors design.
|
// re-think part of the editors design.
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
// if document had been temporary before (scratch buffer) - remove the temporary flag
|
||||||
|
document->setTemporary(false);
|
||||||
|
|
||||||
addDocumentToRecentFiles(document);
|
addDocumentToRecentFiles(document);
|
||||||
emit m_instance->saved(document);
|
emit m_instance->saved(document);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user