Author: mir3x Date: Mon Jan 16 13:46:02 2017 New Revision: 34839 URL: http://svn.gna.org/viewcvs/freeciv?rev=34839&view=rev Log: quickselect - return focused unit before unit count check for SELECT_FOCUS
See bug #25425 Modified: trunk/client/control.c trunk/client/gui-qt/mapctrl.cpp Modified: trunk/client/control.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/control.c?rev=34839&r1=34838&r2=34839&view=diff ============================================================================== --- trunk/client/control.c (original) +++ trunk/client/control.c Mon Jan 16 13:46:02 2017 @@ -2758,6 +2758,10 @@ fc_assert_ret_val(qtype > SELECT_POPUP, NULL); + if (qtype == SELECT_FOCUS) { + return head_of_units_in_focus(); + } + if (listsize == 0) { return NULL; } else if (listsize == 1) { @@ -2765,9 +2769,6 @@ return (unit_owner(punit) == client.conn.playing) ? punit : NULL; } - if (qtype == SELECT_FOCUS) { - return head_of_units_in_focus(); - } /* Quickselect priorities. Units with moves left * before exhausted. Focus unit is excluded. * Modified: trunk/client/gui-qt/mapctrl.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapctrl.cpp?rev=34839&r1=34838&r2=34839&view=diff ============================================================================== --- trunk/client/gui-qt/mapctrl.cpp (original) +++ trunk/client/gui-qt/mapctrl.cpp Mon Jan 16 13:46:02 2017 @@ -387,7 +387,7 @@ } sc = fc_shortcuts::sc()->get_shortcut(SC_SELECT_BUTTON); if (((key && key == sc->key) || bt == sc->mouse) && md == sc->mod) { - if (goto_is_active() == false && pcity == nullptr) { + if (goto_is_active() == false) { action_button_pressed(pos.x(), pos.y(), SELECT_FOCUS); } return; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits