diff --git a/Source/Core/GZBuilder/Controls/TagSelector.cs b/Source/Core/GZBuilder/Controls/TagSelector.cs index ea229046..c9b1843d 100644 --- a/Source/Core/GZBuilder/Controls/TagSelector.cs +++ b/Source/Core/GZBuilder/Controls/TagSelector.cs @@ -86,8 +86,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls } } - //now sort them - tags.Sort(); + //now sort them in descending order + tags.Sort((a, b) => -1 * a.CompareTo(b)); //create tag infos foreach(int tag in tags) diff --git a/Source/Core/Types/LinedefTagHandler.cs b/Source/Core/Types/LinedefTagHandler.cs index 3561db88..cbc3acf5 100644 --- a/Source/Core/Types/LinedefTagHandler.cs +++ b/Source/Core/Types/LinedefTagHandler.cs @@ -41,8 +41,8 @@ namespace CodeImp.DoomBuilder.Types tags.Add(t.Tag); } - //now sort them - tags.Sort(); + //now sort them in descending order + tags.Sort((a, b) => -1 * a.CompareTo(b)); //create enum items foreach(int tag in tags) diff --git a/Source/Core/Types/SectorTagHandler.cs b/Source/Core/Types/SectorTagHandler.cs index 10ec7f16..f145f59b 100644 --- a/Source/Core/Types/SectorTagHandler.cs +++ b/Source/Core/Types/SectorTagHandler.cs @@ -80,8 +80,8 @@ namespace CodeImp.DoomBuilder.Types tags.Add(t.Tag); } - //now sort them - tags.Sort(); + //now sort them in descending order + tags.Sort((a, b) => -1 * a.CompareTo(b)); //create enum items foreach(int tag in tags) diff --git a/Source/Core/Types/ThingTagHandler.cs b/Source/Core/Types/ThingTagHandler.cs index 8fb2c120..9f3c377d 100644 --- a/Source/Core/Types/ThingTagHandler.cs +++ b/Source/Core/Types/ThingTagHandler.cs @@ -41,8 +41,8 @@ namespace CodeImp.DoomBuilder.Types tags.Add(t.Tag); } - //now sort them - tags.Sort(); + //now sort them in descending order + tags.Sort((a, b) => -1 * a.CompareTo(b)); //create enum items foreach(int tag in tags)