diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-15 09:50:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-15 09:50:38 +0200 |
commit | dc7a40f00519ba681233d1513f634e4a464095b5 (patch) | |
tree | b225ee3ba9b6feb747db944e61b7b449df913a6b /editor | |
parent | 61b78e7f3be5121519befd2af3860e2380b3c9af (diff) | |
parent | 587986f6541b2de228dac15123018db3ec508e60 (diff) |
Merge pull request #28873 from YeldhamDev/undo_scriptbutton_update
Properly update script button when undoing a script addition
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_dock.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index a41f10607b..1f5300e351 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1602,6 +1602,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) { Ref<Script> existing = E->get()->get_script(); editor_data->get_undo_redo().add_do_method(E->get(), "set_script", p_script.get_ref_ptr()); editor_data->get_undo_redo().add_undo_method(E->get(), "set_script", existing); + editor_data->get_undo_redo().add_do_method(this, "_update_script_button"); + editor_data->get_undo_redo().add_undo_method(this, "_update_script_button"); } editor_data->get_undo_redo().commit_action(); |