(svn r13078) -Fix: group gui used the vehicle type before it was actually set.
authorrubidium
Tue, 13 May 2008 21:50:31 +0000
changeset 10534 da1bea97f733
parent 10533 24b0b6e1e8e9
child 10535 7f2ce934723b
(svn r13078) -Fix: group gui used the vehicle type before it was actually set.
src/group_gui.cpp
--- a/src/group_gui.cpp	Tue May 13 21:36:09 2008 +0000
+++ b/src/group_gui.cpp	Tue May 13 21:50:31 2008 +0000
@@ -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);