MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / UpdateVehicleGroupBy

Method UpdateVehicleGroupBy

src/vehicle_gui.cpp:1879–1890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1877}
1878
1879void 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.

Callers 2

OnDropdownSelectMethod · 0.80
OnDropdownSelectMethod · 0.80

Calls 2

GetListingMethod · 0.45

Tested by

no test coverage detected