diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 18:54:05 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 18:54:05 +0100 |
commit | eefba5bc3309d57c357bc6b9bbf06d25f47a29cf (patch) | |
tree | a11a1f7cfcf65719815138613e361920f8094fa5 /modules | |
parent | 30e4e7c083f4a81b7aa71222205945e649ad8189 (diff) | |
parent | 15831e381bdfc1d086e1d7dca0d501e4c8dcf4d5 (diff) |
Merge pull request #65062 from KoBeWi/RedoUndo
Unify usage of undo_redo in editor
Diffstat (limited to 'modules')
-rw-r--r-- | modules/multiplayer/editor/replication_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/multiplayer/editor/replication_editor_plugin.cpp b/modules/multiplayer/editor/replication_editor_plugin.cpp index f045018f25..aee5f5b483 100644 --- a/modules/multiplayer/editor/replication_editor_plugin.cpp +++ b/modules/multiplayer/editor/replication_editor_plugin.cpp @@ -355,7 +355,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(); + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); bool value = ti->is_checked(column); String method; if (column == 1) { @@ -395,7 +395,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(); + Ref<EditorUndoRedoManager> &undo_redo = EditorNode::get_undo_redo(); 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); |