Bug 445826

Summary: after undoing rename, dolphin view doesn't change
Product: [Applications] dolphin Reporter: glyphimor
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: fanzhuyifan, kfm-devel
Priority: NOR    
Version First Reported In: 23.08.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description glyphimor 2021-11-20 16:47:27 UTC
SUMMARY

In Dolphin, when you rename an item (file, folder, etc.) in a directory, the item's icon or row may move to a different position based on the directory's Sort By. If there are too many items to fit in the Dolphin window, when you rename the item and its position changes, Dolphin's view changes to show the file's new position. When you undo the rename, the item moves back to its original position; however, Dolphin's view doesn't change -- the item is no longer visible.

STEPS TO REPRODUCE
1. Run these commands:

```
mkdir tmp
cd tmp
for i in {1..20}; do touch "$i"; done
dolphin .
```
2. In the Dolphin window, sort by Name
3. If necessary, reduce the size of the Dolphin window until not all the files are visible (i.e. the scrollbar appears)
4. Rename 1 to 21
5. Undo

OBSERVED RESULT

After 3, Dolphin view moved from the top of the directory to the bottom, but after 4, view stayed at the bottom.

EXPECTED RESULT

After 4, Dolphin view should have returned to the top of the directory.

SOFTWARE/OS VERSIONS
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Same behavior occurs in both Details view and Icons view.