(svn r22620) -Change [FS#4651]: Enforce refit orders to be 'always go to depot' orders; service-only and stop-in-depot orders make no sense with refitting.

This commit is contained in:
frosch
2011-07-02 16:45:54 +00:00
parent 1bc1a42ea5
commit 55a21a940d
2 changed files with 11 additions and 0 deletions

View File

@@ -980,6 +980,9 @@ public:
this->EnableWidget(ORDER_WIDGET_NON_STOP);
this->SetWidgetLoweredState(ORDER_WIDGET_NON_STOP, order->GetNonStopType() & ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
}
/* Disable refit button if the order is no 'always go' order.
* However, keep the service button enabled for refit-orders to allow clearing refits (without knowing about ctrl). */
this->SetWidgetDisabledState(ORDER_WIDGET_REFIT, (order->GetDepotOrderType() & ODTFB_SERVICE) || (order->GetDepotActionType() & ODATFB_HALT));
this->SetWidgetLoweredState(ORDER_WIDGET_SERVICE, order->GetDepotOrderType() & ODTFB_SERVICE);
break;