From 7a7c3b2b2af77d96ad2cb3f7f930db3b2e545f31 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 7 Jan 2025 15:03:27 -0500 Subject: [PATCH] Fix misleading comments around copying information --- SabreTools.DatFiles/ItemDictionaryDB.cs | 4 ++-- SabreTools.DatItems/DatItemTool.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SabreTools.DatFiles/ItemDictionaryDB.cs b/SabreTools.DatFiles/ItemDictionaryDB.cs index 1b8ffb09..68f41e6f 100644 --- a/SabreTools.DatFiles/ItemDictionaryDB.cs +++ b/SabreTools.DatFiles/ItemDictionaryDB.cs @@ -810,7 +810,7 @@ namespace SabreTools.DatFiles var savedMachine = _machines[_itemToMachineMapping[savedIndex]]; var itemMachine = _machines[_itemToMachineMapping[itemIndex]]; - // If the current system has a lower ID than the previous, set the system accordingly + // If the current source has a lower ID than the saved, use the saved source if (itemSource?.Index < savedSource?.Index) { _itemToSourceMapping[itemIndex] = _itemToSourceMapping[savedIndex]; @@ -818,7 +818,7 @@ namespace SabreTools.DatFiles savedItem.SetName(datItem.GetName()); } - // If the current machine is a child of the new machine, use the new machine instead + // If the saved machine is a child of the current machine, use the current machine instead if (savedMachine.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey) || savedMachine.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine.GetStringFieldValue(Models.Metadata.Machine.NameKey)) { diff --git a/SabreTools.DatItems/DatItemTool.cs b/SabreTools.DatItems/DatItemTool.cs index 300ee2b1..c61ff632 100644 --- a/SabreTools.DatItems/DatItemTool.cs +++ b/SabreTools.DatItems/DatItemTool.cs @@ -345,7 +345,7 @@ namespace SabreTools.DatItems var savedMachine = savedItem.GetFieldValue(DatItem.MachineKey); var itemMachine = datItem.GetFieldValue(DatItem.MachineKey); - // If the current system has a lower ID than the previous, set the system accordingly + // If the current source has a lower ID than the saved, use the saved source if (itemSource?.Index < savedSource?.Index) { datItem.SetFieldValue(DatItem.SourceKey, savedSource.Clone() as Source); @@ -353,7 +353,7 @@ namespace SabreTools.DatItems savedItem.SetName(datItem.GetName()); } - // If the current machine is a child of the new machine, use the new machine instead + // If the saved machine is a child of the current machine, use the current machine instead if (savedMachine?.GetStringFieldValue(Models.Metadata.Machine.CloneOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey) || savedMachine?.GetStringFieldValue(Models.Metadata.Machine.RomOfKey) == itemMachine?.GetStringFieldValue(Models.Metadata.Machine.NameKey)) {