From 858afd53d8aaf048e528f83f72d5cd1e9343e025 Mon Sep 17 00:00:00 2001 From: Osama El Hariri Date: Tue, 15 Oct 2019 21:42:48 +0300 Subject: [PATCH] Set the properties of a Set node after add_node --- modules/visual_script/visual_script_editor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index c1a4c586200..f85cc612c17 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -3515,6 +3515,7 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri } Ref vnode; + Ref script_prop_set; if (p_category == String("method")) { @@ -3525,8 +3526,8 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri Ref n; n.instance(); - n->set_property(p_text); vnode = n; + script_prop_set = n; } else if (p_category == String("get")) { Ref n; @@ -3578,6 +3579,9 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri undo_redo->add_undo_method(this, "_update_graph", new_id); undo_redo->commit_action(); + if (script_prop_set.is_valid()) + script_prop_set->set_property(p_text); + port_action_new_node = new_id; Ref vsn = script->get_node(func, port_action_new_node);