(svn r18220) -Codechange: Reduce number of nested widget dynamic casts.

This commit is contained in:
alberth
2009-11-22 13:22:53 +00:00
parent 2332034822
commit bf93372ca2
14 changed files with 48 additions and 42 deletions

View File

@@ -413,7 +413,7 @@ struct CompanyFinancesWindow : Window {
if (!small) {
/* Check that the expenses panel height matches the height needed for the layout. */
int type = _settings_client.gui.expenses_layout;
if (_expenses_list_types[type].GetHeight() != this->GetWidget<NWidgetCore>(CFW_EXPS_CATEGORY)->current_y) {
if (_expenses_list_types[type].GetHeight() != this->GetWidget<NWidgetBase>(CFW_EXPS_CATEGORY)->current_y) {
this->SetupWidgets();
this->ReInit();
return;