ship_cmd.c
changeset 1128 d3ffc98b92ad
parent 1093 e8d26c7dc42f
child 1151 614cbcb5b9fe
equal deleted inserted replaced
1127:b7eaa0592b30 1128:d3ffc98b92ad
   875 
   875 
   876 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
   876 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
   877 		RebuildVehicleLists();
   877 		RebuildVehicleLists();
   878 		InvalidateWindow(WC_COMPANY, v->owner);
   878 		InvalidateWindow(WC_COMPANY, v->owner);
   879 	}
   879 	}
       
   880 	InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
   880 
   881 
   881 	return value;
   882 	return value;
   882 }
   883 }
   883 
   884 
   884 int32 CmdSellShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
   885 int32 CmdSellShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
   900 		RebuildVehicleLists();
   901 		RebuildVehicleLists();
   901 		InvalidateWindow(WC_COMPANY, v->owner);
   902 		InvalidateWindow(WC_COMPANY, v->owner);
   902 		DeleteWindowById(WC_VEHICLE_VIEW, v->index);
   903 		DeleteWindowById(WC_VEHICLE_VIEW, v->index);
   903 		DeleteVehicle(v);
   904 		DeleteVehicle(v);
   904 	}
   905 	}
       
   906 
       
   907 	InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Ship); // updates the replace Ship window
   905 
   908 
   906 	return -(int32)v->value;
   909 	return -(int32)v->value;
   907 }
   910 }
   908 
   911 
   909 // p1 = vehicle
   912 // p1 = vehicle