Author: sveinung
Date: Mon Oct  3 14:38:22 2016
New Revision: 33979

URL: http://svn.gna.org/viewcvs/freeciv?rev=33979&view=rev
Log:
Act sel dlg: pre select current target unit.

The unit select unit dialog now supports specifying what unit should be
preselected. Use this feature in the action selection dialog's target unit
switcher. Have the action selection target unit switcher dialog select the
current target unit.

See patch #7748

Modified:
    branches/S2_6/client/gui-gtk-3.0/action_dialog.c

Modified: branches/S2_6/client/gui-gtk-3.0/action_dialog.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-gtk-3.0/action_dialog.c?rev=33979&r1=33978&r2=33979&view=diff
==============================================================================
--- branches/S2_6/client/gui-gtk-3.0/action_dialog.c    (original)
+++ branches/S2_6/client/gui-gtk-3.0/action_dialog.c    Mon Oct  3 14:38:22 2016
@@ -988,11 +988,13 @@
   struct action_data *args = (struct action_data *)data;
 
   struct unit *punit;
+  struct unit *tunit;
   struct tile *ptile;
 
   if ((punit = game_unit_by_number(args->actor_unit_id))
-      && (ptile = index_to_tile(args->target_tile_id))) {
-    select_tgt_unit(punit, ptile, ptile->units, NULL,
+      && (ptile = index_to_tile(args->target_tile_id))
+      && (tunit = game_unit_by_number(args->target_unit_id))) {
+    select_tgt_unit(punit, ptile, ptile->units, tunit,
                     _("Target unit selection"),
                     _("Looking for target unit:"),
                     _("Units at tile:"),


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to