(svn r23484) -Fix [FS#4770]: in case you already have orders, ignore the vehicles when adding an extra order

This commit is contained in:
rubidium
2011-12-10 19:20:30 +00:00
parent d800fcae1d
commit b5a2183214
4 changed files with 9 additions and 6 deletions

View File

@@ -838,12 +838,14 @@ struct DepotWindow : Window {
/**
* Clones a vehicle
* @param v the original vehicle to clone
* @return Always true.
*/
virtual void OnVehicleSelect(const Vehicle *v)
virtual bool OnVehicleSelect(const Vehicle *v)
{
if (DoCommandP(this->window_number, v->index, _ctrl_pressed ? 1 : 0, CMD_CLONE_VEHICLE | CMD_MSG(STR_ERROR_CAN_T_BUY_TRAIN + v->type), CcCloneVehicle)) {
ResetObjectToPlace();
}
return true;
}
virtual void OnPlaceObjectAbort()