summaryrefslogtreecommitdiff
path: root/src/plugins/git/branchdialog.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-06-12 11:05:56 +0300
committerOrgad Shaneh <orgads@gmail.com>2013-06-13 17:20:15 +0200
commit89523c14679d90535dba4f98dacc8302edfa9802 (patch)
tree127181c024cf8282aa5774ad0031eb1dcc8ab93f /src/plugins/git/branchdialog.cpp
parent804c94262e3a87e9f4032c79ccea62101b915156 (diff)
downloadqt-creator-89523c14679d90535dba4f98dacc8302edfa9802.tar.gz
Git: Allow merge and rebase for detached HEAD
Change-Id: Ia00c061b1f4a705cf815052921e6f6cf43d0867d Reviewed-by: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/branchdialog.cpp')
-rw-r--r--src/plugins/git/branchdialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/git/branchdialog.cpp b/src/plugins/git/branchdialog.cpp
index e57ff1bd0f..001664f2f2 100644
--- a/src/plugins/git/branchdialog.cpp
+++ b/src/plugins/git/branchdialog.cpp
@@ -104,15 +104,14 @@ void BranchDialog::enableButtons()
const bool currentSelected = hasSelection && idx == m_model->currentBranch();
const bool isLocal = m_model->isLocal(idx);
const bool isLeaf = m_model->isLeaf(idx);
- const bool currentLocal = m_model->isLocal(m_model->currentBranch());
m_ui->removeButton->setEnabled(hasSelection && !currentSelected && isLocal && isLeaf);
m_ui->renameButton->setEnabled(hasSelection && isLocal && isLeaf);
m_ui->logButton->setEnabled(hasSelection && isLeaf);
m_ui->diffButton->setEnabled(hasSelection && isLeaf);
m_ui->checkoutButton->setEnabled(hasSelection && !currentSelected && isLeaf);
- m_ui->rebaseButton->setEnabled(hasSelection && !currentSelected && isLeaf && currentLocal);
- m_ui->mergeButton->setEnabled(hasSelection && !currentSelected && isLeaf && currentLocal);
+ m_ui->rebaseButton->setEnabled(hasSelection && !currentSelected && isLeaf);
+ m_ui->mergeButton->setEnabled(hasSelection && !currentSelected && isLeaf);
}
void BranchDialog::refresh()