Add UI setting to disable mass action buttons for top-level vehicle lists
This commit is contained in:
@@ -548,7 +548,7 @@ public:
|
||||
|
||||
/* Disable all lists management button when the list is empty */
|
||||
this->SetWidgetDisabledState(WID_GL_MANAGE_VEHICLES_DROPDOWN, !this->ShouldShowActionDropdownList() || _local_company != this->vli.company);
|
||||
this->SetWidgetsDisabledState(this->vehicles.Length() == 0 || _local_company != this->vli.company,
|
||||
this->SetWidgetsDisabledState(this->vehicles.Length() == 0 || _local_company != this->vli.company || (IsTopLevelGroupID(this->vli.index) && _settings_client.gui.disable_top_veh_list_mass_actions),
|
||||
WID_GL_STOP_ALL,
|
||||
WID_GL_START_ALL,
|
||||
WIDGET_LIST_END);
|
||||
@@ -817,7 +817,8 @@ public:
|
||||
break;
|
||||
|
||||
case WID_GL_MANAGE_VEHICLES_DROPDOWN: {
|
||||
DropDownList *list = this->BuildActionDropdownList(true, Group::IsValidID(this->vli.index), this->vli.vtype == VEH_TRAIN);
|
||||
DropDownList *list = this->BuildActionDropdownList(true, Group::IsValidID(this->vli.index), this->vli.vtype == VEH_TRAIN,
|
||||
0, false, IsTopLevelGroupID(this->vli.index));
|
||||
ShowDropDownList(this, list, -1, WID_GL_MANAGE_VEHICLES_DROPDOWN);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user