Changeset - r14874:e83144164ce9
[Not reviewed]
master
0 1 0
terkhen - 15 years ago 2010-03-20 12:21:01
terkhen@openttd.org
(svn r19480) -Fix: Stop reducing the size of the vehicle list after selecting a vehicle with a long description.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1158,14 +1158,15 @@ struct BuildVehicleWindow : Window {
 
				NWidgetBase *nwi = this->GetWidget<NWidgetBase>(BUILD_VEHICLE_WIDGET_PANEL);
 
				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);
 
				needed_height = max(needed_height, text_end - (int)nwi->pos_y + WD_FRAMERECT_BOTTOM);
 
			}
 
			if (needed_height != this->details_height) { // Details window are not high enough, enlarge them.
 
				int resize = needed_height - this->details_height;
 
				this->details_height = needed_height;
 
				this->ReInit();
 
				this->ReInit(0, resize);
 
				return;
 
			}
 
		}
 
	}
 

	
 
	virtual void OnQueryTextFinished(char *str)
0 comments (0 inline, 0 general)