forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
2d4c144fd3
commit
c52f278573
@@ -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());
|
||||
|
Reference in New Issue
Block a user