@@ -2786,24 +2786,27 @@ public:
const Vehicle *v = Vehicle::Get(this->window_number);
bool is_localcompany = v->owner == _local_company;
bool refitable_and_stopped_in_depot = IsVehicleRefitable(v);
this->SetWidgetDisabledState(WID_VV_RENAME, !is_localcompany);
this->SetWidgetDisabledState(WID_VV_GOTO_DEPOT, !is_localcompany);
this->SetWidgetDisabledState(WID_VV_REFIT, !refitable_and_stopped_in_depot || !is_localcompany);
this->SetWidgetDisabledState(WID_VV_CLONE, !is_localcompany);
if (v->type == VEH_TRAIN) {
this->SetWidgetLoweredState(WID_VV_FORCE_PROCEED, Train::From(v)->force_proceed == TFP_SIGNAL);
this->SetWidgetDisabledState(WID_VV_FORCE_PROCEED, !is_localcompany);
}
if (v->type == VEH_TRAIN || v->type == VEH_ROAD) {
this->SetWidgetDisabledState(WID_VV_TURN_AROUND, !is_localcompany);
this->SetWidgetDisabledState(WID_VV_ORDER_LOCATION, v->current_order.GetLocation(v) == INVALID_TILE);
this->DrawWidgets();
void SetStringParameters(int widget) const override
{
if (widget != WID_VV_CAPTION) return;
Status change: