Changeset - r11671:cf4bbad53b34
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-04-13 21:30:21
rubidium@openttd.org
(svn r16056) -Fix (r16037): clicking twice on the "end of orders" crashed.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -867,25 +867,25 @@ public:
 
					if (xy != INVALID_TILE) ScrollMainWindowToTile(xy);
 
					return;
 
				}
 

	
 
				/* This order won't be selected any more, close all child windows and dropdowns */
 
				this->DeleteChildWindows();
 
				HideDropDownMenu(this);
 

	
 
				if (sel == INVALID_ORDER) {
 
					/* Deselect clicked order */
 
					this->selected_order = -1;
 
				} else if (sel == this->selected_order) {
 
					if (this->vehicle->type == VEH_TRAIN) {
 
					if (this->vehicle->type == VEH_TRAIN && sel < this->vehicle->GetNumOrders()) {
 
						DoCommandP(this->vehicle->tile, this->vehicle->index + (sel << 16),
 
								MOF_STOP_LOCATION | ((GetVehicleOrder(this->vehicle, sel)->GetStopLocation() + 1) % OSL_END) << 4,
 
								CMD_MODIFY_ORDER | CMD_MSG(STR_8835_CAN_T_MODIFY_THIS_ORDER));
 
					}
 
				} else {
 
					/* Select clicked order */
 
					this->selected_order = sel;
 

	
 
					if (this->vehicle->owner == _local_company) {
 
						/* Activate drag and drop */
 
						SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, VHM_DRAG, this);
 
					}
0 comments (0 inline, 0 general)