Bug 399430

Summary: Dolphin: Places: Regression: Move items up/down not working properly
Product: [Applications] dolphin Reporter: foss
Component: panels: placesAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, frodekolgrov, kde, kde, lcswillems, mail, nate, nortexoid, parker.l.reed, renatooliveira.cin, rgb.ide, rockonthemoonfm, wakutiteo.bi
Priority: NOR Keywords: usability
Version: 18.08.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 19.04.0
Attachments: configuration file for Dolphin
configuration file for Dolphin
parker reed comment re work around
configuration file search 01
configuration search 02
configuration search 03
dolphin handbook: configuration
christoph feck comment
an attempt to move a directory up

Description foss 2018-10-06 03:56:14 UTC
SUMMARY
When I try to to move folders down/up in places (drag&drop) it gets reset or nothing happens. 

STEPS TO REPRODUCE
1. Add folder to places by right click a folder and select "Add to places".
2. Try to move them down/up by drag&drop...
3. 


OBSERVED RESULT
Either nothing happens/or moved to the false position; not there where a "blue line/bar" is shown.

EXPECTED RESULT
Moving Folders in "Places" up/down to the right position.

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.14.0
KDE Frameworks Version: 5.51.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Using KDE Neon git stable.
Dolphin: 18.08.2
https://i.imgur.com/AHpZYVz.png
Comment 1 Richard Bowen 2018-10-07 16:35:02 UTC
Have a similar issue. Cant move a specific folder above trash. Whenever I try, the items remain in the same position.
Comment 2 Julian Steinmann 2018-10-11 18:35:24 UTC
Confirmed, if somebody who runs Dolphin 17.12.3 could test this that'd be great.
Comment 3 Parker Reed 2018-10-11 18:40:02 UTC
Found a workaround: open any KDE file dialog (I used Ctrl O in Chrome) and sort the entries there.
Comment 4 Nate Graham 2018-10-12 18:27:36 UTC
I've intermittently seen this with 18.08 and git master, but I've never been able to come up with a reproducible test case.
Comment 5 Christoph Feck 2018-10-12 21:23:05 UTC
*** Bug 399722 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2018-10-12 21:23:53 UTC
Reporter of bug 399722: reordering works if "Show all entries" is checked!
Comment 7 Patrick Silva 2018-10-22 23:21:14 UTC
*** Bug 400172 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2018-11-29 19:41:35 UTC
*** Bug 395269 has been marked as a duplicate of this bug. ***
Comment 9 Markel Cuesta Manciles 2018-12-09 20:47:34 UTC
(In reply to Nate Graham from comment #4)
> I've intermittently seen this with 18.08 and git master, but I've never been
> able to come up with a reproducible test case.

The bug happens when you have any entry hidden and it's above or between the entries that you want to reorder. But if the hidden entry is below the icons that you want to reorder, it works.

And always works if 'Show All Entries' is checked.
Comment 10 KDErobo3me 2018-12-19 02:23:17 UTC
I confirm the bug. usability suffers here. But nice to read about the workround at least. Would be nice if it could be fixed.
Comment 11 Christoph Feck 2019-01-07 22:23:58 UTC
*** Bug 402980 has been marked as a duplicate of this bug. ***
Comment 12 lurulf 2019-01-09 09:13:12 UTC
Yes, can confirm this. Workaround works. I had the Desktop entry hidden...
Comment 13 roger herz-fischler 2019-01-09 16:59:10 UTC
Created attachment 117360 [details]
configuration file for Dolphin
Comment 14 roger herz-fischler 2019-01-09 16:59:54 UTC
Created attachment 117361 [details]
configuration file for Dolphin
Comment 15 roger herz-fischler 2019-01-09 17:02:02 UTC
Created attachment 117362 [details]
parker reed comment re work around

I had already tried to find the configuration file, but as the snapshots show I can not find it
Comment 16 roger herz-fischler 2019-01-09 17:02:49 UTC
Created attachment 117363 [details]
configuration file search 01
Comment 17 roger herz-fischler 2019-01-09 17:03:47 UTC
Created attachment 117364 [details]
configuration search 02
Comment 18 roger herz-fischler 2019-01-09 17:04:15 UTC
Created attachment 117365 [details]
configuration search 03
Comment 19 roger herz-fischler 2019-01-09 17:05:32 UTC
Created attachment 117366 [details]
dolphin handbook: configuration
Comment 20 roger herz-fischler 2019-01-09 17:07:22 UTC
Created attachment 117367 [details]
christoph feck comment

I was unable to locate
Comment 21 roger herz-fischler 2019-01-09 17:17:47 UTC
Created attachment 117368 [details]
an attempt to move a directory  up
Comment 22 lurulf 2019-01-09 20:03:31 UTC
It really seems that you have a hidden entry between your "from" and "to" destination. Right-click on an empty area of the places panel, and I bet you get an option "Show hidden places" or "Show all entries". When you get the "move, copy, link" options, you have dropped an entry above another. You have to place it between two entries so the blue border line appears. Hope this help.
Comment 23 foss 2019-01-12 17:42:51 UTC
(In reply to lurulf from comment #22)
> It really seems that you have a hidden entry between your "from" and "to"
> destination. Right-click on an empty area of the places panel, and I bet you
> get an option "Show hidden places" or "Show all entries". When you get the
> "move, copy, link" options, you have dropped an entry above another. You
> have to place it between two entries so the blue border line appears. Hope
> this help.

That might help, yes, but doesn't solve the problem that it used to work without workaround and now it doesn't.
Comment 24 Nate Graham 2019-03-20 16:48:40 UTC
Git commit 303cd17444e1fb88d1f92a911f7c770214b8f90e by Nate Graham, on behalf of Tigran Gabrielyan.
Committed on 20/03/2019 at 16:46.
Pushed by ngraham into branch 'Applications/19.04'.

Fix rearranging items in places panel with hidden items

Summary:
`m_sourceModel->movePlace` is called using index from the view model.
This becomes an issue when there are hidden places items.

This change calls `m_sourceModel->movePlace` using the corresponding mapped source index.
FIXED-IN: 19.04.0

Test Plan:
  # Create at least 4 Places items
  # Hide first item
  # Drag the now first visible item between second and third item

Actual: The item does not move
Expected: The first visible item should now be second visible item in the list

Reviewers: #dolphin, ngraham

Reviewed By: #dolphin, ngraham

Subscribers: ngraham, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D19901

M  +4    -1    src/panels/places/placesitemmodel.cpp

https://commits.kde.org/dolphin/303cd17444e1fb88d1f92a911f7c770214b8f90e