Skip to content

Fix drag-and-drop regression in playlist#659

Open
for13to1 wants to merge 1 commit into
IENT:developfrom
for13to1:fix/playlist-drag-drop-regression
Open

Fix drag-and-drop regression in playlist#659
for13to1 wants to merge 1 commit into
IENT:developfrom
for13to1:fix/playlist-drag-drop-regression

Conversation

@for13to1
Copy link
Copy Markdown
Contributor

Commit 44d1d86 refactored dragMoveEvent by inverting the dropTarget null check, but introduced two regressions:

  1. External file drops (e.g. from file manager) are rejected because the event is ignored when dropTarget is null (empty area) or when selectedItems() is empty (over an item).

  2. Internal reordering is broken when dragging between items because the drop on the gap between items returns a null dropTarget, and the event is now explicitly ignored instead of being delegated to QTreeWidget::dragMoveEvent.

Fix by handling external file drops (hasUrls) early before any playlist-internal validation, and delegating null-dropTarget internal drags to the base class.

Commit 44d1d86 refactored dragMoveEvent by inverting the dropTarget
null check, but introduced two regressions:

1. External file drops (e.g. from file manager) are rejected because
   the event is ignored when dropTarget is null (empty area) or when
   selectedItems() is empty (over an item).

2. Internal reordering is broken when dragging between items because
   the drop on the gap between items returns a null dropTarget, and
   the event is now explicitly ignored instead of being delegated to
   QTreeWidget::dragMoveEvent.

Fix by handling external file drops (hasUrls) early before any
playlist-internal validation, and delegating null-dropTarget internal
drags to the base class.
@for13to1
Copy link
Copy Markdown
Contributor Author

#658

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant