diff --git a/SabreTools.Library/Dats/Archive.cs b/SabreTools.Library/Dats/Archive.cs index ba9cd3b2..9723198d 100644 --- a/SabreTools.Library/Dats/Archive.cs +++ b/SabreTools.Library/Dats/Archive.cs @@ -22,14 +22,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new Archive() + Archive item = new Archive() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -44,6 +42,9 @@ namespace SabreTools.Library.Dats SourceID = this.SourceID, Source = this.Source, }; + + item.CopyMachineInformation(this); + return item; } #endregion diff --git a/SabreTools.Library/Dats/BiosSet.cs b/SabreTools.Library/Dats/BiosSet.cs index 266f512f..28f9ceda 100644 --- a/SabreTools.Library/Dats/BiosSet.cs +++ b/SabreTools.Library/Dats/BiosSet.cs @@ -44,14 +44,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new BiosSet() + BiosSet item = new BiosSet() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -69,6 +67,9 @@ namespace SabreTools.Library.Dats Description = this.Description, Default = this.Default, }; + + item.CopyMachineInformation(this); + return item; } #endregion diff --git a/SabreTools.Library/Dats/Disk.cs b/SabreTools.Library/Dats/Disk.cs index 09acefd1..13bbfd20 100644 --- a/SabreTools.Library/Dats/Disk.cs +++ b/SabreTools.Library/Dats/Disk.cs @@ -73,14 +73,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new Disk() + Disk item = new Disk() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -102,6 +100,9 @@ namespace SabreTools.Library.Dats SHA512 = this.SHA512, ItemStatus = this.ItemStatus, }; + + item.CopyMachineInformation(this); + return item; } #endregion diff --git a/SabreTools.Library/Dats/Release.cs b/SabreTools.Library/Dats/Release.cs index 6412732d..e1ce9302 100644 --- a/SabreTools.Library/Dats/Release.cs +++ b/SabreTools.Library/Dats/Release.cs @@ -61,14 +61,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new Release() + Release item = new Release() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -88,6 +86,9 @@ namespace SabreTools.Library.Dats Date = this.Date, Default = this.Default, }; + + item.CopyMachineInformation(this); + return item; } #endregion diff --git a/SabreTools.Library/Dats/Rom.cs b/SabreTools.Library/Dats/Rom.cs index 57cdd0cc..e6bed00a 100644 --- a/SabreTools.Library/Dats/Rom.cs +++ b/SabreTools.Library/Dats/Rom.cs @@ -101,14 +101,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new Rom() + Rom item = new Rom() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -133,6 +131,9 @@ namespace SabreTools.Library.Dats CRC = _crc, Date = this.Date, }; + + item.CopyMachineInformation(this); + return item; } #endregion diff --git a/SabreTools.Library/Dats/Sample.cs b/SabreTools.Library/Dats/Sample.cs index 2740e8a2..5d5012e2 100644 --- a/SabreTools.Library/Dats/Sample.cs +++ b/SabreTools.Library/Dats/Sample.cs @@ -23,14 +23,12 @@ namespace SabreTools.Library.Dats public new object Clone() { - return new Sample() + Sample item = new Sample() { Name = this.Name, Type = this.Type, Dupe = this.Dupe, - Machine = (Machine)this.Machine.Clone(), - Supported = this.Supported, Publisher = this.Publisher, Infos = this.Infos, @@ -45,6 +43,9 @@ namespace SabreTools.Library.Dats SourceID = this.SourceID, Source = this.Source, }; + + item.CopyMachineInformation(this); + return item; } #endregion