Add prompt for mass edits

This commit is contained in:
Kurt 2020-04-03 13:50:32 -07:00
parent 8202ce1da6
commit f5e96480fd

View File

@ -174,6 +174,8 @@ private static void RefreshTile(Control button, TerrainTile tile)
private void B_ZeroElevation_Click(object sender, EventArgs e)
{
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Set the elevation of all tiles to 0?"))
return;
foreach (var t in Terrain.Tiles)
t.Elevation = 0;
LoadGrid(AcreIndex);
@ -182,6 +184,8 @@ private void B_ZeroElevation_Click(object sender, EventArgs e)
private void B_ClearAll_Click(object sender, EventArgs e)
{
if (DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Reset all tiles to Base (Elevation 0)?"))
return;
foreach (var t in Terrain.Tiles)
t.Clear();
LoadGrid(AcreIndex);