Mercurial > hg > openttd
changeset 6923:07d7c739acf2 draft
(svn r10176) -Fix (r10071): Deselect the currently selected order when clicking on an empty part of the orders window.
author | maedhros <maedhros@openttd.org> |
---|---|
date | Sun, 17 Jun 2007 10:14:47 +0000 |
parents | 3a40035941ba |
children | 3e4d76f0c54b |
files | src/order_gui.cpp |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -554,7 +554,13 @@ 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);