Revert filtering order to pre-1.0.1

This commit is contained in:
Matt Nadareski
2020-07-22 22:39:29 -07:00
parent a1f88cf5a7
commit 87349fec76

View File

@@ -767,6 +767,30 @@ namespace SabreTools.Library.DatFiles
{
try
{
// Process description to machine name
if (this.DescriptionAsName)
MachineDescriptionToName(datFile);
// If we are using tags from the DAT, set the proper input for split type unless overridden
if (useTags && this.InternalSplit == SplitType.None)
this.InternalSplit = datFile.DatHeader.ForceMerging.AsSplitType();
// Run internal splitting
ProcessSplitType(datFile, this.InternalSplit);
// We remove any blanks, if we aren't supposed to have any
if (!datFile.DatHeader.KeepEmptyGames)
{
foreach (string key in datFile.Keys)
{
List<DatItem> items = datFile[key];
List<DatItem> newitems = items.Where(i => i.ItemType != ItemType.Blank).ToList();
datFile.Remove(key);
datFile.AddRange(key, newitems);
}
}
// Loop over every key in the dictionary
List<string> keys = datFile.Keys;
foreach (string key in keys)
@@ -820,30 +844,6 @@ namespace SabreTools.Library.DatFiles
datFile.AddRange(key, newitems);
}
// Process description to machine name
if (this.DescriptionAsName)
MachineDescriptionToName(datFile);
// If we are using tags from the DAT, set the proper input for split type unless overridden
if (useTags && this.InternalSplit == SplitType.None)
this.InternalSplit = datFile.DatHeader.ForceMerging.AsSplitType();
// Run internal splitting
ProcessSplitType(datFile, this.InternalSplit);
// We remove any blanks, if we aren't supposed to have any
if (!datFile.DatHeader.KeepEmptyGames)
{
foreach (string key in datFile.Keys)
{
List<DatItem> items = datFile[key];
List<DatItem> newitems = items.Where(i => i.ItemType != ItemType.Blank).ToList();
datFile.Remove(key);
datFile.AddRange(key, newitems);
}
}
// If we are removing scene dates, do that now
if (datFile.DatHeader.SceneDateStrip)
StripSceneDatesFromItems(datFile);
@@ -1879,6 +1879,7 @@ namespace SabreTools.Library.DatFiles
{
item.CloneOf = null;
item.RomOf = null;
item.SampleOf = null;
}
}
}