mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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.
This commit is contained in:
parent
b2f18e411a
commit
f7365aa9ca
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue