┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/informationpanel.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-01-07 20:14:43 +0000
committerPeter Penz <[email protected]>2010-01-07 20:14:43 +0000
commit199f9af8b6a58f59ac20a7a83438b3a6619b7991 (patch)
treece394f4e8effe18430892c277914877636a7fe94 /src/panels/information/informationpanel.cpp
parentc367bff8629194b7da731c7a5665340e2a2b68e9 (diff)
Fixed issue that the Information Panel might show the old filename after renaming an item.
Added implementation note, as a working code had been removed some time ago because of a performance bottleneck. BUG: 198375 svn path=/trunk/KDE/kdebase/apps/; revision=1071287
Diffstat (limited to 'src/panels/information/informationpanel.cpp')
-rw-r--r--src/panels/information/informationpanel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp
index 1f8e3b541..82b52e4f6 100644
--- a/src/panels/information/informationpanel.cpp
+++ b/src/panels/information/informationpanel.cpp
@@ -205,6 +205,15 @@ void InformationPanel::slotFileRenamed(const QString& source, const QString& des
if (m_shownUrl == KUrl(source)) {
m_shownUrl = KUrl(dest);
m_fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl);
+
+ if ((m_selection.count() == 1) && (m_selection[0].url() == KUrl(source))) {
+ m_selection[0] = m_fileItem;
+ // Implementation note: Updating the selection is only required if exactly one
+ // item is selected, as the name of the item is shown. If this should change
+ // in future: Before parsing the whole selection take care to test possible
+ // performance bottlenecks when renaming several hundreds of files.
+ }
+
showItemInfo();
}
}