Fix error that prevented dragging a single unselected map element

This commit is contained in:
spherallic 2023-05-07 15:57:04 +02:00
parent 53ca8efc6a
commit c3d4363b94
4 changed files with 4 additions and 4 deletions

View file

@ -1152,7 +1152,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
if(unaffectedCount == selectedlines.Count)
if(unaffectedCount > 0 && unaffectedCount == selectedlines.Count)
{
General.Interface.DisplayStatus(StatusType.Warning, "Unable to drag selection: " + (selectedlines.Count == 1 ? "selected linedef is" : "all of selected linedefs are") + " outside of map boundary!");
General.Interface.RedrawDisplay();

View file

@ -1344,7 +1344,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
if(unaffectedCount == selectedsectors.Count)
if(unaffectedCount > 0 && unaffectedCount == selectedsectors.Count)
{
General.Interface.DisplayStatus(StatusType.Warning, "Unable to drag selection: " + (selectedsectors.Count == 1 ? "selected sector is" : "all of selected sectors are") + " outside of map boundary!");
General.Interface.RedrawDisplay();

View file

@ -825,7 +825,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
if(unaffectedCount == selectedthings.Count)
if(unaffectedCount > 0 && unaffectedCount == selectedthings.Count)
{
General.Interface.DisplayStatus(StatusType.Warning, "Unable to drag selection: " + (selectedthings.Count == 1 ? "selected thing is" : "all of selected things are") + " outside of map boundary!");
General.Interface.RedrawDisplay();

View file

@ -661,7 +661,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
if(unaffectedCount == selectedverts.Count)
if(unaffectedCount > 0 && unaffectedCount == selectedverts.Count)
{
General.Interface.DisplayStatus(StatusType.Warning, "Unable to drag selection: " + (selectedverts.Count == 1 ? "selected vertex is" : "all of selected vertices are") + " outside of map boundary!");
General.Interface.RedrawDisplay();