From ee4511a83604e0f9f3fff8ad36bd433f6262106c Mon Sep 17 00:00:00 2001 From: dominik Date: Tue, 10 Aug 2004 16:54:34 +0000 Subject: (svn r11) Feature: Copy/share orders now works from ship depot window for ships and hangar window for aircraft --- ship_gui.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'ship_gui.c') diff --git a/ship_gui.c b/ship_gui.c index 26dfab5f1..8bf48c417 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -694,12 +694,16 @@ static int GetVehicleFromShipDepotWndPt(Window *w, int x, int y, Vehicle **veh) static void ShipDepotClick(Window *w, int x, int y) { Vehicle *v; + int mode = GetVehicleFromShipDepotWndPt(w, x, y, &v); - switch (GetVehicleFromShipDepotWndPt(w, x, y, &v)) { - case 1: + // share / copy orders + if (_thd.place_mode && mode <= 0) { _place_clicked_vehicle = v; return; } + + switch (mode) { + case 1: // invalid return; - case 0: + case 0: // start dragging of vehicle if (v != NULL) { WP(w,traindepot_d).sel = v->index; SetWindowDirty(w); @@ -708,11 +712,11 @@ static void ShipDepotClick(Window *w, int x, int y) } break; - case -1: + case -1: // show info window ShowShipViewWindow(v); break; - case -2: + case -2: // click start/stop flag DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_SHIP | CMD_MSG(STR_9818_CAN_T_STOP_START_SHIP)); break; -- cgit v1.2.3-54-g00ecf