From: Akseli Lahtinen Date: Thu, 21 Nov 2024 12:42:45 +0000 (+0000) Subject: DolphinView: beginAnchoredSelection after setSelected in selectNextItem X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/fd3f4e5fc1d7360004299a9d5ffa9b5571e7b1e9 DolphinView: beginAnchoredSelection after setSelected in selectNextItem Currently when next item is set selected, it's not set as an anchor. This means that shift-click will not select items between the selection and the next item, and instead behaves like ctrl-click. This is rather inconsistent behavior. We should set the next selected item as an anchor so that shift-click will work: This change starts the `beginAnchoredSelection` process after `setSelection`. For example, if user trashes an item and the next item is selected, shift-click would stop working. BUG:495371 --- diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 6da285a87..c12e3d5f7 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1881,6 +1881,7 @@ void DolphinView::selectNextItem() } if (nextItem >= 0) { selectionManager->setSelected(nextItem, 1); + selectionManager->beginAnchoredSelection(nextItem); } m_selectNextItem = false; }