Git: Save only current document on Undo Uncommitted Changes

Task-number: QTCREATORBUG-15622
Change-Id: I9927a344976aa323701cad0a58550e27fa552c08
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-03-09 22:18:06 +02:00
committed by Orgad Shaneh
parent 2d4c144fd3
commit c52f278573

View File

@@ -686,8 +686,10 @@ void GitPlugin::logRepository()
void GitPlugin::undoFileChanges(bool revertStaging)
{
if (!DocumentManager::saveAllModifiedDocuments())
return;
if (IDocument *document = EditorManager::currentDocument()) {
if (!DocumentManager::saveModifiedDocument(document))
return;
}
const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
FileChangeBlocker fcb(state.currentFile());