From 132f0e2bf3f2e6faff7be1ccce0709cd72a4ebc0 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 5 Mar 2013 19:40:29 +0200 Subject: [PATCH] Git: Update details when working directory is changed Change-Id: I48436f6c5a44a9c41e18b60e2e2c7c4204645528 Reviewed-by: Petar Perisin Reviewed-by: Tobias Hunger --- src/plugins/git/changeselectiondialog.cpp | 8 +++++++- src/plugins/git/changeselectiondialog.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index 4b9da9448e3..49e01e25d59 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -60,7 +60,8 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, QW m_gitEnvironment = GitPlugin::instance()->gitClient()->processEnvironment(); connect(m_ui.changeNumberEdit, SIGNAL(textChanged(QString)), this, SLOT(recalculateDetails(QString))); - recalculateDetails(m_ui.changeNumberEdit->text()); + connect(m_ui.workingDirectoryEdit, SIGNAL(textChanged(QString)), this, SLOT(refresh())); + refresh(); } ChangeSelectionDialog::~ChangeSelectionDialog() @@ -140,5 +141,10 @@ void ChangeSelectionDialog::recalculateDetails(const QString &ref) m_ui.detailsText->setPlainText(tr("Fetching commit data...")); } +void ChangeSelectionDialog::refresh() +{ + recalculateDetails(m_ui.changeNumberEdit->text()); +} + } // Internal } // Git diff --git a/src/plugins/git/changeselectiondialog.h b/src/plugins/git/changeselectiondialog.h index 6a78093e298..230c4966c7c 100644 --- a/src/plugins/git/changeselectiondialog.h +++ b/src/plugins/git/changeselectiondialog.h @@ -57,6 +57,7 @@ public slots: private slots: void setDetails(int exitCode); void recalculateDetails(const QString &ref); + void refresh(); private: Ui_ChangeSelectionDialog m_ui;