浏览代码

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.
Dommi 1 年之前
父节点
当前提交
aebcd699fe
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/multiplayer/editor/replication_editor.cpp

+ 1 - 1
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_do_method(config.ptr(), "property_set_spawn", prop, value);
 		undo_redo->add_undo_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_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();
 		undo_redo->commit_action();
 	} else if (column == 2) {
 	} else if (column == 2) {
 		undo_redo->create_action(TTR("Set sync property"));
 		undo_redo->create_action(TTR("Set sync property"));