mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-03 21:40:31 +07:00
Fix longpress triggering when an onClick discards its actor (#10052)
This commit is contained in:
parent
eec3732c96
commit
5bccc4abf3
@ -17,6 +17,8 @@ class ActivationListener : ActorGestureListener(20f, 0.25f, 1.1f, Int.MAX_VALUE.
|
||||
|
||||
override fun longPress(actor: Actor?, x: Float, y: Float): Boolean {
|
||||
if (actor == null) return false
|
||||
// See #10050 - when a tap discards its actor or ascendants, Gdx can't cancel the longpress timer
|
||||
if (actor.stage == null) return false
|
||||
return actor.activate(ActivationTypes.Longpress)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user