forked from qt-creator/qt-creator
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 299c777c01
.
Change-Id: I4c5e43e3107a1f01bbed7abf9b7e2a2d3feb4feb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
4c82dd6d12
commit
ce15a0f447
@@ -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);
|
||||
|
Reference in New Issue
Block a user