private TreeNode BuildPlanePortalLines(SectorGroup sectorgroup, string name, List<int> tags)
		{
			TreeNode node = new TreeNode(name + " Linedefs", 2, 2);
			List<Linedef> linedefs = new List<Linedef>();

			foreach (Sector s in sectorgroup.Sectors)
			{
				foreach (Sidedef sd in s.Sidedefs)
				{
					if (!linedefs.Contains(sd.Line) && (sd.Line.Action == 385 || (sd.Line.Action >= 358 && sd.Line.Action <= 361)) && tags.Contains(sd.Line.Tag))
						linedefs.Add(sd.Line);
				}
			}

			foreach (Linedef ld in linedefs.OrderBy(o => o.Action))
			{
				NodeInfo info = new NodeInfo(ld);
				LinedefActionInfo ldai = General.Map.Config.GetLinedefActionInfo(ld.Action);
				string ldname = string.Format("Ld {0}: {1} - {2}", ld.Index, ldai.Index, ldai.Name);
				node.Nodes.Add(new TreeNode(ldname, 2, 2) { Tag = info });
			}

			return node;
		}
		public void AddPortals(List<List<Linedef>> linedefgroups)
		{
			foreach (List<Linedef> linedefgroup in linedefgroups)
			{
				TreeNode node = new TreeNode(string.Format("Wall: tag {0}", linedefgroup[0].Tag), 3, 3);

				foreach (Linedef ld in linedefgroup)
				{
					NodeInfo info = new NodeInfo(ld);
					LinedefActionInfo ldai = General.Map.Config.GetLinedefActionInfo(ld.Action);
					string ldname = string.Format("Ld {0}: {1} - {2}", ld.Index, ldai.Index, ldai.Name);
					node.Nodes.Add(new TreeNode(ldname, 2, 2) { Tag = info });
				}

				node.Expand();

				portals.Nodes.Add(node);
			}
		}
		private TreeNode BuildPlanePortalSectors(SectorGroup sectorgroup, string name)
		{
			NodeInfo info = new NodeInfo(sectorgroup);
			TreeNode node = new TreeNode(name + " Sectors", 0, 0) { Tag = info };

			foreach (Sector s in sectorgroup.Sectors.OrderBy(o => o.Index))
			{
				info = new NodeInfo(s);
				node.Nodes.Add(new TreeNode(s.ToString(), 0, 0) { Tag = info });
			}

			return node;
		}