From aa32c2be87f7192e03f06b8b5223100354e269a6 Mon Sep 17 00:00:00 2001 From: jkobus <jaroslaw.kobus@digia.com> Date: Mon, 23 Sep 2013 14:45:28 +0200 Subject: [PATCH] Close the other diff view when switching between diff views Task-number: QTCREATORBUG-10203 Change-Id: If15fac2743768572d02ce9962b54dfaab4ca1af3 Reviewed-by: Orgad Shaneh <orgads@gmail.com> --- src/plugins/git/gitclient.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index fa190062fe5..4de3a026d2f 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -101,6 +101,7 @@ public: GitDiffSwitcher(Core::IEditor *parentEditor, GitClient *gitClient, GitClient::DiffEditorType switchToType) : QObject(parentEditor), + m_editor(parentEditor), m_gitClient(gitClient), m_editorType(switchToType) { @@ -135,6 +136,7 @@ public slots: void execute(); private: + Core::IEditor *m_editor; GitClient *m_gitClient; QString m_workingDirectory; DiffType m_diffType; @@ -173,6 +175,7 @@ void GitDiffSwitcher::execute() default: break; } + Core::EditorManager::closeEditor(m_editor, false); } class GitDiffHandler : public QObject -- GitLab