Commit aa12f9ec authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Don't trigger rubberband with back/foward mouse buttons

Right now the back/foward mouse buttons work, but also if you hold either
of them and move the mouse the rubberband selection is triggered.

This is the correct fix (instead of commit d0c71a14), to match the
original code before the touch events patches,  we need to check the
back/foward buttons after mouseButtonPressed is emitted and before
triggering the rubberbad selection.
parent 3d8bb6c3
......@@ -557,12 +557,6 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
return false;
}
if (buttons & (Qt::BackButton | Qt::ForwardButton)) {
// Do not select items when clicking the back/forward buttons, see
// https://bugs.kde.org/show_bug.cgi?id=327412.
return true;
}
return true;
}
......@@ -1423,6 +1417,12 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c
{
emit mouseButtonPressed(m_pressedIndex, buttons);
if (buttons & (Qt::BackButton | Qt::ForwardButton)) {
// Do not select items when clicking the back/forward buttons, see
// https://bugs.kde.org/show_bug.cgi?id=327412.
return true;
}
if (m_view->isAboveExpansionToggle(m_pressedIndex, m_pressedMousePos)) {
m_selectionManager->endAnchoredSelection();
m_selectionManager->setCurrentItem(m_pressedIndex);
......
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