From 487e1478ddb0851ca176db62e83c7792718f02d2 Mon Sep 17 00:00:00 2001 From: MaxED <j.maxed@gmail.com> Date: Mon, 8 Jun 2015 14:37:20 +0000 Subject: [PATCH] Fixed, DECORATE: quoted //$category definitions were processed differently than unquoted ones. Fixed, Thing Categories: in some cases several subcategories with the same name were created. --- Source/Core/Data/DataManager.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/Data/DataManager.cs b/Source/Core/Data/DataManager.cs index b09e3c209..cd42a4c1f 100644 --- a/Source/Core/Data/DataManager.cs +++ b/Source/Core/Data/DataManager.cs @@ -1383,7 +1383,7 @@ namespace CodeImp.DoomBuilder.Data // Check if we want to add this actor if(actor.DoomEdNum > 0) { - string catname = actor.GetPropertyAllValues("$category"); + string catname = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$category")); string[] catnames; //mxd if(string.IsNullOrEmpty(catname.Trim())) catnames = new[] { "decorate" }; @@ -1455,7 +1455,7 @@ namespace CodeImp.DoomBuilder.Data if(actor != null) { // Find the category to put the actor in - string catname = actor.GetPropertyAllValues("$category"); + string catname = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$category")); string[] catnames; //mxd if(string.IsNullOrEmpty(catname.Trim())) catnames = new[] { "decorate" }; @@ -1567,7 +1567,6 @@ namespace CodeImp.DoomBuilder.Data ThingCategory cat = null; string catname = catnames[0].ToLowerInvariant().Trim(); if(string.IsNullOrEmpty(catname)) catname = "decorate"; - if(parent != null) catname = parent.Name + "." + catname; // First search by Title... foreach(ThingCategory c in categories) @@ -1575,6 +1574,9 @@ namespace CodeImp.DoomBuilder.Data if(c.Title.ToLowerInvariant() == catname) cat = c; } + // Make full name + if(parent != null) catname = parent.Name.ToLowerInvariant() + "." + catname; + //...then - by Name if(cat == null) { -- GitLab