[Kickoff] Fix start row for drag not always being correct
ClosedPublic

Authored by net147 on Aug 2 2016, 2:27 PM.

Details

Summary

The start row for the drag is set to the current index but the current index is not always the item being dragged. This is because syncTarget has not been called yet to update the current index to the item under the cursor. Fix this by calling syncTarget before reading the current index.

Test Plan

Drag items around and notice that the item being moved is not always correct.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
net147 updated this revision to Diff 5642.Aug 2 2016, 2:27 PM
net147 retitled this revision from to [Kickoff] Fix start row for drag not always being correct.
net147 updated this object.
net147 edited the test plan for this revision. (Show Details)
net147 added reviewers: broulik, Plasma.
net147 set the repository for this revision to R119 Plasma Desktop.
Restricted Application added a project: Plasma. · View Herald TranscriptAug 2 2016, 2:27 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
net147 added a comment.Aug 2 2016, 2:31 PM

This is a backport of https://phabricator.kde.org/D2322 fix for Plasma 5.7.

net147 added a reviewer: bshah.Aug 2 2016, 2:33 PM
broulik accepted this revision.Aug 8 2016, 7:58 AM
broulik edited edge metadata.

There's still something off when I drag a bottom favorite to the top if often ends up in the wrong place or doesn't move at all. This is with and without this patch, so looks good to me. For 5.8 where I reworked the drag-drop stuff I'll look if this is still the case and fix it. :)

This revision is now accepted and ready to land.Aug 8 2016, 7:58 AM
This revision was automatically updated to reflect the committed changes.