@@ -245,25 +245,25 @@ protected:
return -(minr1 - minr2);
}
/** Sort the stations list */
void SortStationsList()
{
if (!this->stations.Sort()) return;
/* Reset name sorter sort cache */
this->last_station = NULL;
/* Set the modified widget dirty */
this->InvalidateWidget(SLW_LIST);
this->SetWidgetDirty(SLW_LIST);
public:
CompanyStationsWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number)
this->owner = (Owner)this->window_number;
this->vscroll.SetCapacity(12);
this->resize.step_height = 10;
this->resize.height = this->height - 10 * 7; // minimum if 5 in the list
/* Add cargo filter buttons */
uint num_active = 0;
@@ -960,25 +960,25 @@ struct StationViewWindow : public Window
y += 10;
void HandleCargoWaitingClick(int row)
if (row == 0) return;
for (CargoID c = 0; c < NUM_CARGO; c++) {
if (this->cargo_rows[c] == row) {
ToggleBit(this->cargo, c);
this->InvalidateWidget(SVW_WAITING);
this->SetWidgetDirty(SVW_WAITING);
break;
virtual void OnClick(Point pt, int widget)
switch (widget) {
case SVW_WAITING:
this->HandleCargoWaitingClick((pt.y - this->widget[SVW_WAITING].top) / 10 + this->vscroll.GetPosition());