X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a4f16761fc273eb20f778c85e88c80a0d73db82a..29778152ad:/src/kitemviews/kitemlistselectionmanager.cpp diff --git a/src/kitemviews/kitemlistselectionmanager.cpp b/src/kitemviews/kitemlistselectionmanager.cpp index f5e097c02..d16c5e2d3 100644 --- a/src/kitemviews/kitemlistselectionmanager.cpp +++ b/src/kitemviews/kitemlistselectionmanager.cpp @@ -331,6 +331,9 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL // Store the current selection (needed in the selectionChanged() signal) const KItemSet previousSelection = selectedItems(); + // Store whether we were doing an anchored selection + const bool wasInAnchoredSelection = isAnchoredSelectionActive(); + // endAnchoredSelection() adds all items between m_currentItem and // m_anchorItem to m_selectedItems. They can then be moved // individually later in this function. @@ -348,7 +351,9 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL } // Start a new anchored selection. - beginAnchoredSelection(m_currentItem); + if (wasInAnchoredSelection) { + beginAnchoredSelection(m_currentItem); + } // Update the selections if (!m_selectedItems.isEmpty()) {