Fix crash on selecting tram station build tool

This commit is contained in:
dP
2020-05-19 18:41:15 +03:00
parent b5ce390be0
commit 7b15d2a938
3 changed files with 12 additions and 3 deletions

View File

@@ -78,7 +78,10 @@ This is usable for any OpenTTD servers
- Add new minimap mode showing industries, height and farms at the same time.
- Rename "CB town border" zone to "CB cargo acceptance", switch it to a new colored highlight and fix for new CB mode.
- Rename "New CB borders" zone to "CB town limit" and switch it to a new colored highlight. Remove old "CB borders" zone.
- In CB modes added CB town limit to outer town zones highlight (red border).
- Show engine id in build window in newgrf developer mode.
- Fixed crash on selecting tram station build tool.
- Fixed zoning hotkeys.
*** 1.10.1 (15 Apr 2020) ***
- Add a setting to autoopen vehicle window when cloning vehicles while sharing orders.

View File

@@ -83,4 +83,4 @@ const byte _openttd_revision_tagged = 1;
const uint32 _openttd_newgrf_version = 1 << 28 | 10 << 24 | 0 << 20 | 1 << 19 | 28004;
const char _citymania_version[] = "20200519-master-m7275346033 19.05.20";
const char _citymania_version[] = "20200519-master-m25fce2d061 19.05.20";

View File

@@ -1234,8 +1234,14 @@ struct BuildRoadStationWindow : public PickerWindowBase {
const RoadTypeInfo *rti = GetRoadTypeInfo(_cur_roadtype);
this->GetWidget<NWidgetCore>(WID_BROS_CAPTION)->widget_data = rti->strings.picker_title[rs];
for (uint i = RoadTypeIsTram(_cur_roadtype) ? WID_BROS_STATION_X : WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) {
this->GetWidget<NWidgetCore>(i)->tool_tip = rti->strings.picker_tooltip[rs];
if (RoadTypeIsTram(_cur_roadtype)) {
this->GetWidget<NWidgetCore>(WID_BROS_STATION_X)->tool_tip = rti->strings.picker_tooltip[rs];
this->GetWidget<NWidgetCore>(WID_BROS_STATION_Y)->tool_tip = rti->strings.picker_tooltip[rs];
this->GetWidget<NWidgetCore>(WID_BROS_STATION_XY_AUTO)->tool_tip = rti->strings.picker_tooltip[rs];
} else {
for (uint i = WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) {
this->GetWidget<NWidgetCore>(i)->tool_tip = rti->strings.picker_tooltip[rs];
}
}
this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE);