Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node in stack can't be dragged out and are stuck #227

Open
enzi opened this issue Aug 13, 2023 · 1 comment
Open

Node in stack can't be dragged out and are stuck #227

enzi opened this issue Aug 13, 2023 · 1 comment

Comments

@enzi
Copy link

enzi commented Aug 13, 2023

Hey!
Your repo was a huge help to get me started on implementing a StackNode. Thanks for that.
While testing I found a bug.

public override bool DragLeave(DragLeaveEvent evt, IEnumerable<ISelectable> selection, IDropTarget leftTarget, ISelection dragSource)

is never called. So the nodes are never removed from the stack view list.

I debugged the thing and it turns out that only OnStartDragging is called. Must be new? I don't know.
But that's also the fix. To move the remove event to OnStartDragging.

Cheers!

@enzi
Copy link
Author

enzi commented Aug 16, 2023

Some more info on this because it's not straight forward to reproduce.
The node that is moved out of the stack has to be the last node.
DragLeave is only called when a placeholder was created in the stack and then the dragged node is moved out of the stack.
Being the last node, the stack shrinks immediately and no placeholder is created.

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

No branches or pull requests

1 participant