[DatItem] Check parenting when merging

This commit is contained in:
Matt Nadareski
2018-03-13 17:43:16 -07:00
parent b9b7c30f57
commit 05465c0f45

View File

@@ -784,6 +784,13 @@ namespace SabreTools.Library.DatItems
saveditem.Name = file.Name; saveditem.Name = file.Name;
} }
// If the current machine is a child of the new machine, use the new machine instead
if (saveditem.CloneOf == file.MachineName || saveditem.RomOf == file.MachineName)
{
saveditem.CopyMachineInformation(file);
saveditem.Name = file.Name;
}
break; break;
} }
} }