Expand non-essential selection functionality to lines.

This commit is contained in:
sphere 2021-11-10 01:03:40 +01:00
parent 676223929f
commit af673f3270
2 changed files with 20 additions and 3 deletions

View file

@ -1201,6 +1201,23 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RedrawDisplay();
}
[BeginAction("selectnonessential")]
public void SelectNonEssential()
{
int counter = 0;
ICollection<Linedef> selected = General.Map.Map.GetSelectedLinedefs(true);
foreach (Linedef ld in selected)
{
if (ld.Back != null && ld.Front.Sector == ld.Back.Sector)
counter++;
else
ld.Selected = false;
}
General.Interface.DisplayStatus(StatusType.Action, "Selected only non-essential lines (" + counter + ")");
General.Interface.RedrawDisplay();
}
[BeginAction("dissolveitem", BaseAction = true)] //mxd
public void DissolveItem()
{

View file

@ -345,9 +345,9 @@ resetflags
selectnonessential
{
title = "Select non-essential vertices";
category = "vertices";
description = "This selects all vertices that are not essential to sector shapes from your selection.";
title = "Select non-essential vertices/lines";
category = "classic";
description = "This selects all vertices or lines, that are not essential to sector shapes, from your selection.";
allowkeys = true;
allowmouse = true;
allowscroll = true;