Make Kickoff restore favorites order when dragging an item to desktop
AcceptedPublic

Authored by lisin on Fri, Aug 9, 10:02 AM.

Details

Reviewers
ngraham
hein
Group Reviewers
Plasma
Summary

This fixes the undesired reordering of the favorites which could happen when dragging an item to desktop by restoring the order of favorites when the cursor leaves Kickoff.

BUG: 385856
FIXED-IN: 5.17.0

Diff Detail

Repository
R119 Plasma Desktop
Lint
Lint Skipped
Unit
Unit Tests Skipped
lisin created this revision.Fri, Aug 9, 10:02 AM
Restricted Application added a project: Plasma. · View Herald TranscriptFri, Aug 9, 10:02 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
lisin requested review of this revision.Fri, Aug 9, 10:02 AM
lisin added a comment.EditedFri, Aug 9, 10:09 AM

I was reluctant to introduce a new variable with such a broad scope (kickoff.dragStartRow) but using the startRow from DropArea would sometimes still mess up the order - startRow would be set to whatever new current index every time the user moved the cursor back inside DropArea, so it would be snapping back to the wrong position. It's not really something a user would commonly do, so I can edit the code to use it instead. Otherwise, startRow wasn't used anywhere so I removed it completely.

lisin updated this revision to Diff 63398.Fri, Aug 9, 10:17 AM

Added isChildOf(source, favoritesView) which is probably needed.

ngraham accepted this revision.Fri, Aug 9, 12:58 PM

+1, nice. Plasma folks?

applets/kickoff/package/contents/ui/FavoritesView.qml
94

Could you add a comment explaining why this is done, for the benefit of people reading the code in the future?

This revision is now accepted and ready to land.Fri, Aug 9, 12:58 PM
ngraham edited the summary of this revision. (Show Details)Fri, Aug 9, 12:58 PM
lisin updated this revision to Diff 63407.Fri, Aug 9, 1:37 PM

Sure, I've added the comment