Commit d0c537ca authored by Jarek Kobus's avatar Jarek Kobus Committed by Jarek Kobus

Mark file modified externally as modified after the prompt

In case when the user has chosen not to reload the file.

Task-number: QTCREATORBUG-17048
Change-Id: I4eb78af2dbc655ab5e0f3fa19f506aa2302d7877
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 59c90e00
......@@ -1052,6 +1052,7 @@ void DocumentManager::checkForReload()
documentsToClose << document;
} else if (defaultBehavior == IDocument::IgnoreAll) {
// content change or removed, but settings say ignore
document->setModified(true);
success = document->reload(&errorString, IDocument::FlagIgnore, type);
// either the default behavior is to always ask,
// or the ReloadUnmodified default behavior didn't kick in,
......@@ -1069,6 +1070,7 @@ void DocumentManager::checkForReload()
// content change, IDocument wants to ask user
if (previousReloadAnswer == ReloadNone) {
// answer already given, ignore
document->setModified(true);
success = document->reload(&errorString, IDocument::FlagIgnore, IDocument::TypeContents);
} else if (previousReloadAnswer == ReloadAll) {
// answer already given, reload
......@@ -1084,6 +1086,7 @@ void DocumentManager::checkForReload()
break;
case ReloadSkipCurrent:
case ReloadNone:
document->setModified(true);
success = document->reload(&errorString, IDocument::FlagIgnore, IDocument::TypeContents);
break;
case CloseCurrent:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment