(svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor)

This commit is contained in:
michi_cc
2012-04-17 19:44:02 +00:00
parent a0ccae3762
commit 72b3bb9dd5
14 changed files with 126 additions and 49 deletions

View File

@@ -305,7 +305,7 @@ void CDECL Window::SetWidgetsLoweredState(bool lowered_stat, int widgets, ...)
void Window::RaiseButtons(bool autoraise)
{
for (uint i = 0; i < this->nested_array_size; i++) {
if (this->nested_array[i] != NULL && (this->nested_array[i]->type & ~WWB_PUSHBUTTON) < WWT_LAST &&
if (this->nested_array[i] != NULL && ((this->nested_array[i]->type & ~WWB_PUSHBUTTON) < WWT_LAST || this->nested_array[i]->type == NWID_PUSHBUTTON_DROPDOWN) &&
(!autoraise || (this->nested_array[i]->type & WWB_PUSHBUTTON)) && this->IsWidgetLowered(i)) {
this->RaiseWidget(i);
this->SetWidgetDirty(i);