changeset 13568:2798a5f6fed5 draft

(svn r18090) -Fix: Only allow raising of WWT_* nested widgets.
author alberth <alberth@openttd.org>
date Sun, 15 Nov 2009 13:08:50 +0000
parents 14638a0897e7
children a133b5d4caff
files src/window.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -250,7 +250,8 @@
 	}
 	if (this->nested_array != NULL) {
 		for (uint i = 0; i < this->nested_array_size; i++) {
-			if (this->nested_array[i] != NULL && (!autoraise || (this->nested_array[i]->type & WWB_PUSHBUTTON)) && this->IsWidgetLowered(i)) {
+			if (this->nested_array[i] != NULL && (this->nested_array[i]->type & ~WWB_PUSHBUTTON) < WWT_LAST &&
+					(!autoraise || (this->nested_array[i]->type & WWB_PUSHBUTTON)) && this->IsWidgetLowered(i)) {
 				this->RaiseWidget(i);
 				this->SetWidgetDirty(i);
 			}