You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Unify usage of undo_redo in editor
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user