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

Fix mouse back/forward buttons

We need to emit mouseButtonPressed (now in the onPress method) before the
check needed to not select items on back/foward mouse button press events.
parent 827b79f5
......@@ -550,17 +550,19 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
m_pressedMousePos = transform.map(event->pos());
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
if (event->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;
}
const Qt::MouseButtons buttons = event->buttons();
if (!onPress(event->screenPos(), event->pos(), event->modifiers(), buttons)) {
startRubberBand();
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;
}
......
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