summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-18 16:43:23 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-18 16:44:03 -0300
commitb20952ebfff216acc07f6bbcad35b5a1e97a310c (patch)
tree5e9d834ff2b0aa9b1738a13b5112c56f8404c337 /modules
parent2ed87f33cf0ba91ecda081be3fd4231071a9c19e (diff)
Update script signals in real-time when script changes. Fixes #8980
Diffstat (limited to 'modules')
-rw-r--r--modules/visual_script/visual_script_editor.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 0f6b47c56d..a39491ef5b 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -886,6 +886,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(this, "_update_members");
undo_redo->add_do_method(this, "_update_graph");
undo_redo->add_undo_method(this, "_update_graph");
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
// _update_graph();
@@ -901,6 +903,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(script.ptr(), "rename_variable", new_name, name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
@@ -914,6 +918,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(script.ptr(), "rename_custom_signal", new_name, name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
@@ -1051,7 +1057,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(this, "_update_members");
undo_redo->add_do_method(this, "_update_graph");
undo_redo->add_undo_method(this, "_update_graph");
-
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
_update_graph();
@@ -1070,6 +1077,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(script.ptr(), "remove_variable", name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
}
@@ -1084,6 +1093,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(script.ptr(), "remove_custom_signal", name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
+ undo_redo->add_do_method(this, "emit_signal", "script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
}