forked from mirror/OpenTTD
(svn r18580) -Codechange: Use widget information only for setting scrollbar capacity.
This commit is contained in:
@@ -1176,9 +1176,8 @@ struct BuildVehicleWindow : Window {
|
||||
|
||||
virtual void OnResize()
|
||||
{
|
||||
NWidgetCore *nwi = this->GetWidget<NWidgetCore>(BUILD_VEHICLE_WIDGET_LIST);
|
||||
this->vscroll.SetCapacity(nwi->current_y / this->resize.step_height);
|
||||
nwi->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
|
||||
this->vscroll.SetCapacityFromWidget(this, BUILD_VEHICLE_WIDGET_LIST);
|
||||
this->GetWidget<NWidgetCore>(BUILD_VEHICLE_WIDGET_LIST)->widget_data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user