From 8a3d2f4e0c452a1d333f45cf106d2397f4c8b873 Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 24 Nov 2022 18:28:49 +0100 Subject: Cleanup remaining EditorUndoRedoManager usages --- editor/plugins/tiles/tile_proxies_manager_dialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'editor/plugins/tiles/tile_proxies_manager_dialog.cpp') diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp index 9e4c29fa79..50350de97e 100644 --- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp +++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp @@ -53,6 +53,7 @@ void TileProxiesManagerDialog::_menu_id_pressed(int p_id) { } void TileProxiesManagerDialog::_delete_selected_bindings() { + Ref &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Remove Tile Proxies")); Vector source_level_selected = source_level_list->get_selected_items(); @@ -152,6 +153,7 @@ void TileProxiesManagerDialog::_property_changed(const String &p_path, const Var } void TileProxiesManagerDialog::_add_button_pressed() { + Ref &undo_redo = EditorNode::get_undo_redo(); if (from.source_id != TileSet::INVALID_SOURCE && to.source_id != TileSet::INVALID_SOURCE) { Vector2i from_coords = from.get_atlas_coords(); Vector2i to_coords = to.get_atlas_coords(); @@ -192,6 +194,7 @@ void TileProxiesManagerDialog::_add_button_pressed() { } void TileProxiesManagerDialog::_clear_invalid_button_pressed() { + Ref &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Delete All Invalid Tile Proxies")); undo_redo->add_do_method(*tile_set, "cleanup_invalid_tile_proxies"); @@ -219,6 +222,7 @@ void TileProxiesManagerDialog::_clear_invalid_button_pressed() { } void TileProxiesManagerDialog::_clear_all_button_pressed() { + Ref &undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Delete All Tile Proxies")); undo_redo->add_do_method(*tile_set, "clear_tile_proxies"); @@ -299,6 +303,7 @@ void TileProxiesManagerDialog::_unhandled_key_input(Ref p_event) { } void TileProxiesManagerDialog::cancel_pressed() { + Ref &undo_redo = EditorNode::get_undo_redo(); for (int i = 0; i < commited_actions_count; i++) { undo_redo->undo(); } @@ -318,8 +323,6 @@ void TileProxiesManagerDialog::update_tile_set(Ref p_tile_set) { } TileProxiesManagerDialog::TileProxiesManagerDialog() { - undo_redo = EditorNode::get_singleton()->get_undo_redo(); - // Tile proxy management window. set_title(TTR("Tile Proxies Management")); set_process_unhandled_key_input(true); -- cgit v1.2.3