(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)
authorbjarni
Mon, 03 Jan 2005 21:01:37 +0000
changeset 870 1b8600157298
parent 869 f211ac238c8e
child 871 63d7f79199ec
(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)
vehicle_gui.c
--- a/vehicle_gui.c	Mon Jan 03 20:52:09 2005 +0000
+++ b/vehicle_gui.c	Mon Jan 03 21:01:37 2005 +0000
@@ -365,6 +365,8 @@
 	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 @@
 			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);