aircraft_gui.c
changeset 10 c35ab8426202
parent 0 29654efe3188
child 156 8fef5e5752d6
--- a/aircraft_gui.c	Tue Aug 10 16:49:56 2004 +0000
+++ b/aircraft_gui.c	Tue Aug 10 16:54:34 2004 +0000
@@ -694,12 +694,16 @@
 static void AircraftDepotClickAircraft(Window *w, int x, int y)
 {
 	Vehicle *v;
+	int mode = GetVehicleFromAircraftDepotWndPt(w, x, y, &v);
 
-	switch(GetVehicleFromAircraftDepotWndPt(w, x, y, &v)) {
+	// share / copy orders
+	if (_thd.place_mode && mode <= 0) { _place_clicked_vehicle = v; return; }
+
+	switch(mode) {
 	case 1:
 		return;
 
-	case 0:
+	case 0: // start dragging of vehicle
 		if (v != NULL) {
 			WP(w,traindepot_d).sel = v->index;
 			SetWindowDirty(w);
@@ -707,11 +711,11 @@
 		}
 		break;
 
-	case -1:
+	case -1: // show info window
 		ShowAircraftViewWindow(v);
 		break;
 
-	case -2:
+	case -2: // click start/stop flag
 		DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_AIRCRAFT | CMD_MSG(STR_A016_CAN_T_STOP_START_AIRCRAFT));
 		break;