]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/information/informationpanel.cpp
Fix bottleneck when renaming several hundrets of items (the expensive update of m_sel...
[dolphin.git] / src / panels / information / informationpanel.cpp
index 2c9edcc18b4dd1858de5a14ad9353393e74ddf6c..30a41fefc2745d2ad392c6da26c14d934801a92e 100644 (file)
@@ -446,25 +446,9 @@ void InformationPanel::showPreview(const KFileItem& item,
 
 void InformationPanel::slotFileRenamed(const QString& source, const QString& dest)
 {
-    const KUrl sourceUrl = KUrl(source);
-
-    // Verify whether the renamed item is selected. If this is the case, the
-    // selection must be updated with the renamed item.
-    bool isSelected = false;
-    for (int i = m_selection.size() - 1; i >= 0; --i) {
-        if (m_selection[i].url() == sourceUrl) {
-            m_selection.removeAt(i);
-            isSelected = true;
-            break;
-        }
-    }
-
-    if ((m_shownUrl == sourceUrl) || isSelected) {
+    if (m_shownUrl == KUrl(source)) {
         m_shownUrl = KUrl(dest);
         m_fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl);
-        if (isSelected) {
-            m_selection.append(m_fileItem);
-        }
         showItemInfo();
     }
 }