(svn r15088) -Fix [FS#2536]: Resize company list in town authority window if required.

This commit is contained in:
peter1138 2009-01-15 12:50:59 +00:00
parent 4f4408f37e
commit 1ee0c4caf4
1 changed files with 8 additions and 0 deletions

View File

@ -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;