Fix #8250: [NRT] Company infrastructure window always omits last road/tramtype

pull/171/head
stormcone 4 years ago committed by GitHub
parent 94d5fcab4b
commit 816fada2b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1882,7 +1882,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);
@ -1905,7 +1905,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);

Loading…
Cancel
Save