Bug 345864 - Manually ordering favourites is not working properly
Summary: Manually ordering favourites is not working properly
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) widget (other bugs)
Version First Reported In: master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: David Edmundson
URL: https://www.youtube.com/watch?v=auULm...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-04 13:07 UTC by Antonis G.
Modified: 2015-04-07 23:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonis G. 2015-04-04 13:07:32 UTC
As you can see in the video moving the second item to the top of the list doesn't work (blue line doesn't appear), same for the second last, to the bottom. Also at 0:00:29 dragging the second last item first at the top and then dropping it at the bottom (this time the blue line appears) causes the first item to move to the bottom (instead of the one dragged).

Reproducible: Always

Steps to Reproduce:
1. Try to move the second last item at the bottom
2. Now drag again the second last item at the top (without dropping it) and then drop it at the bottom.

Actual Results:  
At first step nothing happens, whereas at the second, the first item moves at the bottom.
Comment 1 David Edmundson 2015-04-06 22:04:47 UTC
*** Bug 345741 has been marked as a duplicate of this bug. ***
Comment 2 Marco Martin 2015-04-07 11:47:01 UTC
Git commit 1a78088c455f4dd62334d4c0028bb247585bd843 by Marco Martin.
Committed on 07/04/2015 at 11:46.
Pushed by mart into branch 'master'.

wrong sign

the drag events were explicitly ignored for the first 2 items of the list

M  +1    -1    applets/kickoff/package/contents/ui/FavoritesView.qml

http://commits.kde.org/plasma-desktop/1a78088c455f4dd62334d4c0028bb247585bd843
Comment 3 Antonis G. 2015-04-07 14:32:02 UTC
Thanks for the patch, this fixes the first issue. Now that I looked again at it, it seems that the code, that looks which favourite item was dragged, can be fooled if you move the cursor away from kickoff (while dragging the item) move back to the applet, highliting another item, then again outside, and finally dropping it back. Should I fill a new bug report for that?
Comment 4 Jonathan Liu 2015-04-07 23:06:42 UTC
Doesn't that change prevent the if block from ever executing since Math.abs() never returns a negative value?