diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-14 14:41:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-14 14:41:53 +0100 |
commit | dc0f43a1c2218990d36add82be1feb2dacaa5796 (patch) | |
tree | 0008e1370cd10dcb2d934e96d733722c21c592eb | |
parent | ea4c88f38abcda1ab0e3cf1f1b124f48e37c1385 (diff) | |
parent | ddde73cc62f10c254eee1502ea085eed197863bc (diff) |
Merge pull request #35117 from timothyqiu/deferred
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())) { |