Fix create group from veh list being shown (non-functional) in group GUI.

Remove and only show in vehicle list.
pull/8/head
Jonathan G Rennison 8 years ago
parent 24a85d1c99
commit 1a01115101

@ -182,7 +182,8 @@ Dimension BaseVehicleListWindow::GetActionDropdownSize(bool show_autoreplace, bo
* @param show_group If true include group-related stuff.
* @return Itemlist for dropdown
*/
DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str)
DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace,
StringID change_order_str, bool show_create_group)
{
DropDownList *list = new DropDownList();
@ -200,8 +201,9 @@ DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autorepla
if (change_order_str != 0) {
*list->Append() = new DropDownListStringItem(change_order_str, ADI_CHANGE_ORDER, false);
}
*list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_CREATE_GROUP, ADI_CREATE_GROUP, false);
if (show_create_group) {
*list->Append() = new DropDownListStringItem(STR_VEHICLE_LIST_CREATE_GROUP, ADI_CREATE_GROUP, false);
}
return list;
}
@ -1757,7 +1759,7 @@ public:
case WID_VL_MANAGE_VEHICLES_DROPDOWN: {
DropDownList *list = this->BuildActionDropdownList(VehicleListIdentifier(this->window_number).type == VL_STANDARD, false,
this->vli.vtype == VEH_TRAIN, this->GetChangeOrderStringID());
this->vli.vtype == VEH_TRAIN, this->GetChangeOrderStringID(), true);
ShowDropDownList(this, list, 0, WID_VL_MANAGE_VEHICLES_DROPDOWN);
break;
}

@ -50,7 +50,8 @@ struct BaseVehicleListWindow : public Window {
void SortVehicleList();
void BuildVehicleList();
Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str = 0);
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace, StringID change_order_str = 0);
DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group, bool show_template_replace,
StringID change_order_str = 0, bool show_create_group = false);
};
uint GetVehicleListHeight(VehicleType type, uint divisor = 1);

Loading…
Cancel
Save