summaryrefslogtreecommitdiff
path: root/src/airport_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
commit0847def759cd8c07d880387779d2d54cdc5382f8 (patch)
tree0e1beb3106f8e27722ec2f9a2861a662e09a4207 /src/airport_gui.cpp
parent7b29dcde3cef3d91dd23b3378736f378c028a16e (diff)
downloadopenttd-0847def759cd8c07d880387779d2d54cdc5382f8.tar.xz
(svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long.
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r--src/airport_gui.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index c65951bc9..86f288610 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -186,7 +186,12 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
DrawWindowWidgets(w);
// strings such as 'Size' and 'Coverage Area'
// 'Coverage Area'
- DrawStationCoverageAreaText(2, 206, SCT_ALL, rad);
+ int text_end = DrawStationCoverageAreaText(2, 206, SCT_ALL, rad) + 4;
+ if (text_end > w->widget[6].bottom) {
+ SetWindowDirty(w);
+ ResizeWindowForWidget(w, 6, 0, text_end - w->widget[6].bottom);
+ SetWindowDirty(w);
+ }
break;
}