summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-10-28 09:00:50 +0200
committerOrgad Shaneh <orgads@gmail.com>2018-10-28 11:51:33 +0000
commitce15a0f44799c4d04ea4898f48ed3c06b2e6770c (patch)
tree7317a3ea4b0f24822b8709f365faf9f726d741e0 /src/plugins
parent4c82dd6d120e07b382a7ac59b2dd0d8212dab955 (diff)
downloadqt-creator-ce15a0f44799c4d04ea4898f48ed3c06b2e6770c.tar.gz
Git: Fix detection of current selected index
Comparing the row is not enough. Row is relative to the parent, so the second row in locals was wrongfully considered identical to the second row in a remote. This amends commit 299c777c019fb9573b31034e3ca327e6ca59c500. Change-Id: I4c5e43e3107a1f01bbed7abf9b7e2a2d3feb4feb Reviewed-by: André Hartmann <aha_1980@gmx.de>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/git/branchview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/git/branchview.cpp b/src/plugins/git/branchview.cpp
index c37bc87abb..9268d3d6e0 100644
--- a/src/plugins/git/branchview.cpp
+++ b/src/plugins/git/branchview.cpp
@@ -194,7 +194,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
const QModelIndex index = m_filterModel->mapToSource(filteredIndex);
const QModelIndex currentBranch = m_model->currentBranch();
- const bool currentSelected = index.row() == currentBranch.row();
+ const bool currentSelected = index.sibling(index.row(), 0) == currentBranch;
const bool isLocal = m_model->isLocal(index);
const bool isTag = m_model->isTag(index);
const bool hasActions = m_model->isLeaf(index);