File diff r27475:997d62d70d7c → r27476:bb4a1b3a079d
src/vehicle_gui.cpp
Show inline comments
 
@@ -1957,25 +1957,25 @@ public:
 
			case WID_VL_LIST:
 
				this->DrawVehicleListItems(INVALID_VEHICLE, this->resize.step_height, r);
 
				break;
 
		}
 
	}
 

	
 
	void OnPaint() override
 
	{
 
		this->BuildVehicleList();
 
		this->SortVehicleList();
 

	
 
		if (this->vehicles.size() == 0 && this->IsWidgetLowered(WID_VL_MANAGE_VEHICLES_DROPDOWN)) {
 
			HideDropDownMenu(this);
 
			this->CloseChildWindows(WC_DROPDOWN_MENU);
 
		}
 

	
 
		/* Hide the widgets that we will not use in this window
 
		 * Some windows contains actions only fit for the owner */
 
		int plane_to_show = (this->owner == _local_company) ? BP_SHOW_BUTTONS : BP_HIDE_BUTTONS;
 
		NWidgetStacked *nwi = this->GetWidget<NWidgetStacked>(WID_VL_HIDE_BUTTONS);
 
		if (plane_to_show != nwi->shown_plane) {
 
			nwi->SetDisplayedPlane(plane_to_show);
 
			nwi->SetDirty(this);
 
		}
 
		if (this->owner == _local_company) {
 
			this->SetWidgetDisabledState(WID_VL_AVAILABLE_VEHICLES, this->vli.type != VL_STANDARD);