Skip to content

Commit

Permalink
Properly update script button when undoing a script addition
Browse files Browse the repository at this point in the history
  • Loading branch information
YeldhamDev committed May 14, 2019
1 parent e0517a1 commit 587986f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 587986f

Please sign in to comment.