Fix terrain creation dialog regression

This commit is contained in:
Wojciech Figat
2022-01-12 11:04:21 +01:00
parent 317a9d63bc
commit 6d676fd578

View File

@@ -141,9 +141,6 @@ namespace FlaxEditor.Tools.Terrain
private void OnCreate()
{
if (_isWorking)
return;
var scene = Level.GetScene(0);
if (scene == null)
throw new InvalidOperationException("No scene found to add terrain to it!");
@@ -207,7 +204,7 @@ namespace FlaxEditor.Tools.Terrain
if (_isWorking)
return;
base.OnSubmit();
OnCreate();
}
/// <inheritdoc />
@@ -256,7 +253,7 @@ namespace FlaxEditor.Tools.Terrain
OnCancel();
return true;
case KeyboardKeys.Return:
OnCreate();
OnSubmit();
return true;
}