You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-04 19:21:46 +00:00
Properly update script button when undoing a script addition
Fixes #28870.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user