(svn r17623) -Codechange: don't update the station's joiner scrollbar count in the drawing code

pull/155/head
rubidium 15 years ago
parent 6cca65a38a
commit a4ec7fcf8f

@ -1226,7 +1226,7 @@ struct SelectStationWindow : Window {
this->vscroll.SetCapacity(6);
this->resize.step_height = 10;
FindStationsNearby<T>(this->area, true);
this->OnInvalidateData(0);
this->widget[JSW_WIDGET_CAPTION].data = T::EXPECTED_FACIL == FACIL_WAYPOINT ? STR_JOIN_WAYPOINT_CAPTION : STR_JOIN_STATION_CAPTION;
this->FindWindowPlacementAndResize(desc);
@ -1234,8 +1234,6 @@ struct SelectStationWindow : Window {
virtual void OnPaint()
{
this->vscroll.SetCount(_stations_nearby_list.Length() + 1);
this->DrawWidgets();
uint y = 17;
@ -1286,12 +1284,13 @@ struct SelectStationWindow : Window {
virtual void OnResize(Point delta)
{
this->vscroll.UpdateCapacity((this->widget[JSW_PANEL].bottom - this->widget[JSW_PANEL].top) / 10);
this->vscroll.UpdateCapacity(delta.y / 10);
}
virtual void OnInvalidateData(int data)
{
FindStationsNearby<T>(this->area, true);
this->vscroll.SetCount(_stations_nearby_list.Length() + 1);
this->SetDirty();
}
};

Loading…
Cancel
Save