Skip to content

Commit 56033b8

Browse files
committed
Do not close the terrain generator configuration window on pressing "Apply" if there is an error in the specified configuration
1 parent e33e42e commit 56033b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/TSMapEditor/UI/Windows/TerrainGenerator/TerrainGeneratorConfigWindow.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ private void BtnApply_LeftClick(object sender, EventArgs e)
293293
{
294294
TerrainGeneratorConfig = GatherConfiguration("Customized Configuration");
295295

296-
Hide();
296+
if (TerrainGeneratorConfig != null) // Do not close the window if there's an error condition
297+
Hide();
297298
}
298299

299300
public void Open()

0 commit comments

Comments
 (0)