Fix company finance window being too small when first opened.
This commit is contained in:
@@ -283,6 +283,10 @@ struct CompanyFinancesWindow : Window {
|
|||||||
|
|
||||||
CompanyFinancesWindow(WindowDesc *desc, CompanyID company) : Window(desc)
|
CompanyFinancesWindow(WindowDesc *desc, CompanyID company) : Window(desc)
|
||||||
{
|
{
|
||||||
|
const Company *c = Company::Get(company);
|
||||||
|
if (c->money > CompanyFinancesWindow::max_money) {
|
||||||
|
CompanyFinancesWindow::max_money = max(c->money * 2, CompanyFinancesWindow::max_money * 4);
|
||||||
|
}
|
||||||
this->small = false;
|
this->small = false;
|
||||||
this->CreateNestedTree();
|
this->CreateNestedTree();
|
||||||
this->SetupWidgets();
|
this->SetupWidgets();
|
||||||
|
Reference in New Issue
Block a user