Fix station tab widgets not activating properly.

This commit is contained in:
Aaron van Geffen 2020-05-05 22:50:12 +02:00
parent 177533fbd9
commit a4dcf51fe3

View file

@ -307,7 +307,7 @@ namespace openloco::ui::windows::station
// TODO(avgeffen): only needs to be called once.
common::initEvents();
window->current_tab = 0;
window->current_tab = common::widx::tab_station - common::widx::tab_station;
window->invalidate();
window->widgets = station::widgets;
@ -746,7 +746,7 @@ namespace openloco::ui::windows::station
}
// Activate the current tab.
self->activated_widgets &= ~((1 << widx::tab_station) | (1 << widx::tab_cargo) | (1 << widx::tab_cargo_ratings));
self->activated_widgets &= ~((1ULL << widx::tab_station) | (1ULL << widx::tab_cargo) | (1ULL << widx::tab_cargo_ratings));
widx widgetIndex = tabInformationByTabOffset[self->current_tab].widgetIndex;
self->activated_widgets |= (1ULL << widgetIndex);