summaryrefslogtreecommitdiff
path: root/modules/multiplayer
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-12-23 23:53:16 +0100
committerkobewi <kobewi4e@gmail.com>2023-01-16 01:11:52 +0100
commitb58111588a62fcdd238f93129cd48a1dbb1d5237 (patch)
tree25c5154a456d471932ca9d27ff46dd0aec663665 /modules/multiplayer
parent91fedb60de6011434938499a9d4a7d4fd1cd4f06 (diff)
Add EditorUndoRedoManager singleton
Diffstat (limited to 'modules/multiplayer')
-rw-r--r--modules/multiplayer/editor/replication_editor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp
index 4ab41cfcb0..9b071ecc02 100644
--- a/modules/multiplayer/editor/replication_editor.cpp
+++ b/modules/multiplayer/editor/replication_editor.cpp
@@ -142,7 +142,7 @@ void ReplicationEditor::_add_sync_property(String p_path) {
return;
}
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_singleton()->get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Add property to synchronizer"));
if (config.is_null()) {
@@ -357,7 +357,7 @@ void ReplicationEditor::_tree_item_edited() {
int column = tree->get_edited_column();
ERR_FAIL_COND(column < 1 || column > 2);
const NodePath prop = ti->get_metadata(0);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
bool value = ti->is_checked(column);
String method;
if (column == 1) {
@@ -397,7 +397,7 @@ void ReplicationEditor::_dialog_closed(bool p_confirmed) {
int idx = config->property_get_index(prop);
bool spawn = config->property_get_spawn(prop);
bool sync = config->property_get_sync(prop);
- Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo();
+ EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Remove Property"));
undo_redo->add_do_method(config.ptr(), "remove_property", prop);
undo_redo->add_undo_method(config.ptr(), "add_property", prop, idx);