From 06959a897069afe4f9cd22499bafaa1af171a124 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 13 Mar 2018 15:36:38 -0700 Subject: [PATCH] [DatFile] Reset the dictionary means reset the sort --- SabreTools.Library/DatFiles/DatFile.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index a7bf1b17..202aeb99 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -2027,8 +2027,6 @@ namespace SabreTools.Library.DatFiles /// True if the first cascaded diff file should be skipped on output, false otherwise public void DiffCascade(List inputs, List datHeaders, string outDir, bool inplace, bool skip) { - string post = ""; - // Create a list of DatData objects representing output files List outDats = new List(); @@ -2050,12 +2048,12 @@ namespace SabreTools.Library.DatFiles else { diffData = new DatFile(this); - diffData.FileName += post; - diffData.Name += post; - diffData.Description += post; + diffData.FileName += innerpost; + diffData.Name += innerpost; + diffData.Description += innerpost; } - diffData.ResetDictionary(); + diffData.ResetDictionary(); outDatsArray[j] = diffData; }); @@ -2388,6 +2386,8 @@ namespace SabreTools.Library.DatFiles public void DeleteDictionary() { _items = null; + _sortedBy = SortedBy.Default; + _mergedBy = DedupeType.None; // Reset statistics _datStats.Reset(); @@ -2399,6 +2399,8 @@ namespace SabreTools.Library.DatFiles public void ResetDictionary() { _items = new SortedDictionary>(); + _sortedBy = SortedBy.Default; + _mergedBy = DedupeType.None; // Reset statistics _datStats.Reset();