Skip to content

Commit

Permalink
Fix undo methods for DELETE in EditorAutoloadSettings
Browse files Browse the repository at this point in the history
(cherry picked from commit 3462ecf)
  • Loading branch information
DarkMessiah authored and YuriSizov committed Jan 23, 2024
1 parent 0a7af39 commit 4100743
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/editor_autoload_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_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", order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order);

undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
Expand Down Expand Up @@ -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_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", order);
undo_redo->add_undo_method(ProjectSettings::get_singleton(), "set_order", name, order);

undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
Expand Down

0 comments on commit 4100743

Please sign in to comment.