Changeset - r17495:aa5b45c20b30
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2011-03-20 20:51:31
rubidium@openttd.org
(svn r22266) -Fix [FS#4558]: In the scenario editor you could build a ship depot using the hotkeys. Removing that depot causes an assertions to trigger.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/dock_gui.cpp
Show inline comments
 
@@ -133,13 +133,12 @@ struct BuildDocksToolbarWindow : Window 
 
			DTW_BUOY,
 
			WIDGET_LIST_END);
 
	}
 

	
 
	virtual void OnClick(Point pt, int widget, int click_count)
 
	{
 
		this->last_clicked_widget = (DockToolbarWidgets)widget;
 
		switch (widget) {
 
			case DTW_CANAL: // Build canal button
 
				HandlePlacePushButton(this, DTW_CANAL, SPR_CURSOR_CANAL, HT_RECT);
 
				break;
 

	
 
			case DTW_LOCK: // Build lock button
 
@@ -171,14 +170,15 @@ struct BuildDocksToolbarWindow : Window 
 
				break;
 

	
 
			case DTW_BUILD_AQUEDUCT: // Build aqueduct button
 
				HandlePlacePushButton(this, DTW_BUILD_AQUEDUCT, SPR_CURSOR_AQUEDUCT, HT_SPECIAL);
 
				break;
 

	
 
			default: break;
 
			default: return;
 
		}
 
		this->last_clicked_widget = (DockToolbarWidgets)widget;
 
	}
 

	
 
	virtual EventState OnKeyPress(uint16 key, uint16 keycode)
 
	{
 
		int num = CheckHotkeyMatch(dockstoolbar_hotkeys, keycode, this);
 
		if (num == -1) return ES_NOT_HANDLED;
0 comments (0 inline, 0 general)