summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2007-02-12 00:38:15 +0000
committerbjarni <bjarni@openttd.org>2007-02-12 00:38:15 +0000
commit94609499f35bd0b8d8047a69d7c31b2b9a64d8d8 (patch)
treea1a755d3c208d3d23c3659a4eaae966abc3456cf
parent4f1869010cdafc5389fb8b9f9bdfdee42b9c20e3 (diff)
downloadopenttd-94609499f35bd0b8d8047a69d7c31b2b9a64d8d8.tar.xz
(svn r8685) -Feature: selecting "end of orders" and clicking delete will delete all the vehicle's orders
If the orders are shared, then it will still unshare the orders like before.
-rw-r--r--src/order_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 21b711fe7..7a2adcf5d 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -94,7 +94,7 @@ static void DrawOrdersWindow(Window *w)
/* delete */
SetWindowWidgetDisabledState(w, ORDER_WIDGET_DELETE,
- (uint)v->num_orders + (shared_orders ? 1 : 0) <= (uint)WP(w, order_d).sel);
+ (uint)v->num_orders + ((shared_orders || v->num_orders != 0) ? 1 : 0) <= (uint)WP(w, order_d).sel);
/* non-stop only for trains */
SetWindowWidgetDisabledState(w, ORDER_WIDGET_NON_STOP, v->type != VEH_Train || order == NULL);