(svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.

This commit is contained in:
peter1138
2008-01-27 11:01:10 +00:00
parent 7b29dcde3c
commit 0847def759
6 changed files with 33 additions and 10 deletions

View File

@@ -825,9 +825,14 @@ static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
StationPickerDrawSprite(171, 35, st, INVALID_RAILTYPE, _cur_roadtype, 4);
StationPickerDrawSprite(171, 85, st, INVALID_RAILTYPE, _cur_roadtype, 5);
DrawStationCoverageAreaText(2, 146,
int text_end = DrawStationCoverageAreaText(2, 146,
(w->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY,
3);
3) + 4;
if (text_end > w->widget[BRSW_BACKGROUND].bottom) {
SetWindowDirty(w);
ResizeWindowForWidget(w, BRSW_BACKGROUND, 0, text_end - w->widget[BRSW_BACKGROUND].bottom);
SetWindowDirty(w);
}
} break;