Git: Fix opening repository log when commit editor is open

Opening a commit editor inside a submodule then executing
Local Repository Log opens the log for the supermodule.

Change-Id: I264925e0f23e2372a09a28e788174a747f5870a8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2014-07-14 22:35:23 +03:00
committed by Orgad Shaneh
parent 5189c990aa
commit 616ea2e5bb
2 changed files with 4 additions and 3 deletions

View File

@@ -237,9 +237,8 @@ void StateListener::slotStateChanged()
state.currentFile.clear();
} else {
state.currentFile = currentDocument->filePath();
if (state.currentFile.isEmpty()) {
if (state.currentFile.isEmpty() || currentDocument->isTemporary())
state.currentFile = VcsBasePlugin::source(currentDocument);
}
}
QScopedPointer<QFileInfo> currentFileInfo; // Instantiate QFileInfo only once if required.
if (!state.currentFile.isEmpty()) {