changeset 16087:c6df3f294204 draft

(svn r20780) -Fix (r20772): group gui only worked properly for the first company
author yexo <yexo@openttd.org>
date Fri, 10 Sep 2010 13:34:47 +0000
parents 8963162a35da
children 9980d312a536
files src/group_gui.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -191,9 +191,10 @@
 		this->BuildVehicleList();
 		this->SortVehicleList();
 
+		this->owner = vli.company;
 		this->groups.ForceRebuild();
 		this->groups.NeedResort();
-		this->BuildGroupList(owner);
+		this->BuildGroupList(this->owner);
 		this->groups.Sort(&GroupNameSorter);
 
 		this->GetWidget<NWidgetCore>(GRP_WIDGET_CAPTION)->widget_data = STR_VEHICLE_LIST_TRAIN_CAPTION + this->vli.vtype;
@@ -205,7 +206,6 @@
 		this->GetWidget<NWidgetCore>(GRP_WIDGET_REPLACE_PROTECTION)->widget_data += this->vli.vtype;
 
 		this->FinishInitNested(desc, window_number);
-		this->owner = vli.company;
 	}
 
 	~VehicleGroupWindow()