Bug 417930

Summary: Dolphin selects wrong file after renaming via "File already exists" window
Product: [Applications] dolphin Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: kfm-devel, mail, nate
Priority: NOR    
Version: 23.04.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 23.12

Description Patrick Silva 2020-02-20 14:06:17 UTC
STEPS TO REPRODUCE
1. have two files with the same extension, let's say two jpg files named file1.jpg and file2.jpg
2. try to remane file2.jpg to file1.jpg ("File already exists" dialog shows up)
3. type another filename, let's say "renamed", and press enter/return
4. 

OBSERVED RESULT
Dolphin selects file1.jpg file after renaming

EXPECTED RESULT
Dolphin should select renamed.jpg file after renaming

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.1
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Comment 1 Julian Steinmann 2020-02-28 21:19:09 UTC
Can confirm with Dolphin 20.03.70.
Comment 2 Bug Janitor Service 2023-07-31 07:04:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/579
Comment 3 Felix Ernst 2023-08-01 10:00:00 UTC
Git commit 567f2858acc260023c3e64112097f0dc1a39ea55 by Felix Ernst, on behalf of Amol Godbole.
Committed on 01/08/2023 at 11:59.
Pushed by felixernst into branch 'master'.

Fix incorrect file selection after file rename

forceUrlsSelection() needs to be called only when new name of renamed
file does not exist.

M  +2    -2    src/views/dolphinview.cpp

https://invent.kde.org/system/dolphin/-/commit/567f2858acc260023c3e64112097f0dc1a39ea55