From 0847def759cd8c07d880387779d2d54cdc5382f8 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 27 Jan 2008 11:01:10 +0000 Subject: (svn r11993) -Fix: Resize station/roadstop/dock/airport construction windows if cargo acceptance list is too long. --- src/dock_gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/dock_gui.cpp') diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 2c36a1616..39f40a3a2 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -254,7 +254,13 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e) SetTileSelectSize(1, 1); } - DrawStationCoverageAreaText(4, 50, SCT_ALL, rad); + int text_end = DrawStationCoverageAreaText(4, 50, SCT_ALL, rad) + 4; + if (text_end > w->widget[2].bottom) { + SetWindowDirty(w); + ResizeWindowForWidget(w, 2, 0, text_end - w->widget[2].bottom); + SetWindowDirty(w); + } + break; } -- cgit v1.2.3-54-g00ecf