nodeeditor
nodeeditor copied to clipboard
Dynamic port node
Thanks for awesome node editor, Dmitry! I played with him a few evenings and delighted with the architect and opportunities for decor it.
I added the signals for add and remove ports. Maybe you want to add this to your repository. Video: https://youtu.be/KUt4qlTLrW0
There is a problem when removing connections. I didn't know how correct remove connections from the FlowScene.
Hey, this looks awesome.
Let me stabilize continuous integration builds and then I come back to your PR.
Regards,
Dmitry
Could you please rebase onto the latest master and squash your commits?
Did this, Dmitry. I seem to make a mistake with the rebase and squash branches. I do not how to fix it in this PR, sorry.
@paceholder , if @signmotion will refuse to fulfill your requirements, please find my pull request with his work squashed and rebased.
Hi, great feature, I've been using it in my fork. I noticed that my application would crash when loading scenes with dynamic port nodes with an out-of-range exception on the input/output connection vectors in the nodestates.
I created a new PR with fix https://github.com/paceholder/nodeeditor/pull/268 for anyone who might need this feature (since the original PR has not been accepted yet)
I played a bit with this branch and the @willys0 fix. The main point is Node::onPortAdded() and Node::onPortRemoved() just resize the underlying connection vector, so they kinda works when the last port is added or removed, but if I have 5 ports connected and remove connection at index 2 the layout breaks. So I guess at least signal portRemoved() e and onPortRemoved should have the index of the connection port removed to correctly remove the right port.
Thanks for your contribution. I've implemented the feature in the latest master.
The current code correctly handles the changed connection order is using somehow similar approach to data modifications as in Qt's QAbstractItemModel
class used for trees and tables.