summaryrefslogtreecommitdiff
path: root/src/genworld_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-12-17 20:52:07 +0000
committerfrosch <frosch@openttd.org>2011-12-17 20:52:07 +0000
commit4e4a87bd3c15da581b82549cd38451df20e7687d (patch)
treea27895031daa87ca0b9c55f60eb5e20de50d996d /src/genworld_gui.cpp
parent82469946ab01a7f67f2fc28c3b53879101c582b5 (diff)
downloadopenttd-4e4a87bd3c15da581b82549cd38451df20e7687d.tar.xz
(svn r23579) -Fix (r23525): Most up/down arrows stopped working.
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r--src/genworld_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp
index e46fbc466..8ee5f6c6b 100644
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -593,7 +593,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case WID_GL_START_DATE_DOWN:
case WID_GL_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */
- if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
+ if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
_settings_newgame.game_creation.starting_year = Clamp(_settings_newgame.game_creation.starting_year + widget - WID_GL_START_DATE_TEXT, MIN_YEAR, MAX_YEAR);
@@ -611,7 +611,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case WID_GL_SNOW_LEVEL_DOWN:
case WID_GL_SNOW_LEVEL_UP: // Snow line buttons
/* Don't allow too fast scrolling */
- if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
+ if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
_settings_newgame.game_creation.snow_line_height = Clamp(_settings_newgame.game_creation.snow_line_height + widget - WID_GL_SNOW_LEVEL_TEXT, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT);
@@ -984,7 +984,7 @@ struct CreateScenarioWindow : public Window
case WID_CS_START_DATE_DOWN:
case WID_CS_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */
- if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
+ if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
this->SetDirty();
@@ -1002,7 +1002,7 @@ struct CreateScenarioWindow : public Window
case WID_CS_FLAT_LAND_HEIGHT_DOWN:
case WID_CS_FLAT_LAND_HEIGHT_UP: // Height level buttons
/* Don't allow too fast scrolling */
- if ((this->flags & WF_TIMEOUT) && this->timeout_timer <= 1) {
+ if (!(this->flags & WF_TIMEOUT) || this->timeout_timer <= 1) {
this->HandleButtonClick(widget);
this->SetDirty();