mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Fixed a bug where trying to align the grid to a linedef or setting the grid origin to a vertex would crash when no map was opened. Fixes #536
This commit is contained in:
parent
feef304423
commit
2abcbfffab
1 changed files with 6 additions and 0 deletions
|
@ -2948,6 +2948,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
[BeginAction("aligngridtolinedef")]
|
||||
protected void AlignGridToLinedef()
|
||||
{
|
||||
if (General.Map == null)
|
||||
return;
|
||||
|
||||
if (General.Map.Map.SelectedLinedefsCount != 1)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Exactly one linedef must be selected");
|
||||
|
@ -2965,6 +2968,9 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
[BeginAction("setgridorigintovertex")]
|
||||
protected void SetGridOriginToVertex()
|
||||
{
|
||||
if (General.Map == null)
|
||||
return;
|
||||
|
||||
if (General.Map.Map.SelectedVerticessCount != 1)
|
||||
{
|
||||
General.Interface.DisplayStatus(StatusType.Warning, "Exactly one vertex must be selected");
|
||||
|
|
Loading…
Reference in a new issue