Commit 3a9b3271 authored by Emmanuel Pescosta's avatar Emmanuel Pescosta

Fix Bug 287829 - inline rename multiple files does not honour

 sort order

BUG: 287829
FIXED-IN: 4.9.5
REVIEW: 107718
parent 78e46d2f
......@@ -342,10 +342,12 @@ int DolphinView::itemsCount() const
KFileItemList DolphinView::selectedItems() const
{
const KItemListSelectionManager* selectionManager = m_container->controller()->selectionManager();
const QSet<int> selectedIndexes = selectionManager->selectedItems();
QList<int> selectedIndexes = selectionManager->selectedItems().toList();
qSort(selectedIndexes);
KFileItemList selectedItems;
QSetIterator<int> it(selectedIndexes);
QListIterator<int> it(selectedIndexes);
while (it.hasNext()) {
const int index = it.next();
selectedItems.append(m_model->fileItem(index));
......
......@@ -162,11 +162,6 @@ void RenameDialog::slotTextChanged(const QString& newName)
void RenameDialog::renameItems()
{
// Currently the items are sorted by the selection order, resort
// them by the filename. This assures that the new sort order is similar to
// the current filename sort order.
qSort(m_items.begin(), m_items.end(), lessThan);
// Iterate through all items and rename them...
int index = m_spinBox->value();
foreach (const KFileItem& item, m_items) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment