Changeset - r6923:0ca780fae72b
[Not reviewed]
master
0 1 0
maedhros - 17 years ago 2007-06-17 10:14:47
maedhros@openttd.org
(svn r10176) -Fix (r10071): Deselect the currently selected order when clicking on an empty part of the orders window.
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -554,7 +554,13 @@ static void OrdersWndProc(Window *w, Win
 

	
 
			int sel = GetOrderFromOrderWndPt(w, e->we.click.pt.y, v);
 

	
 
			if (sel == INVALID_ORDER) return;
 
			if (sel == INVALID_ORDER) {
 
				/* This was a click on an empty part of the orders window, so
 
				 * deselect the currently selected order. */
 
				WP(w,order_d).sel = -1;
 
				SetWindowDirty(w);
 
				return;
 
			}
 

	
 
			if (_ctrl_pressed && sel < v->num_orders) {
 
				const Order *ord = GetVehicleOrder(v, sel);
0 comments (0 inline, 0 general)