File diff r14398:461a80e5f996 → r14399:3f819c0da60a
src/autoreplace_gui.cpp
Show inline comments
 
@@ -390,25 +390,25 @@ public:
 
				int text_end = DrawVehiclePurchaseInfo(nwi->pos_x + WD_FRAMETEXT_LEFT, nwi->pos_x + nwi->current_x - WD_FRAMETEXT_RIGHT,
 
						nwi->pos_y + WD_FRAMERECT_TOP, this->sel_engine[side]);
 
				needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
 
			}
 
		}
 
		if (!this->IsShaded() && needed_height != this->details_height) { // Details window are not high enough, enlarge them.
 
			this->details_height = needed_height;
 
			this->ReInit();
 
			return;
 
		}
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget)
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		switch (widget) {
 
			case RVW_WIDGET_TRAIN_ENGINEWAGON_TOGGLE:
 
				this->replace_engines  = !(this->replace_engines);
 
				this->engines[0].ForceRebuild();
 
				this->reset_sel_engine = true;
 
				this->SetDirty();
 
				break;
 

	
 
			case RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN: { // Railtype selection dropdown menu
 
				const Company *c = Company::Get(_local_company);
 
				DropDownList *list = new DropDownList();