Fix undo methods for DELETE in EditorAutoloadSettings

This commit is contained in:
Stanislav Labzyuk 2023-07-23 19:19:40 +02:00
parent 6588a4a29a
commit 3462ecf2fb
1 changed files with 2 additions and 4 deletions

View File

@ -338,8 +338,7 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant()); undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant());
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name)); undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name));
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_persisting", name, true); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", order);
undo_redo->add_do_method(this, "update_autoload"); undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload"); undo_redo->add_undo_method(this, "update_autoload");
@ -795,8 +794,7 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) {
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant()); undo_redo->add_do_property(ProjectSettings::get_singleton(), name, Variant());
undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name)); undo_redo->add_undo_property(ProjectSettings::get_singleton(), name, GLOBAL_GET(name));
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_persisting", name, true); undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", order);
undo_redo->add_do_method(this, "update_autoload"); undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload"); undo_redo->add_undo_method(this, "update_autoload");