mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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.
This commit is contained in:
parent
827b79f5c8
commit
d0c71a1435
1 changed files with 8 additions and 6 deletions
|
@ -550,17 +550,19 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
|
||||||
m_pressedMousePos = transform.map(event->pos());
|
m_pressedMousePos = transform.map(event->pos());
|
||||||
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
|
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
|
||||||
|
|
||||||
if (event->buttons() & (Qt::BackButton | Qt::ForwardButton)) {
|
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
|
// Do not select items when clicking the back/forward buttons, see
|
||||||
// https://bugs.kde.org/show_bug.cgi?id=327412.
|
// https://bugs.kde.org/show_bug.cgi?id=327412.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Qt::MouseButtons buttons = event->buttons();
|
|
||||||
if (!onPress(event->screenPos(), event->pos(), event->modifiers(), buttons)) {
|
|
||||||
startRubberBand();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue