Bug 257401 - Dolphin doesn't walk through the file list with very long file names in Details View using arrow keys.
Summary: Dolphin doesn't walk through the file list with very long file names in Detai...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: investigated
Depends on:
Blocks:
 
Reported: 2010-11-20 11:26 UTC by slavrn
Modified: 2010-11-20 18:53 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slavrn 2010-11-20 11:26:30 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

When doplhin is in table view mode and there is a file with a long name (for about ~100 characters and the invisible part of the name should be >50 characters), walking through the list using up/down arrows bypasses this file, doesn't make it selected.
If file name exceeds ~200 characters, after reaching it selection moves to the top of the list, and there is no way to reach any items after that file, list becomes ringed.

Reproducible: Always

Steps to Reproduce:
There are two reproduce cases:
------------------------------
1.1. Using dolphin table view mode and sorting by name.
1.2. Create files with names "1","2","3","4","6","7","8","9".
1.3. Create a file with name starting at "5_" and having ~100 characters. A part of the name will be hidden, the important thing is that hidden part should be >50 characters long. If it doesn't, change the size of "name" column to adjust it.
1.4. Press down arrow key to walk from the top to the bottom of the file list.
------------------------------
2.1. Using dolphin table view mode and sorting by name.
2.2. Create files with names "1","2","3","4","6","7","8","9".
2.3. Create a file with name starting at "5_" and having >200 characters.
2.4. Press down arrow key to walk from the top to the bottom of the file list.
------------------------------

Actual Results:  
1.4 The file with long name doesn't become selected.
------------------------------
2.4 After reaching the file with long name, selection moves to the top of the list.

Expected Results:  
1.4. All files in the list become selected one by one
------------------------------
2.4. All files in the list become selected one by one

Problem is reproducible only in table view mode.
Using latest Debian Squeeze packages.
Comment 1 Frank Reininghaus 2010-11-20 12:01:15 UTC
Thanks for the bug report! I can confirm both issues in 4.4.4 (Opensuse). I think we've had a report about the first one already, but I can't find it at the moment.

The first issue (file with long name is not selected) appears to be fixed in 4.5.x and trunk.

The second issue (selection/current item jumps to the top) is still present in 4.5 and trunk. I'm pretty sure I know what the cause of the bug is - in DolphinDetailsView::visualRect(...), the width is replaced by the width of the file name, but this causes problems because this may be wider than the "Name" column. Qt uses the center of the visual rect internally to keep track of the current item, and if the center of the visualRect is outside the "Name" column, it goes wrong. Will try to fix it later today or tomorrow.
Comment 2 Frank Reininghaus 2010-11-20 18:51:11 UTC
Small correction: the first issue is not fixed yet. I just didn't see it first because the column width settings were different for my 4.5 branch and trunk users.

I'll commit a fix for both issues in a minute
Comment 3 Frank Reininghaus 2010-11-20 18:53:14 UTC
SVN commit 1199123 by freininghaus:

Make sure that an item's visualRect in the Details View is not wider
than the "Name" column. Fixes keyboard navigation problems if files
with very wide names are present in the current folder.

Unit test included.

CCBUG: 257401



 M  +53 -0     tests/dolphindetailsviewtest.cpp  
 M  +3 -0      views/dolphindetailsview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1199123
Comment 4 Frank Reininghaus 2010-11-20 18:53:53 UTC
SVN commit 1199124 by freininghaus:

Make sure that an item's visualRect in the Details View is not wider
than the "Name" column. Fixes keyboard navigation problems if files
with very wide names are present in the current folder.

Unit test included.

BUG: 257401
FIXED-IN: 4.5.4



 M  +3 -0      dolphindetailsview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1199124