From b9a0a31127cdd97d9ce4da85ce225346d6754873 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Sun, 5 Feb 2017 14:03:35 -0800 Subject: [PATCH] - fixed Issue #146 --- source/glest_map_editor/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index 57e6bd7a..cfa1f9ed 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -1028,7 +1028,7 @@ void MainWindow::onMenuEditRandomizeHeights(wxCommandEvent &event) { program->setUndoPoint(ctAll);//randomizeHeights(-300,400,30,3); SimpleDialog simpleDialog; - simpleDialog.addValue("Initial Reset", boolToStr(randomWithReset),"If set to '0' no height reset is done before calculating"); + simpleDialog.addValue("Initial Reset", boolToStr(randomWithReset),"(1 = true, 0 = false) If set to '0' no height reset is done before calculating"); simpleDialog.addValue("Min Height", intToStr(randomMinimumHeight),"Lowest random height. example: -300 or below if you want water , 0 if you don't want water."); simpleDialog.addValue("Max Height", intToStr(randomMaximumHeight),"Max random height. A good value is 400"); simpleDialog.addValue("Chance Devider", intToStr(randomChanceDevider),"Defines how often you get a hill or hole default is 30. Bigger number, less hills/holes."); @@ -1036,7 +1036,13 @@ void MainWindow::onMenuEditRandomizeHeights(wxCommandEvent &event) { if (!simpleDialog.show("Randomize Height")) return; try { - randomWithReset=strToBool(simpleDialog.getValue("Initial Reset")); + string checkValue = simpleDialog.getValue("Initial Reset"); + if(checkValue != "" && strToInt(checkValue) > 1) { + randomWithReset = true; + } + else { + randomWithReset = strToBool(simpleDialog.getValue("Initial Reset")); + } randomMinimumHeight=strToInt(simpleDialog.getValue("Min Height")); randomMaximumHeight=strToInt(simpleDialog.getValue("Max Height")); randomChanceDevider=strToInt(simpleDialog.getValue("Chance Devider"));