From 5c4be33418dcb5a7334f6d501dd3e6c4516a8948 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 19 May 2019 22:31:16 +0300 Subject: [PATCH] Resolved #596 - unit retains focus when moved to tile with another unit already in it, if it has movement points left --- core/src/com/unciv/ui/worldscreen/TileMapHolder.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt index 0ae53ebd2a..61e1340b04 100644 --- a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt +++ b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt @@ -142,6 +142,9 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap: Sounds.play("whoosh") if (dto.unit.currentTile != dto.tileInfo) dto.unit.action = "moveTo " + dto.tileInfo.position.x.toInt() + "," + dto.tileInfo.position.y.toInt() + if(dto.unit.currentMovement>0){ + worldScreen.bottomBar.unitTable.selectedUnit=dto.unit + } } catch (e: Exception) { } }