summaryrefslogtreecommitdiff
path: root/src/depot_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-12-10 19:20:30 +0000
committerrubidium <rubidium@openttd.org>2011-12-10 19:20:30 +0000
commitb5a2183214f388e723a8abf1caef68037bdfe2c8 (patch)
treead101cda87941bbe95e541a330e1ebc851a94feb /src/depot_gui.cpp
parentd800fcae1da18bb0df1c3c1a28314b339b02ba99 (diff)
downloadopenttd-b5a2183214f388e723a8abf1caef68037bdfe2c8.tar.xz
(svn r23484) -Fix [FS#4770]: in case you already have orders, ignore the vehicles when adding an extra order
Diffstat (limited to 'src/depot_gui.cpp')
-rw-r--r--src/depot_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index cd0b4671d..05a07856d 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -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()