┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanel.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-06-19 19:13:08 +0000
committerPeter Penz <[email protected]>2009-06-19 19:13:08 +0000
commitf8c3c95a40f59786effe4f55fb84d7f470c8aa1e (patch)
tree9b3918961fc97d657dd6ebacaf6178863e02f6b0 /src/panels/information/informationpanel.cpp
parent0f59dc3af0c7da1f931537b667bdb3e5fe5559a4 (diff)
Fix bottleneck when renaming several hundrets of items (the expensive update of m_selection is not required).
svn path=/trunk/KDE/kdebase/apps/; revision=984020
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
-rw-r--r--src/panels/information/informationpanel.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 2c9edcc18..30a41fefc 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -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();
}
}