From 55b7e2178add8101568e65af4f21b023e5c5cd67 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 4 Jan 2022 00:15:40 +0000 Subject: [PATCH] Departure boards: Fix vehicle name column width with group vehicle names --- src/departures_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/departures_gui.cpp b/src/departures_gui.cpp index cbb17adba9..14ed6f834e 100644 --- a/src/departures_gui.cpp +++ b/src/departures_gui.cpp @@ -153,11 +153,11 @@ protected: && order->GetDestination() == this->station) { this->vehicles.push_back(v); - if (v->name.empty()) { + if (v->name.empty() && !(v->group_id != DEFAULT_GROUP && _settings_client.gui.vehicle_names != 0)) { if (v->unitnumber > unitnumber_max[v->type]) unitnumber_max[v->type] = v->unitnumber; } else { SetDParam(0, (uint64)(v->index)); - int width = (GetStringBoundingBox(STR_DEPARTURES_VEH)).width; + int width = (GetStringBoundingBox(STR_DEPARTURES_VEH)).width + 4; if (width > this->veh_width) this->veh_width = width; }