forked from qt-creator/qt-creator
Git: Save silently on undo actions
If the user wants to undo, first save the file silently. Then the user is still able to cancel the undo operation. Task-number: QTCREATORBUG-16647 Change-Id: I61ac42ff41f3f7758d662692bc92850766beab8e Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
516161c875
commit
53cbc9d30c
@@ -718,7 +718,7 @@ void GitPlugin::logRepository()
|
|||||||
void GitPlugin::undoFileChanges(bool revertStaging)
|
void GitPlugin::undoFileChanges(bool revertStaging)
|
||||||
{
|
{
|
||||||
if (IDocument *document = EditorManager::currentDocument()) {
|
if (IDocument *document = EditorManager::currentDocument()) {
|
||||||
if (!DocumentManager::saveModifiedDocument(document))
|
if (!DocumentManager::saveModifiedDocumentSilently(document))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const VcsBasePluginState state = currentState();
|
const VcsBasePluginState state = currentState();
|
||||||
|
Reference in New Issue
Block a user