From 42b0f4f0c110009723f60c4d22744b34fe9c664d Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas Date: Sun, 26 Nov 2023 14:06:02 +0200 Subject: [PATCH] Fix bug where using shortcuts to switch between frames also moved the selection, causing deletions --- src/UI/Canvas/Selection.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UI/Canvas/Selection.gd b/src/UI/Canvas/Selection.gd index 510f62957..eaa04ca1d 100644 --- a/src/UI/Canvas/Selection.gd +++ b/src/UI/Canvas/Selection.gd @@ -219,7 +219,7 @@ func _move_with_arrow_keys(event: InputEvent) -> void: # Check if an event is a ui_up/down/left/right event-press func _is_action_direction_pressed(event: InputEvent) -> bool: for action in KEY_MOVE_ACTION_NAMES: - if event.is_action_pressed(action): + if event.is_action_pressed(action, false, true): return true return false @@ -227,7 +227,7 @@ func _is_action_direction_pressed(event: InputEvent) -> bool: # Check if an event is a ui_up/down/left/right event release func _is_action_direction(event: InputEvent) -> bool: for action in KEY_MOVE_ACTION_NAMES: - if event.is_action(action): + if event.is_action(action, true): return true return false @@ -235,7 +235,7 @@ func _is_action_direction(event: InputEvent) -> bool: # Check if an event is a ui_up/down/left/right event release func _is_action_direction_released(event: InputEvent) -> bool: for action in KEY_MOVE_ACTION_NAMES: - if event.is_action_released(action): + if event.is_action_released(action, true): return true return false