| 1877 | } |
| 1878 | |
| 1879 | void BaseVehicleListWindow::UpdateVehicleGroupBy(GroupBy group_by) |
| 1880 | { |
| 1881 | if (this->grouping != group_by) { |
| 1882 | /* Save the old sorting option, so that if we change the grouping option back later on, |
| 1883 | * UpdateSortingFromGrouping() will automatically restore the saved sorting option. */ |
| 1884 | *this->sorting = this->vehgroups.GetListing(); |
| 1885 | |
| 1886 | this->grouping = group_by; |
| 1887 | _grouping[this->vli.type][this->vli.vtype] = group_by; |
| 1888 | this->UpdateSortingFromGrouping(); |
| 1889 | } |
| 1890 | } |
| 1891 | |
| 1892 | /** |
| 1893 | * Window for the (old) vehicle listing. |
no test coverage detected