mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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
This commit is contained in:
parent
c367bff862
commit
199f9af8b6
1 changed files with 9 additions and 0 deletions
|
@ -205,6 +205,15 @@ void InformationPanel::slotFileRenamed(const QString& source, const QString& des
|
||||||
if (m_shownUrl == KUrl(source)) {
|
if (m_shownUrl == KUrl(source)) {
|
||||||
m_shownUrl = KUrl(dest);
|
m_shownUrl = KUrl(dest);
|
||||||
m_fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl);
|
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();
|
showItemInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue