Bug 310219 - in an splited view of the same directory, with a file selected in a view, create a folder in the other view, result: lot of files are selected
Summary: in an splited view of the same directory, with a file selected in a view, cre...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.1.80
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: regression, reproducible
Depends on:
Blocks:
 
Reported: 2012-11-16 17:11 UTC by Jaime Torres
Modified: 2012-11-18 15:26 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.4


Attachments
Proposed fix (629 bytes, patch)
2012-11-18 10:41 UTC, Frank Reininghaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Torres 2012-11-16 17:11:51 UTC
in an splited view of the same directory, with a file selected in a view, create a folder in the other view, result: all the files until the one previously selected are now selected.
tested with HEAD from 2012-11-09.


Reproducible: Always

Steps to Reproduce:
1. spit dolphin in a directory with some files (and/or directories)
2. select a file (not the first one in incons view, sorted by name) in one view
3. create a new folder in the other view.
Actual Results:  
all the files up to the old selected one are now selected, and the view position has changed.

Expected Results:  
only the previously selected file keeps selected (and optionally, the view position doesn't change).
Comment 1 Frank Reininghaus 2012-11-17 18:56:02 UTC
Thanks, I can confirm this problem.
Comment 2 Frank Reininghaus 2012-11-17 19:24:25 UTC
The unexpected selection (which can even happen without splitting the view, just select any item and then create a new folder using, e.g., F10) is a regression caused by 

https://projects.kde.org/projects/kde/kde-baseapps/repository/revisions/b25059e803e7eed54f0593605a4066882d63bce2

I currently don't have a good idea how to fix this without bringing the other bug back - will have to think about this. But we should definitely fix this before 4.9.4 is tagged.

I agree that the "current item" change in the other view is also sort of unexpected, but this is a different issue.
Comment 3 Frank Reininghaus 2012-11-17 19:40:47 UTC
One could clear the selection in

void DolphinView::observeCreatedItem(const KUrl& url),

but then the selection would be cleared in *all* DolphinViews when a folder is created in one of them, this is not a good solution either :-(
Comment 4 Frank Reininghaus 2012-11-18 10:41:52 UTC
Created attachment 75329 [details]
Proposed fix

Makes sure that the new created item is only made the current and selected item in the active view.
Comment 5 Jaime Torres 2012-11-18 11:13:01 UTC
I've applied the patch. It works, and it solves both problems!!! the selection and the view position.
Comment 6 Frank Reininghaus 2012-11-18 15:26:59 UTC
Git commit 7769d8123611ebc538e6b965f674a3daa0019928 by Frank Reininghaus.
Committed on 18/11/2012 at 16:22.
Pushed by freininghaus into branch 'KDE/4.9'.

Only select a created item and make it 'current' in the active view

The 'make the new item the current one in all views' issue has been
around for quite some time, the unexpected selection was a recent
regression caused by commit b25059e803e7eed54f0593605a4066882d63bce2.

Thanks to Jaime Torres for finding the regression early and for testing
this patch!
FIXED-IN: 4.9.4

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

http://commits.kde.org/kde-baseapps/7769d8123611ebc538e6b965f674a3daa0019928