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/views/dolphinview.cpp | |
| 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/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b68e8aa6a..2769d670d 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1071,17 +1071,15 @@ void DolphinView::slotModelChanged(KItemModelBase* current, KItemModelBase* prev void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons) { + Q_UNUSED(itemIndex); + hideToolTip(); - if (itemIndex < 0) { - // Trigger the history navigation only when clicking on the viewport: - // Above an item the XButtons provide a simple way to select items in - // the singleClick mode. - if (buttons & Qt::XButton1) { - emit goBackRequested(); - } else if (buttons & Qt::XButton2) { - emit goForwardRequested(); - } + // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton + if (buttons & Qt::XButton1) { + emit goBackRequested(); + } else if (buttons & Qt::XButton2) { + emit goForwardRequested(); } } |
