From aebcd699fe00e606b4ab4cb9b5b7e4ca7e6961e2 Mon Sep 17 00:00:00 2001 From: Dommi Date: Mon, 3 Jun 2024 20:50:49 +0200 Subject: [PATCH] Fixed undo not updating spawn checkbox in replication editor When pressing undo the value was set to the same as it was before in the ui. It was saved correctly in the config but not updated in the editor. --- modules/multiplayer/editor/replication_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/multiplayer/editor/replication_editor.cpp b/modules/multiplayer/editor/replication_editor.cpp index d242b06c296..851ad858769 100644 --- a/modules/multiplayer/editor/replication_editor.cpp +++ b/modules/multiplayer/editor/replication_editor.cpp @@ -430,7 +430,7 @@ void ReplicationEditor::_tree_item_edited() { undo_redo->add_do_method(config.ptr(), "property_set_spawn", prop, value); undo_redo->add_undo_method(config.ptr(), "property_set_spawn", prop, !value); undo_redo->add_do_method(this, "_update_value", prop, column, value ? 1 : 0); - undo_redo->add_undo_method(this, "_update_value", prop, column, value ? 1 : 0); + undo_redo->add_undo_method(this, "_update_value", prop, column, value ? 0 : 1); undo_redo->commit_action(); } else if (column == 2) { undo_redo->create_action(TTR("Set sync property"));