| 1859 | } |
| 1860 | |
| 1861 | void BaseVehicleListWindow::UpdateSortingFromGrouping() |
| 1862 | { |
| 1863 | /* Set up sorting. Make the window-specific _sorting variable |
| 1864 | * point to the correct global _sorting struct so we are freed |
| 1865 | * from having conditionals during window operation */ |
| 1866 | switch (this->vli.vtype) { |
| 1867 | case VEH_TRAIN: this->sorting = &_sorting[this->grouping].train; break; |
| 1868 | case VEH_ROAD: this->sorting = &_sorting[this->grouping].roadveh; break; |
| 1869 | case VEH_SHIP: this->sorting = &_sorting[this->grouping].ship; break; |
| 1870 | case VEH_AIRCRAFT: this->sorting = &_sorting[this->grouping].aircraft; break; |
| 1871 | default: NOT_REACHED(); |
| 1872 | } |
| 1873 | this->vehgroups.SetSortFuncs(this->GetVehicleSorterFuncs()); |
| 1874 | this->vehgroups.SetListing(*this->sorting); |
| 1875 | this->vehgroups.ForceRebuild(); |
| 1876 | this->vehgroups.NeedResort(); |
| 1877 | } |
| 1878 | |
| 1879 | void BaseVehicleListWindow::UpdateVehicleGroupBy(GroupBy group_by) |
| 1880 | { |
no test coverage detected