From 1ee0c4caf43a8db43050ef0af3530061cad740fc Mon Sep 17 00:00:00 2001 From: peter1138 Date: Thu, 15 Jan 2009 12:50:59 +0000 Subject: [PATCH] (svn r15088) -Fix [FS#2536]: Resize company list in town authority window if required. --- src/town_gui.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/town_gui.cpp b/src/town_gui.cpp index db70a59846..21713474f4 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -210,6 +210,14 @@ public: y += 10; } } + + if (y > this->widget[TWA_RATING_INFO].bottom) { + /* If the company list is too big to fit, mark ourself dirty and draw again. */ + ResizeWindowForWidget(this, TWA_RATING_INFO, 0, y - this->widget[TWA_RATING_INFO].bottom); + this->SetDirty(); + return; + } + y = this->widget[TWA_COMMAND_LIST].top + 1; int pos = this->vscroll.pos;