┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmol Godbole <[email protected]>2024-04-01 23:14:13 -0500
committerFelix Ernst <[email protected]>2024-04-05 13:47:10 +0000
commit24268a4df5d4fe0a856d17ca878d793527a1188e (patch)
treeea22f8ad233b0e2b801716942bfc05c3d66aff7b /src
parent282e809b341d8885fe91122bc510e5992e797cee (diff)
KItemListController: don't create rubber band for a right click in an empty region
Rubber band was being incorrectly created for a right click in an empty region. Handle this case in KItemListController::onPress(). BUG: 484881
Diffstat (limited to 'src')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 3ab20640c..2cda2987b 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -1698,6 +1698,11 @@ bool KItemListController::onPress(const QPointF &pos, const Qt::KeyboardModifier
rubberBand->setActive(false);
m_view->setAutoScroll(false);
}
+
+ if (!m_pressedIndex.has_value()) {
+ // We have a right-click in an empty region, don't create rubber band.
+ return true;
+ }
}
if (m_pressedIndex.has_value()) {