diff options
| author | Frank Reininghaus <[email protected]> | 2011-10-16 20:39:34 +0200 |
|---|---|---|
| committer | Frank Reininghaus <[email protected]> | 2011-10-16 20:39:34 +0200 |
| commit | 91653bb1749e92fa0adadb7e618d443cca776351 (patch) | |
| tree | 8b7bd7153935e43b2f1054da118cd98083a140c7 /src/views/dolphinview.cpp | |
| parent | 283f97ac27c3cfe5c72682b0843503e31643a612 (diff) | |
Sort the items in DolphinView::selectedItems()
Before this commit, the order of the items in the list returned by
DolphinView::selectedItems() was random. Now the items are sorted like
they are sorted in the view.
BUG: 283409
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 871de946b..122c18de7 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -339,6 +339,9 @@ 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; QSetIterator<int> it(selectedIndexes); while (it.hasNext()) { |
