diff options
| author | Frank Reininghaus <[email protected]> | 2014-03-01 12:14:47 +0100 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2014-03-01 12:14:47 +0100 |
| commit | eab1b76b76d3492c9787cc11a8e8460c69924dc7 (patch) | |
| tree | 2b559813db8ff8e0c2f01043c32226430b294e07 /src/kitemviews | |
| parent | b7404044470bb3ef241dced31839a1d18e70e3b0 (diff) | |
Always go back/forward in history when pressing the respective buttons
Before this patch, pressing one of these buttons while an item is
hovered selected this item. The motivation for this behavior was to
provide a fast way to select items. However, this was counter-intuitive
and confusing for many users.
BUG: 310288
FIXED-IN: 4.13.0
REVIEW: 116469
Diffstat (limited to 'src/kitemviews')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 7344b9960..61337d166 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -538,11 +538,10 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const m_pressedIndex = m_view->itemAt(m_pressedMousePos); emit mouseButtonPressed(m_pressedIndex, event->buttons()); - if ((event->buttons() & (Qt::XButton1 | Qt::XButton2)) && m_pressedIndex < 0) { - // Do not select items when clicking the empty part of the view with - // the back/forward buttons, see https://bugs.kde.org/show_bug.cgi?id=327412. - // Note that clicking an item with these buttons selects it, see comment in - // DolphinView::slotMouseButtonPressed(int, Qt::MouseButtons). + // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton + if (event->buttons() & (Qt::XButton1 | Qt::XButton2)) { + // Do not select items when clicking the back/forward buttons, see + // https://bugs.kde.org/show_bug.cgi?id=327412. return true; } |
