From: Peter Penz Date: Sat, 20 Jun 2009 09:13:39 +0000 (+0000) Subject: clear the selection before renaming multiple items X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/35a0eca331f475e2751614f782c2710fc93cfebd?ds=inline clear the selection before renaming multiple items svn path=/trunk/KDE/kdebase/apps/; revision=984159 --- diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index 8278d136a..06805eefc 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -329,6 +329,7 @@ void DolphinView::clearSelection() const QModelIndex currentIndex = selModel->currentIndex(); selModel->setCurrentIndex(currentIndex, QItemSelectionModel::Current | QItemSelectionModel::Clear); + m_selectedItems.clear(); } KFileItemList DolphinView::selectedItems() const @@ -656,6 +657,10 @@ void DolphinView::renameSelectedItems() return; } delete dialog; + + // the selection would be invalid after renaming the items, so just clear + // it before + clearSelection(); // TODO: check how this can be integrated into KIO::FileUndoManager/KonqOperations // as one operation instead of n rename operations like it is done now...