Mercurial > hg > openttd
changeset 9212:cfbd67d81940 draft
(svn r13078) -Fix: group gui used the vehicle type before it was actually set.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Tue, 13 May 2008 21:50:31 +0000 |
parents | 30076ddd1741 |
children | d288bb9876c7 |
files | src/group_gui.cpp |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/group_gui.cpp +++ b/src/group_gui.cpp @@ -190,6 +190,7 @@ VehicleGroupWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number) { const PlayerID owner = (PlayerID)GB(this->window_number, 0, 8); + this->vehicle_type = (VehicleType)GB(this->window_number, 11, 5); this->caption_color = owner; this->hscroll.cap = 224; @@ -222,8 +223,6 @@ case VEH_AIRCRAFT: this->sorting = &_sorting.aircraft; break; } - this->vehicle_type = (VehicleType)GB(this->window_number, 11, 5); - this->vehicles.sort_list = NULL; this->vehicles.sort_type = this->sorting->criteria; this->vehicles.flags = VL_REBUILD | (this->sorting->order ? VL_DESC : VL_NONE);