summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-01-03 21:01:37 +0000
committerbjarni <bjarni@openttd.org>2005-01-03 21:01:37 +0000
commitad24d6cb0407cb2f2442435b58bba89503a2a0e5 (patch)
treec3a8ba5402e2c640b0aa944761938e36c7fc3881 /vehicle_gui.c
parente0c4e144b91ba0cd05c7ec1890725a29ded86ef7 (diff)
downloadopenttd-ad24d6cb0407cb2f2442435b58bba89503a2a0e5.tar.xz
(svn r1351) fixed issue in last commit where it it not update the replace train window properly when changing company colour (the lower two panels stayed the old colour until the window was reopened)
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 1b932db52..be0418d53 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -365,6 +365,8 @@ static void SetupScrollStuffForReplaceWindow(Window *w)
switch (WP(w,replaceveh_d).vehicletype) {
case VEH_Train: {
railtype = WP(w,replaceveh_d).railtype;
+ w->widget[13].color = _player_colors[_local_player]; // sets the colour of that art thing
+ w->widget[16].color = _player_colors[_local_player]; // sets the colour of that art thing
for (engine_id = 0; engine_id < NUM_TRAIN_ENGINES; engine_id++) {
const Engine *e = DEREF_ENGINE(engine_id);
const EngineInfo *info = &_engine_info[engine_id];
@@ -928,8 +930,6 @@ void ShowReplaceVehicleWindow(byte vehicletype)
w = AllocateWindowDescFront(&_replace_rail_vehicle_desc, vehicletype);
w->vscroll.cap = 8;
w->resize.step_height = 14;
- w->widget[13].color = _player_colors[_local_player];
- w->widget[16].color = _player_colors[_local_player];
break;
case VEH_Road:
w = AllocateWindowDescFront(&_replace_road_vehicle_desc, vehicletype);