Skip to content

Commit

Permalink
Visual Timeline Editor: Allow selecting single block from selection (#…
Browse files Browse the repository at this point in the history
…2462)

Allows selecting a single event from the currently selected events (deselecting the rest).
  • Loading branch information
salianifo authored Nov 11, 2024
1 parent 9449b48 commit 7e0f7c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,11 @@ func _on_event_block_gui_input(event: InputEvent, item: Node) -> void:

drag_allowed = true

if event.is_released() and not %TimelineArea.dragging and not Input.is_key_pressed(KEY_SHIFT):
if len(selected_items) > 1 and item in selected_items and not Input.is_key_pressed(KEY_CTRL):
deselect_all_items()
select_item(item)

if len(selected_items) > 0 and event is InputEventMouseMotion:
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
if !%TimelineArea.dragging and !get_viewport().gui_is_dragging() and drag_allowed:
Expand Down

0 comments on commit 7e0f7c8

Please sign in to comment.