changeset 14057:1422b26b44ac draft

(svn r18600) -Fix (r18599): Re-enable ctl+click to jump to competitor station.
author alberth <alberth@openttd.org>
date Tue, 22 Dec 2009 11:15:08 +0000
parents 3eede17e9c25
children e72e69fcf01b
files src/order_gui.cpp
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -491,8 +491,6 @@
 	 */
 	int GetOrderFromPt(int y)
 	{
-		if (this->vehicle->owner != _local_company) return INVALID_ORDER; // Selection is not possible at orders of a competitor.
-
 		int sel = (y - this->GetWidget<NWidgetBase>(ORDER_WIDGET_ORDER_LIST)->pos_y - WD_FRAMERECT_TOP) / this->resize.step_height; // Selected line in the ORDER_WIDGET_ORDER_LIST panel.
 
 		if ((uint)sel >= this->vscroll.GetCapacity()) return INVALID_ORDER;
@@ -1026,7 +1024,7 @@
 				this->DeleteChildWindows();
 				HideDropDownMenu(this);
 
-				if (sel == INVALID_ORDER) {
+				if (sel == INVALID_ORDER || this->vehicle->owner != _local_company) {
 					/* Deselect clicked order */
 					this->selected_order = -1;
 				} else if (sel == this->selected_order) {