summaryrefslogtreecommitdiff
path: root/src/road_gui.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-01-27 11:01:10 +0000
committerpeter1138 <peter1138@openttd.org>2008-01-27 11:01:10 +0000
commitec1d5478891d365e4db4da5bc0e4eb1a51779dec (patch)
tree0e1beb3106f8e27722ec2f9a2861a662e09a4207 /src/road_gui.cpp
parentf93943ebcf363b9547d8b4035c83b680fa231bb6 (diff)
downloadopenttd-ec1d5478891d365e4db4da5bc0e4eb1a51779dec.tar.xz
(svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.
Diffstat (limited to 'src/road_gui.cpp')
-rw-r--r--src/road_gui.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp
index 11ccd44ef..811a20d82 100644
--- a/src/road_gui.cpp
+++ b/src/road_gui.cpp
@@ -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;