File: upstream_b64bf8ca_DolphinView-Don-t-end-anchored-selection-in-updateSelectionState.patch

package info (click to toggle)
dolphin 4%3A25.04.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 31,252 kB
  • sloc: cpp: 46,852; xml: 878; ruby: 164; python: 84; sh: 11; makefile: 11
file content (33 lines) | stat: -rw-r--r-- 1,281 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From b64bf8ca69c473de973eddef3d137fea80acb968 Mon Sep 17 00:00:00 2001
From: Akseli Lahtinen <akselmo@akselmo.dev>
Date: Thu, 24 Apr 2025 16:45:58 +0300
Subject: [PATCH] DolphinView: Don't end anchored selection in
 updateSelectionState

Do not end anchored selection when selection state is updated, such as
when Dolphin is started with --select "thing.txt" flag.

If we end here, and user wants to press shift to select from
current item to X items, this would cause the anchored selection
to start from the clicked item, not from the first selected item.

BUG: 503221
---
 src/views/dolphinview.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index f3bde88df2..ee7ac51d26 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -1776,7 +1776,6 @@ void DolphinView::updateSelectionState()
             if (!selectedItems.isEmpty()) {
                 selectionManager->beginAnchoredSelection(selectionManager->currentItem());
                 selectionManager->setSelectedItems(selectedItems);
-                selectionManager->endAnchoredSelection();
                 if (shouldScrollToCurrentItem) {
                     m_view->scrollToItem(selectedItems.first());
                 }
-- 
GitLab