[Add node] Fix adding node with custom function create two nodes.

This commit is contained in:
Tanasart 2025-01-20 09:46:40 +07:00
parent 9340d6b6d7
commit accfa30037
2 changed files with 4 additions and 1 deletions

Binary file not shown.

View file

@ -163,7 +163,10 @@ function NodeObject(_name, _node, _tooltip = "") constructor {
_param.iname = nodekey;
}
var _node = createFn == noone? new node(_x, _y, _group, _param) : createFn(_x, _y, _group, _param);
var _node;
if(createFn == noone) _node = new node(_x, _y, _group, _param);
else _node = createFn(_x, _y, _group, _param);
_node.name = name;
_node.postBuild();