Close the other diff view when switching between diff views

Task-number: QTCREATORBUG-10203

Change-Id: If15fac2743768572d02ce9962b54dfaab4ca1af3
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
jkobus
2013-09-23 14:45:28 +02:00
committed by Jarek Kobus
parent fc7399bdf5
commit aa32c2be87

View File

@@ -101,6 +101,7 @@ public:
GitDiffSwitcher(Core::IEditor *parentEditor, GitClient *gitClient, GitClient::DiffEditorType switchToType) GitDiffSwitcher(Core::IEditor *parentEditor, GitClient *gitClient, GitClient::DiffEditorType switchToType)
: QObject(parentEditor), : QObject(parentEditor),
m_editor(parentEditor),
m_gitClient(gitClient), m_gitClient(gitClient),
m_editorType(switchToType) m_editorType(switchToType)
{ {
@@ -135,6 +136,7 @@ public slots:
void execute(); void execute();
private: private:
Core::IEditor *m_editor;
GitClient *m_gitClient; GitClient *m_gitClient;
QString m_workingDirectory; QString m_workingDirectory;
DiffType m_diffType; DiffType m_diffType;
@@ -173,6 +175,7 @@ void GitDiffSwitcher::execute()
default: default:
break; break;
} }
Core::EditorManager::closeEditor(m_editor, false);
} }
class GitDiffHandler : public QObject class GitDiffHandler : public QObject