Changeset - r16921:7d29032aa4a4
[Not reviewed]
master
0 2 0
alberth - 13 years ago 2010-12-30 13:18:04
alberth@openttd.org
(svn r21666) -Codechange: Use GetCallbackWnd at more places.
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/vehicle_gui.cpp
Show inline comments
 
@@ -2585,7 +2585,7 @@ bool VehicleClicked(const Vehicle *v)
 
	v = v->First();
 
	if (!v->IsPrimaryVehicle()) return false;
 

	
 
	FindWindowById(_thd.window_class, _thd.window_number)->OnVehicleSelect(v);
 
	_thd.GetCallbackWnd()->OnVehicleSelect(v);
 
	return true;
 
}
 

	
src/viewport.cpp
Show inline comments
 
@@ -2146,7 +2146,7 @@ void UpdateTileSelection()
 
static inline void ShowMeasurementTooltips(StringID str, uint paramcount, const uint64 params[], TooltipCloseCondition close_cond = TCC_LEFT_CLICK)
 
{
 
	if (!_settings_client.gui.measure_tooltip) return;
 
	GuiShowTooltips(FindWindowById(_thd.window_class, _thd.window_number), str, paramcount, params, close_cond);
 
	GuiShowTooltips(_thd.GetCallbackWnd(), str, paramcount, params, close_cond);
 
}
 

	
 
/** highlighting tiles while only going over them with the mouse */
 
@@ -2791,7 +2791,7 @@ EventState VpHandlePlaceSizingDrag()
 
	if (_special_mouse_mode != WSM_SIZING) return ES_NOT_HANDLED;
 

	
 
	/* stop drag mode if the window has been closed */
 
	Window *w = FindWindowById(_thd.window_class, _thd.window_number);
 
	Window *w = _thd.GetCallbackWnd();
 
	if (w == NULL) {
 
		ResetObjectToPlace();
 
		return ES_HANDLED;
 
@@ -2834,7 +2834,7 @@ void SetObjectToPlace(CursorID icon, Pal
 
{
 
	if (_thd.window_class != WC_INVALID) {
 
		/* Undo clicking on button and drag & drop */
 
		Window *w = FindWindowById(_thd.window_class, _thd.window_number);
 
		Window *w = _thd.GetCallbackWnd();
 
		/* Call the abort function, but set the window class to something
 
		 * that will never be used to avoid infinite loops. Setting it to
 
		 * the 'next' window class must not be done because recursion into
0 comments (0 inline, 0 general)