diff options
| author | Frank Reininghaus <[email protected]> | 2014-05-13 18:42:05 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2014-05-13 18:42:05 +0200 |
| commit | 4cf04b91dd8804f2536fc31ae2f1b486bfc8cf9c (patch) | |
| tree | 75aee505fe55fabedf33fa202cc4b4e4f6481a71 /src/kitemviews/kitemlistselectionmanager.cpp | |
| parent | 7e92abb4ea2c2b269d21973bc9f2e76da5fb9114 (diff) | |
| parent | 5780fab172e02c3dd44082aa10d37cd87a98e29b (diff) | |
Merge remote-tracking branch 'origin/master' into frameworks
Since the master branch had never been merged into frameworks since the
creation of the frameworks branch, I had to fix a couple of merge
conflicts and make another change in order to make it build - I hope I
did not get anything wrong.
We should probably merge master into frameworks on a regular basis from
now on.
CCMAIL:[email protected]
Conflicts:
dolphin/src/dolphinmainwindow.cpp
dolphin/src/search/dolphinfacetswidget.cpp
dolphin/src/statusbar/dolphinstatusbar.cpp
dolphin/src/views/dolphinview.cpp
Diffstat (limited to 'src/kitemviews/kitemlistselectionmanager.cpp')
| -rw-r--r-- | src/kitemviews/kitemlistselectionmanager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/kitemviews/kitemlistselectionmanager.cpp b/src/kitemviews/kitemlistselectionmanager.cpp index ebff1a30e..1f0a89d06 100644 --- a/src/kitemviews/kitemlistselectionmanager.cpp +++ b/src/kitemviews/kitemlistselectionmanager.cpp @@ -331,6 +331,11 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL // Store the current selection (needed in the selectionChanged() signal) const KItemSet previousSelection = selectedItems(); + // endAnchoredSelection() adds all items between m_currentItem and + // m_anchorItem to m_selectedItems. They can then be moved + // individually later in this function. + endAnchoredSelection(); + // Update the current item if (m_currentItem >= itemRange.index && m_currentItem < itemRange.index + itemRange.count) { const int previousCurrentItem = m_currentItem; @@ -342,10 +347,8 @@ void KItemListSelectionManager::itemsMoved(const KItemRange& itemRange, const QL emit currentChanged(newCurrentItem, previousCurrentItem); } - // Update the anchor item - if (m_anchorItem >= itemRange.index && m_anchorItem < itemRange.index + itemRange.count) { - m_anchorItem = movedToIndexes.at(m_anchorItem - itemRange.index); - } + // Start a new anchored selection. + beginAnchoredSelection(m_currentItem); // Update the selections if (!m_selectedItems.isEmpty()) { |
