Commit 89523c14 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Allow merge and rebase for detached HEAD



Change-Id: Ia00c061b1f4a705cf815052921e6f6cf43d0867d
Reviewed-by: default avatarPetar Perisin <petar.perisin@gmail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 804c9426
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment