diff options
| author | Peter Penz <[email protected]> | 2011-12-30 00:02:17 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-30 00:08:37 +0100 |
| commit | acee6d0fc59e1c1c5e1d842620245ee3d1e514b7 (patch) | |
| tree | 2b3d5e943a307ef5c93c6ad623b5482f22306b69 /src/views/dolphinview.cpp | |
| parent | d7a803cae025c0d5adcf70ddf256fbcc8140827e (diff) | |
Fix inconsistency in selection manager
When a selection has been done with non-linear ranges, it was possible that
the anchor item pointed to an invalid index that resulted into an invalid
selection.
As part of this fix the sorting for DolphinView::selectedItems() has been
disabled (if the caller assumes a sorted selection he must manually adjust it).
BUG: 288908
FIXED-IN: 4.8.0
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index f17749b83..a31bf566d 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -311,11 +311,8 @@ KFileItemList DolphinView::selectedItems() const const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager(); const QSet<int> selectedIndexes = selectionManager->selectedItems(); - QList<int> sortedIndexes = selectedIndexes.toList(); - qSort(sortedIndexes); - KFileItemList selectedItems; - QListIterator<int> it(sortedIndexes); + QSetIterator<int> it(selectedIndexes); while (it.hasNext()) { const int index = it.next(); selectedItems.append(model->fileItem(index)); |
