From cb5a1300ac8a543d1d4bbad281e0650b6d75f727 Mon Sep 17 00:00:00 2001 From: stormcone <48624099+stormcone@users.noreply.github.com> Date: Thu, 2 Jul 2020 12:35:28 +0200 Subject: [PATCH] Fix #8250: [NRT] Company infrastructure window always omits last road/tramtype --- src/company_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/company_gui.cpp b/src/company_gui.cpp index 423efcb01f..0af1cf4ce5 100644 --- a/src/company_gui.cpp +++ b/src/company_gui.cpp @@ -1884,7 +1884,7 @@ struct CompanyInfrastructureWindow : Window switch (widget) { case WID_CI_RAIL_DESC: { - uint lines = 1; + uint lines = 1; // Starts at 1 because a line is also required for the section title size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_INFRASTRUCTURE_VIEW_RAIL_SECT).width); @@ -1907,7 +1907,7 @@ struct CompanyInfrastructureWindow : Window case WID_CI_ROAD_DESC: case WID_CI_TRAM_DESC: { - uint lines = 0; + uint lines = 1; // Starts at 1 because a line is also required for the section title size->width = max(size->width, GetStringBoundingBox(widget == WID_CI_ROAD_DESC ? STR_COMPANY_INFRASTRUCTURE_VIEW_ROAD_SECT : STR_COMPANY_INFRASTRUCTURE_VIEW_TRAM_SECT).width);