Fixed, Things mode: fixed a crash when switching to Things mode when more than 256 things were selected.

This commit is contained in:
MaxED 2016-04-29 23:19:02 +00:00
parent 977adb47f2
commit 4b45b4fd5e

View file

@ -999,13 +999,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Make text labels for selected linedefs
ICollection<Thing> orderedselection = General.Map.Map.GetSelectedThings(true);
labels = new Dictionary<Thing, TextLabel>(orderedselection.Count);
// Otherwise significant delays will occure.
// Also we probably won't care about selection ordering when selecting this many anyway
if(orderedselection.Count > MAX_THING_LABELS) return;
int index = 0;
labels = new Dictionary<Thing, TextLabel>(orderedselection.Count);
foreach(Thing thing in orderedselection)
{
TextLabel l = new TextLabel();