diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-14 21:03:09 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-14 21:03:09 +0800 |
commit | ddde73cc62f10c254eee1502ea085eed197863bc (patch) | |
tree | 0008e1370cd10dcb2d934e96d733722c21c592eb | |
parent | ea4c88f38abcda1ab0e3cf1f1b124f48e37c1385 (diff) |
Makes adding port in Visual Script nodes deferred
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 4bfd4f48ce..ec20698ae8 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -575,7 +575,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Button *btn = memnew(Button); btn->set_text(TTR("Add Input Port")); hbnc->add_child(btn); - btn->connect("pressed", this, "_add_input_port", varray(E->get())); + btn->connect("pressed", this, "_add_input_port", varray(E->get()), CONNECT_DEFERRED); } if (nd_list->is_output_port_editable()) { if (nd_list->is_input_port_editable()) @@ -584,7 +584,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { Button *btn = memnew(Button); btn->set_text(TTR("Add Output Port")); hbnc->add_child(btn); - btn->connect("pressed", this, "_add_output_port", varray(E->get())); + btn->connect("pressed", this, "_add_output_port", varray(E->get()), CONNECT_DEFERRED); } gnode->add_child(hbnc); } else if (Object::cast_to<VisualScriptExpression>(node.ptr())) { |