Suggestion: Steal NodeDataModel when removing a Node from a FlowScene #188
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
| ★ wanayoo — archive 1999 https://github.com/paceholder/nodeeditor/issues/188 | Nouvelle recherche | Portail wanayoo |
Hi ! and congrats for this useful library i've been using for a few days !
Here is my suggestion / question
Maybe i'm missing something here:
QtNodes::Node is the owner of QtNodes::NodeDataModel which is perfect
My use case is that i'm implementing Macro patches such as you can see in Quartz composer. So i need to "move" nodes between scenes.
I would then like to steal the model from a Node in a safe way, when i know it will no longer be used.
My suggestion is that:
void FlowScene::removeNode(Node& node);become
std::unique_ptr<NodeDataModel> FlowScene::removeNode(Node& node);which means that before completely destroying the Node it would move it's model, which is safe as the Node will be destroyed.
I hope this make sense and if not could you please point me to a better solution ? Otherwise i would gladly do a PR.
The text was updated successfully, but these errors were encountered: