Tag Range plugin: tags of selected map elements should not be considered as "already used".

This commit is contained in:
MaxED 2014-08-12 08:30:19 +00:00
parent 9802b653d8
commit 18dea2d7da

View file

@ -34,6 +34,7 @@ namespace CodeImp.DoomBuilder.TagRange
string modename = General.Editing.Mode.GetType().Name; string modename = General.Editing.Mode.GetType().Name;
if(modename == "SectorsMode") if(modename == "SectorsMode")
{ {
General.Map.Map.MarkSelectedSectors(true, true); //mxd
selectiontype = UniversalType.SectorTag; selectiontype = UniversalType.SectorTag;
ICollection<Sector> list = General.Map.Map.GetSelectedSectors(true); ICollection<Sector> list = General.Map.Map.GetSelectedSectors(true);
initialtags = new List<int>(list.Count); //mxd initialtags = new List<int>(list.Count); //mxd
@ -43,6 +44,7 @@ namespace CodeImp.DoomBuilder.TagRange
} }
else if(modename == "LinedefsMode") else if(modename == "LinedefsMode")
{ {
General.Map.Map.MarkSelectedLinedefs(true, true); //mxd
selectiontype = UniversalType.LinedefTag; selectiontype = UniversalType.LinedefTag;
ICollection<Linedef> list = General.Map.Map.GetSelectedLinedefs(true); ICollection<Linedef> list = General.Map.Map.GetSelectedLinedefs(true);
initialtags = new List<int>(list.Count); //mxd initialtags = new List<int>(list.Count); //mxd
@ -52,6 +54,7 @@ namespace CodeImp.DoomBuilder.TagRange
} }
else if(modename == "ThingsMode") else if(modename == "ThingsMode")
{ {
General.Map.Map.MarkSelectedThings(true, true); //mxd
selectiontype = UniversalType.ThingTag; selectiontype = UniversalType.ThingTag;
ICollection<Thing> list = General.Map.Map.GetSelectedThings(true); ICollection<Thing> list = General.Map.Map.GetSelectedThings(true);
initialtags = new List<int>(list.Count); //mxd initialtags = new List<int>(list.Count); //mxd