Implementing drag to reorder tracks in media clipboard (Issue 318)#392
Implementing drag to reorder tracks in media clipboard (Issue 318)#392NatalieElizabeth wants to merge 2 commits intodevelopfrom
Conversation
|
Great start! I found two small issues:
|
|
Thank you for catching those issues! The latest commit fixes the downward drag offset issue and ensures that a.) the indicator line won't be drawn if the drag is moved outside the widget, and that b.) the reordering won't occur if the mouse is released outside the widget. You can still start the drag in the widget, move outside the widget, and then move back inside and release the mouse button to reorder, as long as the release is within the bounds of the widget. |
cwitkowitz
left a comment
There was a problem hiding this comment.
Looks good! Only thing I would say is to be wary of calling repaint() in mouseDrag, since this may invoke the function repeatedly over the course of the drag. Obviously, this is necessary to move the delimiter, but repaint() can sometimes be a bulky operation and could slow things down if called in a loop. With that being said, it doesn't seem to be a problem on my end.
Issue 318
Implemented drag-and-drop for reordering tracks in the media clipboard. Created some mouse event overrides to detect dragging behavior with a drag threshold of 5 pixels, and made some changes to the painting of the
TrackAreaWidgetto display and update a drop line. The appearance (color, thickness) of the drop line can be discussed before merging.Files modified:
TrackAreaWidget.h