diff options
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistcontroller.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 7ef37481d..994812b1f 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -13,10 +13,11 @@ #include "kitemlistview.h" #include "private/kitemlistkeyboardsearchmanager.h" #include "private/kitemlistrubberband.h" -#include "private/ktwofingerswipe.h" -#include "private/ktwofingertap.h" #include "views/draganddrophelper.h" +#include <KTwoFingerSwipe> +#include <KTwoFingerTap> + #include <QAccessible> #include <QApplication> #include <QDrag> @@ -1496,6 +1497,7 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c const bool shiftPressed = modifiers & Qt::ShiftModifier; const bool controlPressed = modifiers & Qt::ControlModifier; + const bool leftClick = buttons & Qt::LeftButton; const bool rightClick = buttons & Qt::RightButton; // The previous selection is cleared if either @@ -1599,8 +1601,8 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c break; case MultiSelection: - if (controlPressed && !shiftPressed) { - // A mouse button press is happening on an item while control is pressed. This either means a user wants to: + if (controlPressed && !shiftPressed && leftClick) { + // A left mouse button press is happening on an item while control is pressed. This either means a user wants to: // - toggle the selection of item(s) or // - they want to begin a drag on the item(s) to copy them. // We rule out the latter, if the item is not clicked directly and was unselected previously. |
