summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-09-10 13:50:47 +0000
committeryexo <yexo@openttd.org>2010-09-10 13:50:47 +0000
commit95a2d1f90772e74ca81a282835656e3730dcaffe (patch)
tree6e809c93c11bbec595b22a791957d03d0af41659 /src
parentfa8bd8303654daed9310c896141b2a87b1c11e3e (diff)
downloadopenttd-95a2d1f90772e74ca81a282835656e3730dcaffe.tar.xz
(svn r20781) -Fix (r20780): FinishInitNested reset this->owner, so set it afterwards
Diffstat (limited to 'src')
-rw-r--r--src/group_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index da3eb452a..f076e3284 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -191,10 +191,9 @@ public:
this->BuildVehicleList();
this->SortVehicleList();
- this->owner = vli.company;
this->groups.ForceRebuild();
this->groups.NeedResort();
- this->BuildGroupList(this->owner);
+ this->BuildGroupList(vli.company);
this->groups.Sort(&GroupNameSorter);
this->GetWidget<NWidgetCore>(GRP_WIDGET_CAPTION)->widget_data = STR_VEHICLE_LIST_TRAIN_CAPTION + this->vli.vtype;
@@ -206,6 +205,7 @@ public:
this->GetWidget<NWidgetCore>(GRP_WIDGET_REPLACE_PROTECTION)->widget_data += this->vli.vtype;
this->FinishInitNested(desc, window_number);
+ this->owner = vli.company;
}
~VehicleGroupWindow()
@@ -301,7 +301,7 @@ public:
this->BuildVehicleList();
this->SortVehicleList();
- this->BuildGroupList(owner);
+ this->BuildGroupList(this->owner);
this->groups.Sort(&GroupNameSorter);
this->group_sb->SetCount(this->groups.Length());