Fixed, Thing info panel: fixed KeyNotFoundException when highlighted thing had unknown action.

Fixed: in some cases the number of generalized sector effects displayed in Sector info panel and action selector control was calculated incorrectly.
This commit is contained in:
MaxED 2015-09-02 11:28:44 +00:00
parent dc29b59fe8
commit df90ef562c
2 changed files with 6 additions and 4 deletions

View file

@ -964,6 +964,7 @@ namespace CodeImp.DoomBuilder.Config
{
title = option.Name + ": " + bit.Title;
matches++;
break;
}
}
}

View file

@ -79,10 +79,11 @@ namespace CodeImp.DoomBuilder.Controls
ThingTypeInfo ti = General.Map.Data.GetThingInfo(t.Type);
// Get thing action information
LinedefActionInfo act = General.Map.Config.LinedefActions[t.Action];
if(General.Map.Config.LinedefActions.ContainsKey(t.Action)) actioninfo = act.ToString();
else if(t.Action == 0) actioninfo = t.Action + " - None";
else actioninfo = t.Action + " - Unknown";
LinedefActionInfo act;
if(General.Map.Config.LinedefActions.ContainsKey(t.Action)) act = General.Map.Config.LinedefActions[t.Action];
else if(t.Action == 0) act = new LinedefActionInfo(0, "None", true, false);
else act = new LinedefActionInfo(t.Action, "Unknown", false, false);
actioninfo = act.ToString();
// Determine z info to show
t.DetermineSector();