From 0e7f8e29ad5f212ad4de89b4db10f3d7f8a3d558 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Tue, 7 Apr 2026 13:00:51 +0200 Subject: Revert "KItemListController: Use entire row for drag and drop if highlightEntireRow is true" This reverts commit 17e55c976581aa58b4500e426fb2925a3d45c308, making drag and drops on non-selected item rows count as drops on the folder of the view, which was the intended behaviour. The commit being reverted here makes it very difficult to drag and drop items between Dolphin windows, tabs, and split views, whenever the view is full of items. Drag and drop should be a natural and easy interaction with the file system, aiming at the margins to the sides of the view to even be able to drop an item is IMO very uncomfortable. This was also directly pointed out by Cristoph Feck in the bug report https://bugs.kde.org/show_bug.cgi?id=515439#c4. The bug report also has only one active requester and no duplicates. This is insufficient reason to encumber such a basic behaviour as drag and drop. --- src/kitemviews/kitemlistcontroller.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index 54e95e1d1..bf3ead273 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -1493,8 +1493,7 @@ KItemListWidget *KItemListController::widgetForDropPos(const QPointF &pos) const const auto widgets = m_view->visibleItemListWidgets(); for (KItemListWidget *widget : widgets) { const QPointF mappedPos = widget->mapFromItem(m_view, pos); - const QRectF highlightRect = m_view->highlightEntireRow() ? widget->selectionRectFull() : widget->selectionRectCore(); - if (highlightRect.contains(mappedPos)) { + if (widget->selectionRectCore().contains(mappedPos)) { return widget; } } -- cgit v1.3