Changeset - r27929:96b1f1338710
[Not reviewed]
master
0 1 0
Rubidium - 9 months ago 2023-09-17 14:08:37
rubidium@openttd.org
Fix 8ab0936: missed WIDGET_LIST_END removals
1 file changed with 2 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/vehicle_gui.cpp
Show inline comments
 
@@ -2607,26 +2607,25 @@ struct VehicleDetailsWindow : Window {
 
	void OnPaint() override
 
	{
 
		const Vehicle *v = Vehicle::Get(this->window_number);
 

	
 
		if (v->type == VEH_TRAIN) {
 
			this->LowerWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
 
			this->vscroll->SetCount(GetTrainDetailsWndVScroll(v->index, this->tab));
 
		}
 

	
 
		/* Disable service-scroller when interval is set to disabled */
 
		this->SetWidgetsDisabledState(!IsVehicleServiceIntervalEnabled(v->type, v->owner),
 
			WID_VD_INCREASE_SERVICING_INTERVAL,
 
			WID_VD_DECREASE_SERVICING_INTERVAL,
 
			WIDGET_LIST_END);
 
			WID_VD_DECREASE_SERVICING_INTERVAL);
 

	
 
		StringID str = v->ServiceIntervalIsCustom() ?
 
			(v->ServiceIntervalIsPercent() ? STR_VEHICLE_DETAILS_PERCENT : STR_VEHICLE_DETAILS_DAYS) :
 
			STR_VEHICLE_DETAILS_DEFAULT;
 
		this->GetWidget<NWidgetCore>(WID_VD_SERVICE_INTERVAL_DROPDOWN)->widget_data = str;
 

	
 
		this->DrawWidgets();
 
	}
 

	
 
	void OnClick(Point pt, int widget, int click_count) override
 
	{
 
		switch (widget) {
 
@@ -2648,27 +2647,25 @@ struct VehicleDetailsWindow : Window {
 
				ShowDropDownMenu(this, _service_interval_dropdown, v->ServiceIntervalIsCustom() ? (v->ServiceIntervalIsPercent() ? 2 : 1) : 0, widget, 0, 0);
 
				break;
 
			}
 

	
 
			case WID_VD_DETAILS_CARGO_CARRIED:
 
			case WID_VD_DETAILS_TRAIN_VEHICLES:
 
			case WID_VD_DETAILS_CAPACITY_OF_EACH:
 
			case WID_VD_DETAILS_TOTAL_CARGO:
 
				this->SetWidgetsLoweredState(false,
 
					WID_VD_DETAILS_CARGO_CARRIED,
 
					WID_VD_DETAILS_TRAIN_VEHICLES,
 
					WID_VD_DETAILS_CAPACITY_OF_EACH,
 
					WID_VD_DETAILS_TOTAL_CARGO,
 
					widget,
 
					WIDGET_LIST_END);
 
					WID_VD_DETAILS_TOTAL_CARGO);
 

	
 
				this->tab = (TrainDetailsWindowTabs)(widget - WID_VD_DETAILS_CARGO_CARRIED);
 
				this->SetDirty();
 
				break;
 
		}
 
	}
 

	
 
	void OnDropdownSelect(int widget, int index) override
 
	{
 
		switch (widget) {
 
			case WID_VD_SERVICE_INTERVAL_DROPDOWN: {
 
				const Vehicle *v = Vehicle::Get(this->window_number);
0 comments (0 inline, 0 general)