diff options
| author | Peter Penz <[email protected]> | 2011-12-30 00:02:17 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-12-30 00:09:42 +0100 |
| commit | 7953913c9f4223c726a34178cd69010dfaea3f58 (patch) | |
| tree | 2c719f90ff17b988569379db5c5b456093ac7830 /src/views/dolphinview.cpp | |
| parent | dec1a1b29d3a384a92163d0a97f8e65e1a0082e3 (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)); |
