From 299c777c019fb9573b31034e3ca327e6ca59c500 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Fri, 12 Oct 2018 19:43:33 +0200 Subject: [PATCH] Git: Fix context menu actions in BranchViews second column m_branchView->indexAt(point) returned another model index [column 1] than m_model->currentBranch() [column 0], if the context menu was requested in thesecond (date/time) column. The failed comparison then gave a lot of invalid actions (like merge) for the current branch. Change-Id: Icefc084c81f9b573cd151460db793d3c5a01eb2b Reviewed-by: Orgad Shaneh --- src/plugins/git/branchview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp index 11cbfcdbcf9..095cbcedcfa 100644 --- a/src/plugins/git/branchview.cpp +++ b/src/plugins/git/branchview.cpp @@ -166,7 +166,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point) return; const QModelIndex currentBranch = m_model->currentBranch(); - const bool currentSelected = index == currentBranch; + const bool currentSelected = index.row() == currentBranch.row(); const bool isLocal = m_model->isLocal(index); const bool isTag = m_model->isTag(index); const bool hasActions = m_model->isLeaf(index);