File diff r19845:1a7e8f4e03df → r19846:75a27628493b
src/order_gui.cpp
Show inline comments
 
@@ -1088,25 +1088,25 @@ public:
 

	
 
	virtual void OnPaint()
 
	{
 
		if (this->vehicle->owner != _local_company) this->selected_order = -1; // Disable selection any selected row at a competitor order window.
 
		this->DrawWidgets();
 
	}
 

	
 
	virtual void DrawWidget(const Rect &r, int widget) const
 
	{
 
		if (widget != WID_O_ORDER_LIST) return;
 

	
 
		bool rtl = _current_text_dir == TD_RTL;
 
		SetDParam(0, 99);
 
		SetDParamMaxValue(0, this->vehicle->GetNumOrders(), 2);
 
		int index_column_width = GetStringBoundingBox(STR_ORDER_INDEX).width + 2 * GetSpriteSize(rtl ? SPR_ARROW_RIGHT : SPR_ARROW_LEFT).width + 3;
 
		int middle = rtl ? r.right - WD_FRAMETEXT_RIGHT - index_column_width : r.left + WD_FRAMETEXT_LEFT + index_column_width;
 

	
 
		int y = r.top + WD_FRAMERECT_TOP;
 
		int line_height = this->GetWidget<NWidgetBase>(WID_O_ORDER_LIST)->resize_y;
 

	
 
		int i = this->vscroll->GetPosition();
 
		const Order *order = this->vehicle->GetOrder(i);
 
		/* First draw the highlighting underground if it exists. */
 
		if (this->order_over != INVALID_VEH_ORDER_ID) {
 
			while (order != NULL) {
 
				/* Don't draw anything if it extends past the end of the window. */