(svn r17786) -Fix [FS#3265]: graphical glitches (matrices/scrollbars with wrong 'size') upon reiniting windows

This commit is contained in:
rubidium
2009-10-17 14:29:10 +00:00
parent 36b28dd48a
commit b72898c8a3
20 changed files with 38 additions and 49 deletions

View File

@@ -1177,7 +1177,7 @@ struct BuildVehicleWindow : Window {
}
if (delta.y == 0) return;
this->vscroll.UpdateCapacity(delta.y / (int)GetVehicleListHeight(this->vehicle_type));
this->vscroll.SetCapacity((this->widget[BUILD_VEHICLE_WIDGET_LIST].bottom - this->widget[BUILD_VEHICLE_WIDGET_LIST].top + 1) / GetVehicleListHeight(this->vehicle_type));
this->widget[BUILD_VEHICLE_WIDGET_LIST].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);
}
};