┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.cpp
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2022-05-26 10:38:15 +0200
committerFelix Ernst <[email protected]>2022-05-27 10:00:05 +0000
commitf7365aa9ca9d1242cb2a0c4505c64e2ab05e0d67 (patch)
treec4fb2ee222efc4e07a14b3fcba154f8db146f66b /src/kitemviews/kitemlistcontroller.cpp
parentb2f18e411a929665257dad8c6a51f3e2e617cee5 (diff)
Remove hover highlight before opening view context menu
If one was fast to open the right-click context menu on the row of an item in details view mode, the hover highlight would persist while the context menu for the view was open. This one-liner makes it so the highlight on the row is always removed before the right-click context menu for the view is opened so it is as clear as possible that the newly opened context menu has no relation to the fileItem.
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 4d926474b..d6d276fa4 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -1594,6 +1594,7 @@ bool KItemListController::onPress(const QPoint& screenPos, const QPointF& pos, c
// The selection rectangle for an item was clicked
Q_EMIT itemContextMenuRequested(m_pressedIndex.value(), screenPos);
} else {
+ row->setHovered(false); // Removes the hover highlight so the context menu doesn't look like it applies to the row.
Q_EMIT viewContextMenuRequested(screenPos);
}
return true;