diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-07 13:13:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 13:13:33 +0100 |
commit | c4ecec1d3362754f7f31ed20409273597cac15da (patch) | |
tree | 0e9bbc5c99c381ff7b498b927ee618716f57bbe2 /modules | |
parent | 121fb46ab98c244069dc196644afef7e2747497d (diff) | |
parent | 858afd53d8aaf048e528f83f72d5cd1e9343e025 (diff) |
Merge pull request #32853 from OsamaElHariri/visual_script_setter_props_fix
Set the properties of a Set node after add_node
Diffstat (limited to 'modules')
-rw-r--r-- | modules/visual_script/visual_script_editor.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 0db771f7c0..6aae2fd15b 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<VisualScriptNode> vnode; + Ref<VisualScriptPropertySet> script_prop_set; if (p_category == String("method")) { @@ -3525,8 +3526,8 @@ void VisualScriptEditor::_selected_connect_node(const String &p_text, const Stri Ref<VisualScriptPropertySet> n; n.instance(); - n->set_property(p_text); vnode = n; + script_prop_set = n; } else if (p_category == String("get")) { Ref<VisualScriptPropertyGet> 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<VisualScriptNode> vsn = script->get_node(func, port_action_new_node); |