From: "Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net>
--- src/net/sf/freecol/client/gui/action/ChangeAction.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/net/sf/freecol/client/gui/action/ChangeAction.java b/src/net/sf/freecol/client/gui/action/ChangeAction.java index 5d79e4a0451..f4c72fb8a39 100644 --- a/src/net/sf/freecol/client/gui/action/ChangeAction.java +++ b/src/net/sf/freecol/client/gui/action/ChangeAction.java @@ -109,11 +109,15 @@ public class ChangeAction extends UnitAction { return; } } - Unit active = find(tile.getUnits(), - u -> (u != unit - && u.getState() == Unit.UnitState.ACTIVE - && u.getMovesLeft() > 0)); - if (active != null) getGUI().setActiveUnit(active); + + // fimxe: perhaps move that to the upper loop + for (Unit u : tile.getUnits()) { + if (u != unit && u.getState() == Unit.UnitState.ACTIVE && + u.getMovesLeft() > 0) { + getGUI().setActiveUnit(u); + break; + } + } } } } -- 2.11.0.rc0.7.gbe5a750 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers