Author: mir3x
Date: Mon Jan 16 13:44:48 2017
New Revision: 34837
URL: http://svn.gna.org/viewcvs/freeciv?rev=34837&view=rev
Log:
quickselect - return focused unit before unit count check for SELECT_FOCUS
See bug #25425
Modified:
branches/S2_6/client/control.c
branches/S2_6/client/gui-qt/mapctrl.cpp
Modified: branches/S2_6/client/control.c
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/control.c?rev=34837&r1=34836&r2=34837&view=diff
==============================================================================
--- branches/S2_6/client/control.c (original)
+++ branches/S2_6/client/control.c Mon Jan 16 13:44:48 2017
@@ -2580,6 +2580,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) {
@@ -2587,9 +2591,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: branches/S2_6/client/gui-qt/mapctrl.cpp
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/mapctrl.cpp?rev=34837&r1=34836&r2=34837&view=diff
==============================================================================
--- branches/S2_6/client/gui-qt/mapctrl.cpp (original)
+++ branches/S2_6/client/gui-qt/mapctrl.cpp Mon Jan 16 13:44:48 2017
@@ -385,7 +385,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
[email protected]
https://mail.gna.org/listinfo/freeciv-commits