summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-10-24 20:23:45 +0000
committerfrosch <frosch@openttd.org>2010-10-24 20:23:45 +0000
commitd01e275a256c384c8952255a00114566eb1e9931 (patch)
tree33a1a7d3881cf8d846256dc79bb812c7546d7032
parentf24c91c4876e44ff9bed04bc5065f7966406bb87 (diff)
downloadopenttd-d01e275a256c384c8952255a00114566eb1e9931.tar.xz
(svn r21031) -Fix (r19883): Dropdown menu glitched in small screenshots, when issueing them from the menu.
-rw-r--r--src/widgets/dropdown.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 4609d07e2..ca859e799 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -287,8 +287,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;
@@ -302,8 +304,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