From dd6faa65e96fa6ecfa4cd92a1df5c1c1278e57a5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 31 Oct 2010 13:54:09 +0000 Subject: [PATCH] (svn r21061) [1.0] -Backport from trunk: - Fix: Missing default values for the custom town number in the world generation options (r21034) - Fix: Dropdown menu glitched in small screenshots, when issueing them from the menu (r21031) --- src/ai/api/ai_changelog.hpp | 4 ++++ src/genworld_gui.cpp | 1 + src/widgets/dropdown.cpp | 8 ++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ai/api/ai_changelog.hpp b/src/ai/api/ai_changelog.hpp index 501057bd4f..a1c75ebe3d 100644 --- a/src/ai/api/ai_changelog.hpp +++ b/src/ai/api/ai_changelog.hpp @@ -14,6 +14,10 @@ * functions may still be available if you return an older API version * in GetAPIVersion() in info.nut. * + * \b 1.0.5 + * + * No changes + * * \b 1.0.4 * * No changes diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 0ed7a9bd0b..c34c01d9c6 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -743,6 +743,7 @@ struct GenerateLandscapeWindow : public QueryStringBaseWindow { switch (this->widget_id) { case GLAND_START_DATE_TEXT: value = DEF_START_YEAR; break; case GLAND_SNOW_LEVEL_TEXT: value = DEF_SNOWLINE_HEIGHT; break; + case GLAND_TOWN_PULLDOWN: value = 1; break; default: NOT_REACHED(); } } diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 7bac59bb38..ed6797c9cb 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -281,8 +281,10 @@ struct DropdownWindow : Window { } if (this->click_delay != 0 && --this->click_delay == 0) { - /* Make the dropdown "invisible", so it doesn't affect new window placement. */ + /* Make the dropdown "invisible", so it doesn't affect new window placement. + * Also mark it dirty in case the callback deals with the screen. (e.g. screenshots). */ this->window_class = WC_INVALID; + this->SetDirty(); w2->OnDropdownSelect(this->parent_button, this->selected_index); delete this; @@ -296,8 +298,10 @@ struct DropdownWindow : Window { this->drag_mode = false; if (!this->GetDropDownItem(item)) { if (this->instant_close) { - /* Make the dropdown "invisible", so it doesn't affect new window placement. */ + /* Make the dropdown "invisible", so it doesn't affect new window placement. + * Also mark it dirty in case the callback deals with the screen. (e.g. screenshots). */ this->window_class = WC_INVALID; + this->SetDirty(); if (GetWidgetFromPos(w2, _cursor.pos.x - w2->left, _cursor.pos.y - w2->top) == this->parent_button) { /* Send event for selected option if we're still