diff --git a/Source/Core/Editing/ThingsFilter.cs b/Source/Core/Editing/ThingsFilter.cs index a316f68e..9fdb5a35 100644 --- a/Source/Core/Editing/ThingsFilter.cs +++ b/Source/Core/Editing/ThingsFilter.cs @@ -290,7 +290,7 @@ namespace CodeImp.DoomBuilder.Editing foreach(Thing t in General.Map.Map.Things) { bool qualifies = true; - + // Get thing info ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type); @@ -321,7 +321,11 @@ namespace CodeImp.DoomBuilder.Editing { if(t.Flags.ContainsKey(s)) { - qualifies = (t.Flags[s] == true); + if(t.Flags[s] == false) + { + qualifies = false; + break; + } } else { @@ -338,7 +342,13 @@ namespace CodeImp.DoomBuilder.Editing foreach(string s in forbiddenfields) { if(t.Flags.ContainsKey(s)) - qualifies = (t.Flags[s] == false); + { + if(t.Flags[s] == true) + { + qualifies = false; + break; + } + } } } @@ -350,7 +360,11 @@ namespace CodeImp.DoomBuilder.Editing { if(t.Fields.ContainsKey(kv.Key)) { - qualifies = (t.Fields[kv.Key].Type == kv.Value.Type) && (t.Fields[kv.Key].Value.Equals(kv.Value.Value)); + if(!((t.Fields[kv.Key].Type == kv.Value.Type) && (t.Fields[kv.Key].Value.Equals(kv.Value.Value)))) + { + qualifies = false; + break; + } } else { diff --git a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs index 46fe73b0..36bfd9e9 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/EditSelectionMode.cs @@ -1272,6 +1272,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Update cached values General.Map.Data.UpdateUsedTextures(); General.Map.Map.Update(); + General.Map.ThingsFilter.Update(); // Make normal selection General.Map.Map.ClearAllSelected();