From 91653bb1749e92fa0adadb7e618d443cca776351 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Sun, 16 Oct 2011 20:39:34 +0200 Subject: [PATCH] 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 --- src/views/dolphinview.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 selectedIndexes = selectionManager->selectedItems(); + QList sortedIndexes = selectedIndexes.toList(); + qSort(sortedIndexes); + KFileItemList selectedItems; QSetIterator it(selectedIndexes); while (it.hasNext()) { -- 2.47.3