Skip to content

Drag-n-drop improvements#209

Merged
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
kenmcgaugh:dragndrop
Feb 23, 2026
Merged

Drag-n-drop improvements#209
tedwaine merged 1 commit intoAcademySoftwareFoundation:developfrom
kenmcgaugh:dragndrop

Conversation

@kenmcgaugh
Copy link
Contributor

This adds support for a visual indicator both of what is being dragged as well as the number of items being dragged (for media items only).

It also fixes some issues with the current system, including stray drag indicators being left behind, runaway scrolling, and inadvertent reordering of media when an item is dropped on itself.

Note that the visual indicator is implemented by changing the system cursor to an image grabbed from the item under the mouse when the drag is initiated. I tried to get this working both by using a Drag attached property as well as instantiating a QDrag object in C++. In both cases it worked visually but the interface stopped receiving drag events and I couldn't figure out how to get that working. Because of this, you still cannot drag anything outside of xSTUDIO which I would like to be able to do in the future.

This has been tested under MacOS only at this point.

… changing the cursor to be a grab of the item being dragged along with a badge showing the number of items being dragged. It also fixes some issues causing instabilities or awkwardness in the UI relating to drag-n-drop.

Signed-off-by: Ken McGaugh <ken@mcgaugh.co.uk>
@tedwaine
Copy link
Contributor

I've tested on Linux and Windows too, working fine. Nice improvement!

@tedwaine tedwaine merged commit 5b179d2 into AcademySoftwareFoundation:develop Feb 23, 2026
2 of 4 checks passed
@kenmcgaugh
Copy link
Contributor Author

Thanks @tedwaine! I still want to get this working using Drag attached properties instead of hijacking the system cursor. Do you have any ideas on why all the drop areas stop receiving drag events? I’ve made sure my mime types are compatible.

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.

2 participants