From 5e8bdaba6aa54e9f7615e46d33ec92d8d4ae11f1 Mon Sep 17 00:00:00 2001 From: bjarni Date: Mon, 12 Feb 2007 00:38:15 +0000 Subject: [PATCH] (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. --- src/order_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 21b711fe75..7a2adcf5df 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);