summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-08-12 17:11:47 +0000
committertruelight <truelight@openttd.org>2004-08-12 17:11:47 +0000
commit4b0d4dd3fe13e78e1766ac06ab891f9d39f1d0aa (patch)
tree515a338bf34473ddb166dfc50c9ab6e36e7a853c
parentdf26dc7687613d6c66af57cac5a3208c26274fb8 (diff)
downloadopenttd-4b0d4dd3fe13e78e1766ac06ab891f9d39f1d0aa.tar.xz
(svn r26) Fix orderwindow issue
-rw-r--r--order_gui.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/order_gui.c b/order_gui.c
index dd85e1cc9..f45724b60 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -344,7 +344,15 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
// check if a vehicle in a depot was clicked..
case WE_MOUSELOOP: {
Vehicle *v = _place_clicked_vehicle;
- if (v) {
+ /*
+ * Check if we clicked on a vehicle
+ * and if the GOTO button of this window is pressed
+ * This is because of all open order windows WE_MOUSELOOP is called
+ * and if you have 3 windows open, and this check is not done
+ * the order is copied to the last open window instead of the
+ * one where GOTO is enalbed
+ */
+ if (v && HASBIT(w->click_state, 7)) {
_place_clicked_vehicle = NULL;
HandleOrderVehClick(&_vehicles[w->window_number], v, w);
}