]> cloud.milkyroute.net Git - dolphin.git/commitdiff
DolphinView: Don't end anchored selection in updateSelectionState
authorAkseli Lahtinen <akselmo@akselmo.dev>
Thu, 24 Apr 2025 13:45:58 +0000 (16:45 +0300)
committerAkseli Lahtinen <akselmo@akselmo.dev>
Sat, 26 Apr 2025 18:22:09 +0000 (21:22 +0300)
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

index f3bde88df294c86499857be89d7d7706cb3e96e5..ee7ac51d26c270b359d6edf85c8bb1047b517810 100644 (file)
@@ -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());
                 }