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

Demo site diagram "Add"-node allowing connection to itself, blocking the diagram with refreshs #365

Open
K0369 opened this issue Oct 16, 2023 · 0 comments

Comments

@K0369
Copy link
Contributor

K0369 commented Oct 16, 2023

On the demo site, it is possible to link the result of an "Add-node" with it's own input.
Since the "OnValueChange" contains a call to the nodes Refresh-Method, and the Refresh-Method updates the value, which invokes "OnValueChange", this results in a neverending loop of updating and refreshing.

A quick and dirty solution for this could be to check in the Calculator-Ports "CanAttach"-Method if the own parent Model and the target Model are the same instance, although this doesn't stop a user from being able to draw a closed loop over two Add-Nodes.

Another solution might be to rework the updating to check for recursive values.

And a third solution would be to just let it be as it is, because it is just a small demonstration and if a user draws a recursive graph, it's his own fault for doing so

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