mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r16890) -Codechange: Allow raising and enabling/disabling of widgets even if they are not used.
This commit is contained in:
parent
38d88f10fe
commit
1978c7dc87
@ -208,7 +208,7 @@ void Window::RaiseButtons()
|
||||
}
|
||||
if (this->nested_array != NULL) {
|
||||
for (uint i = 0; i < this->nested_array_size; i++) {
|
||||
if (this->IsWidgetLowered(i)) {
|
||||
if (this->nested_array[i] != NULL && this->IsWidgetLowered(i)) {
|
||||
this->RaiseWidget(i);
|
||||
this->InvalidateWidget(i);
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ public:
|
||||
}
|
||||
if (this->nested_array != NULL) {
|
||||
assert(widget_index < this->nested_array_size);
|
||||
this->nested_array[widget_index]->SetDisabled(disab_stat);
|
||||
if (this->nested_array[widget_index] != NULL) this->nested_array[widget_index]->SetDisabled(disab_stat);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user