summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-01-15 12:50:59 +0000
committerpeter1138 <peter1138@openttd.org>2009-01-15 12:50:59 +0000
commit1ee0c4caf43a8db43050ef0af3530061cad740fc (patch)
tree9dcaa75bb5bdc14f1995cc71bd5c17e195444a9a /src
parent4f4408f37e1ce4476aa1a0f2125ee12eb7a16e8e (diff)
downloadopenttd-1ee0c4caf43a8db43050ef0af3530061cad740fc.tar.xz
(svn r15088) -Fix [FS#2536]: Resize company list in town authority window if required.
Diffstat (limited to 'src')
-rw-r--r--src/town_gui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index db70a5984..21713474f 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;