From: Amol Godbole Date: Tue, 1 Aug 2023 09:59:57 +0000 (+0000) Subject: Fix incorrect file selection after file rename X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/567f2858acc260023c3e64112097f0dc1a39ea55 Fix incorrect file selection after file rename forceUrlsSelection() needs to be called only when new name of renamed file does not exist. BUG: 417930 --- diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 9666ca2ab..fba7e6419 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -2063,9 +2063,9 @@ void DolphinView::slotRoleEditingFinished(int index, const QByteArray &role, con KIO::FileUndoManager::self()->recordJob(KIO::FileUndoManager::Rename, {oldUrl}, newUrl, job); job->uiDelegate()->setAutoErrorHandlingEnabled(true); - forceUrlsSelection(newUrl, {newUrl}); - if (!newNameExistsAlready) { + forceUrlsSelection(newUrl, {newUrl}); + // Only connect the result signal if there is no item with the new name // in the model yet, see bug 328262. connect(job, &KJob::result, this, &DolphinView::slotRenamingResult);