Bug 300582 - Can not use left arrow key to quick navigate to parent directory in treeview mode
Summary: Can not use left arrow key to quick navigate to parent directory in treeview ...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 2.0
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-05-25 00:07 UTC by linnets
Modified: 2012-05-30 07:27 UTC (History)
1 user (show)

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


Attachments
Patch (919 bytes, patch)
2012-05-26 13:53 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description linnets 2012-05-25 00:07:41 UTC
The selected mark was at some child folder/file in treeview mode. If I want to quick select its parent folder I can use right arrow key.

But, in KDE 4.8.2, Dolphin/Konqueror, when I press right arrow key, the upper item is highlighted.

Reproducible: Always

Steps to Reproduce:
1. View in Treeview mode
2. Expand a folder
3. select some its child folder/file not right under the parent folder
4. Press right arrow key
Actual Results:  
The upper item is selected

Expected Results:  
Its parent folder is selected
Comment 1 linnets 2012-05-25 18:02:53 UTC
Sorry for my stupidity, I meant LEFT arrow key, NOT right. :(
Comment 2 Peter Penz 2012-05-26 11:27:44 UTC
Thanks for the report: Yes, this behavior is inconsistent to the default behavior when using Qt's treeviews.

Internal notes:
- Pressing "left" again should close the current folder if it is expanded
- Pressing "left" should go to the parent folder if it is already collapsed
Comment 3 Frank Reininghaus 2012-05-26 13:53:23 UTC
Created attachment 71383 [details]
Patch
Comment 4 Peter Penz 2012-05-26 18:17:58 UTC
Frank, thanks for the patch! I did not try it yet but I think what is still missing is that the parent folder gets collapsed. For a reference behavior I've opened a file-dialog with a tree-view. But I can take care for this if you don't have time, please just let me know.
Comment 5 Frank Reininghaus 2012-05-29 09:02:29 UTC
(In reply to comment #4)
> Frank, thanks for the patch! I did not try it yet but I think what is still
> missing is that the parent folder gets collapsed.

You have implemented this some time ago, see the first part of KItemListController:keyPressEvent():

https://projects.kde.org/projects/kde/kde-baseapps/repository/revisions/master/annotate/dolphin/src/kitemviews/kitemlistcontroller.cpp#L197
Comment 6 Peter Penz 2012-05-29 09:35:54 UTC
Hehe, I did not remember this at all ;-) Of course please go ahead to commit your patch then. Thanks!
Comment 7 Frank Reininghaus 2012-05-30 07:25:14 UTC
Git commit 93daadae28f7e3b5cffd7b713a2a287e4fa62ccd by Frank Reininghaus.
Committed on 30/05/2012 at 09:21.
Pushed by freininghaus into branch 'KDE/4.8'.

Improve arrow key navigation in Details View with expanded folders

If the current folder is collapsed, pressing the left arrow key now
moves the focus to the parent folder.
FIXED-IN: 4.8.4

M  +9    -1    dolphin/src/kitemviews/kitemlistcontroller.cpp

http://commits.kde.org/kde-baseapps/93daadae28f7e3b5cffd7b713a2a287e4fa62ccd
Comment 8 Frank Reininghaus 2012-05-30 07:27:32 UTC
Git commit adfe1a43e19f8715979369965e1d3520158babc6 by Frank Reininghaus.
Committed on 30/05/2012 at 09:21.
Pushed by freininghaus into branch 'master'.

Improve arrow key navigation in Details View with expanded folders

If the current folder is collapsed, pressing the left arrow key now
moves the focus to the parent folder.
(cherry picked from commit 93daadae28f7e3b5cffd7b713a2a287e4fa62ccd)

M  +9    -1    dolphin/src/kitemviews/kitemlistcontroller.cpp

http://commits.kde.org/kde-baseapps/adfe1a43e19f8715979369965e1d3520158babc6