(svn r26) Fix orderwindow issue
authortruelight
Thu, 12 Aug 2004 17:11:47 +0000
changeset 25 cf54d03fa22f
parent 24 5c611497f25a
child 26 4c08274a29dc
(svn r26) Fix orderwindow issue
order_gui.c
--- a/order_gui.c	Thu Aug 12 09:36:22 2004 +0000
+++ b/order_gui.c	Thu Aug 12 17:11:47 2004 +0000
@@ -344,7 +344,15 @@
 	// 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);
 		}