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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does pin::AttributeFlags::EnableLinkCreationOnSnap do? #6

Open
XBagon opened this issue Sep 4, 2021 · 1 comment
Open

What does pin::AttributeFlags::EnableLinkCreationOnSnap do? #6

XBagon opened this issue Sep 4, 2021 · 1 comment

Comments

@XBagon
Copy link

XBagon commented Sep 4, 2021

I'm having problems trying to understand what that flag does, or should do.

I just know I fairly quickly managed to crash my application with it enabled 馃槃.
For that I had a node A with this flag and EnableLinkDetachWithDragClick activated on input and a default one B. Then connected input B->A, which produced 2 links on top of each other for some reason. So I removed both and then created a link again. When touching the input of A it crashed, cause it tried to remove a link with an index higher than available.

@comcloudway
Copy link

comcloudway commented Feb 12, 2022

From what I can tell, reading the docs and doing some testing, it seems like without this flag, the ctx.link_created()` event is "called", once the drag is completed.

If you have the flag enabled, the event is "called", when the connection can be seen visually, but the drag has not yet been completed.

I'm now actually also experiencing the issue, where it tries to delete a link out of bound, which I solved by adding an if statement, but it also creates two connections, even without the flag enabled - going to investigate further

EDIT: Reformulated answer to state that I'm now getting the error as well

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

2 participants