src/group_gui.cpp
changeset 10730 40906a6f031e
parent 10721 e6c323cb3fac
child 10769 a005e45d1f09
equal deleted inserted replaced
10729:d2adc1c2e5c0 10730:40906a6f031e
   145 		this->groups.Compact();
   145 		this->groups.Compact();
   146 		this->groups.RebuildDone();
   146 		this->groups.RebuildDone();
   147 	}
   147 	}
   148 
   148 
   149 	/** Sort the groups by their name */
   149 	/** Sort the groups by their name */
   150 	static int GroupNameSorter(const Group* const *a, const Group* const *b)
   150 	static int CDECL GroupNameSorter(const Group* const *a, const Group* const *b)
   151 	{
   151 	{
   152 		static const Group *last_group[2] = { NULL, NULL };
   152 		static const Group *last_group[2] = { NULL, NULL };
   153 		static char         last_name[2][64] = { "", "" };
   153 		static char         last_name[2][64] = { "", "" };
   154 
   154 
   155 		if (*a != last_group[0]) {
   155 		if (*a != last_group[0]) {
   293 			* else this->list will contain all vehicles which belong to the selected group */
   293 			* else this->list will contain all vehicles which belong to the selected group */
   294 		BuildVehicleList(this, owner, this->group_sel, IsAllGroupID(this->group_sel) ? VLW_STANDARD : VLW_GROUP_LIST);
   294 		BuildVehicleList(this, owner, this->group_sel, IsAllGroupID(this->group_sel) ? VLW_STANDARD : VLW_GROUP_LIST);
   295 		SortVehicleList(this);
   295 		SortVehicleList(this);
   296 
   296 
   297 		this->BuildGroupList(owner);
   297 		this->BuildGroupList(owner);
   298 		this->groups.Sort(GroupNameSorter);
   298 		this->groups.Sort(&GroupNameSorter);
   299 
   299 
   300 		SetVScrollCount(this, this->groups.Length());
   300 		SetVScrollCount(this, this->groups.Length());
   301 		SetVScroll2Count(this, this->vehicles.Length());
   301 		SetVScroll2Count(this, this->vehicles.Length());
   302 
   302 
   303 		/* The drop down menu is out, *but* it may not be used, retract it. */
   303 		/* The drop down menu is out, *but* it may not be used, retract it. */