1
0
Fork 0

(svn r23579) -Fix (r23525): Most up/down arrows stopped working.

release/1.2
frosch 2011-12-17 20:52:07 +00:00
parent 82469946ab
commit 4e4a87bd3c
3 changed files with 7 additions and 7 deletions

View File

@ -593,7 +593,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow {
case WID_GL_START_DATE_DOWN: case WID_GL_START_DATE_DOWN:
case WID_GL_START_DATE_UP: // Year buttons case WID_GL_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */ /* 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->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); _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_DOWN:
case WID_GL_SNOW_LEVEL_UP: // Snow line buttons case WID_GL_SNOW_LEVEL_UP: // Snow line buttons
/* Don't allow too fast scrolling */ /* 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->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); _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_DOWN:
case WID_CS_START_DATE_UP: // Year buttons case WID_CS_START_DATE_UP: // Year buttons
/* Don't allow too fast scrolling */ /* 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->HandleButtonClick(widget);
this->SetDirty(); this->SetDirty();
@ -1002,7 +1002,7 @@ struct CreateScenarioWindow : public Window
case WID_CS_FLAT_LAND_HEIGHT_DOWN: case WID_CS_FLAT_LAND_HEIGHT_DOWN:
case WID_CS_FLAT_LAND_HEIGHT_UP: // Height level buttons case WID_CS_FLAT_LAND_HEIGHT_UP: // Height level buttons
/* Don't allow too fast scrolling */ /* 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->HandleButtonClick(widget);
this->SetDirty(); this->SetDirty();

View File

@ -1087,7 +1087,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
case WID_NSS_COMPANIES_BTND: case WID_NSS_COMPANIES_BTNU: // Click on up/down button for number of companies case WID_NSS_COMPANIES_BTND: case WID_NSS_COMPANIES_BTNU: // Click on up/down button for number of companies
case WID_NSS_SPECTATORS_BTND: case WID_NSS_SPECTATORS_BTNU: // Click on up/down button for number of spectators case WID_NSS_SPECTATORS_BTND: case WID_NSS_SPECTATORS_BTNU: // Click on up/down button for number of spectators
/* Don't allow too fast scrolling */ /* 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->HandleButtonClick(widget);
this->SetDirty(); this->SetDirty();
switch (widget) { switch (widget) {

View File

@ -1039,7 +1039,7 @@ static CallBackFunction ToolbarScenDatePanel(Window *w)
static CallBackFunction ToolbarScenDateBackward(Window *w) static CallBackFunction ToolbarScenDateBackward(Window *w)
{ {
/* don't allow too fast scrolling */ /* don't allow too fast scrolling */
if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) { if (!(w->flags & WF_TIMEOUT) || w->timeout_timer <= 1) {
w->HandleButtonClick(WID_TE_DATE_BACKWARD); w->HandleButtonClick(WID_TE_DATE_BACKWARD);
w->SetDirty(); w->SetDirty();
@ -1053,7 +1053,7 @@ static CallBackFunction ToolbarScenDateBackward(Window *w)
static CallBackFunction ToolbarScenDateForward(Window *w) static CallBackFunction ToolbarScenDateForward(Window *w)
{ {
/* don't allow too fast scrolling */ /* don't allow too fast scrolling */
if ((w->flags & WF_TIMEOUT) && w->timeout_timer <= 1) { if (!(w->flags & WF_TIMEOUT) || w->timeout_timer <= 1) {
w->HandleButtonClick(WID_TE_DATE_FORWARD); w->HandleButtonClick(WID_TE_DATE_FORWARD);
w->SetDirty(); w->SetDirty();