summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-01-23 21:54:50 +0000
committerYexo <yexo@openttd.org>2009-01-23 21:54:50 +0000
commit7b5bccb3299543c42b3fd14d2830e9d9aa37b62d (patch)
tree67c8701c5d4bdb332fd4dcf96c518a1381446791
parent757b11325b34020a75ef8e8ac5d6e5a056b7e2f5 (diff)
downloadopenttd-7b5bccb3299543c42b3fd14d2830e9d9aa37b62d.tar.xz
(svn r15240) -Fix (r15212): Loading heightmaps resulted in an assert.
-rw-r--r--src/genworld_gui.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index ba03462c4..a31668d7e 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -324,6 +324,13 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
this->SetWidgetDisabledState(GLAND_BORDERS_RANDOM, _settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges);
this->SetWidgetsDisabledState(_settings_newgame.game_creation.land_generator == 0 || !_settings_newgame.construction.freeform_edges || _settings_newgame.game_creation.water_borders == BORDERS_RANDOM,
GLAND_WATER_NW, GLAND_WATER_NE, GLAND_WATER_SE, GLAND_WATER_SW, WIDGET_LIST_END);
+
+ this->SetWidgetLoweredState(GLAND_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM);
+
+ this->SetWidgetLoweredState(GLAND_WATER_NW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NW));
+ this->SetWidgetLoweredState(GLAND_WATER_NE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NE));
+ this->SetWidgetLoweredState(GLAND_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
+ this->SetWidgetLoweredState(GLAND_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
}
/* Disable snowline if not hilly */
this->SetWidgetDisabledState(GLAND_SNOW_LEVEL_TEXT, _settings_newgame.game_creation.landscape != LT_ARCTIC);
@@ -342,13 +349,6 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
this->SetWidgetLoweredState(GLAND_TROPICAL, _settings_newgame.game_creation.landscape == LT_TROPIC);
this->SetWidgetLoweredState(GLAND_TOYLAND, _settings_newgame.game_creation.landscape == LT_TOYLAND);
- this->SetWidgetLoweredState(GLAND_BORDERS_RANDOM, _settings_newgame.game_creation.water_borders == BORDERS_RANDOM);
-
- this->SetWidgetLoweredState(GLAND_WATER_NW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NW));
- this->SetWidgetLoweredState(GLAND_WATER_NE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_NE));
- this->SetWidgetLoweredState(GLAND_WATER_SE, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SE));
- this->SetWidgetLoweredState(GLAND_WATER_SW, HasBit(_settings_newgame.game_creation.water_borders, BORDER_SW));
-
if (_game_mode == GM_EDITOR) {
this->widget[GLAND_TOWN_PULLDOWN].data = STR_6836_OFF;
this->widget[GLAND_INDUSTRY_PULLDOWN].data = STR_6836_OFF;