Bug 447215 - Unable to rename the last file in details view
Summary: Unable to rename the last file in details view
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 21.12.0
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
: 450020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-19 05:49 UTC by Kishore Gopalakrishnan
Modified: 2022-08-20 14:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.12.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kishore Gopalakrishnan 2021-12-19 05:49:54 UTC
SUMMARY
On one user account on my machine, Dolphin cannot rename the last file in any folder when the vertical scrollbar is shown (i.e. the list of files is not small enough to completely be shown in the window). When the last displayed file is selected, pressing F2 does nothing. Right-click > rename also does not do anything.

STEPS TO REPRODUCE
1. Navigate to any folder which has enough items that the list of files in Details View is larger than the height of the window.
2. Enable Details View (Ctrl+3)
3. Select the last folder
4. Press F2
5. Right-click on the folder and try to rename

OBSERVED RESULTS
Usually, when we try to rename a file, a textbox is shown inline. This does not happen in the last two steps above.

EXPECTED RESULTS
Renaming should work.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.10-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Memory: 21.5 GiB of RAM
Graphics Processor: AMD Radeon Vega 8 Graphics

ADDITIONAL INFORMATION
I cannot reproduce this in a fresh user account. I tried toggling various settings for Dolphin, but I haven't been able to figure out a configuration that allows me to reproduce this in a new user account. However, I am reporting this since I have been able to do a git bisect to isolate the relevant commit.

Reverting the following commit fixes the issue for me:

commit 7908aff3b5ebe4484d391c1fc4797e9dae2300b2
Author: Eugene Popov <popov895@ukr.net>
Date:   Mon Jul 12 00:31:06 2021 +0300

    [DetailsView] Improve zooming
    
    Under some conditions, when zooming, only the size of the icon is changed, but not the entire item, which visually doesn't look good. The main idea of this MR is that when scaling the whole element should be resized, not just the icon, so I came up with some zoom levels for the main icon sizes. With this commit, zooming will resize the entire element, even if the resizing of the icon doesn't affect the size of the entire element.

 src/kitemviews/kstandarditemlistwidget.cpp | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
Comment 1 Kishore Gopalakrishnan 2021-12-19 05:51:19 UTC
(In reply to Kishore Gopalakrishnan from comment #0)
> STEPS TO REPRODUCE
> 1. Navigate to any folder which has enough items that the list of files in
> Details View is larger than the height of the window.
> 2. Enable Details View (Ctrl+3)
> 3. Select the last folder
> 4. Press F2
> 5. Right-click on the folder and try to rename
> 

A small correction here: when I say 'last folder', I mean the last item displayed, whether it is a file or a folder.
Comment 2 Gianluca Pettinello 2022-01-22 13:44:51 UTC
+1 for me
Comment 3 Bug Janitor Service 2022-01-23 19:39:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/329
Comment 4 Bug Janitor Service 2022-01-24 14:19:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/330
Comment 5 Felix Ernst 2022-01-29 16:36:15 UTC
Git commit 43e915213e64f03d785c87cc5cf8db1c6b86a1a2 by Felix Ernst, on behalf of Eugene Popov.
Committed on 29/01/2022 at 16:35.
Pushed by felixernst into branch 'release/21.12'.

Revert "[DetailsView] Improve zooming"

This reverts commit 7908aff3b5ebe4484d391c1fc4797e9dae2300b2.

Reverting this commit will fix the issue of not being able to rename
the last file in Details View and will also make the items in Details
View and Compact View have the same height.
FIXED-IN: 21.12.2

M  +2    -16   src/kitemviews/kstandarditemlistwidget.cpp

https://invent.kde.org/system/dolphin/commit/43e915213e64f03d785c87cc5cf8db1c6b86a1a2
Comment 6 Kishore Gopalakrishnan 2022-08-20 14:14:23 UTC
*** Bug 450020 has been marked as a duplicate of this bug. ***