Skip to content

Commit

Permalink
Fix deselected handles when panning with hidden handles (#1147)
Browse files Browse the repository at this point in the history
  • Loading branch information
MewPurPur authored Feb 12, 2025
1 parent ac79dbd commit 3d95963
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui_parts/handles_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,13 @@ func _unhandled_input(event: InputEvent) -> void:
hovered_handle = null
State.clear_all_hovered()

if visible and event is InputEventMouseMotion:
if event is InputEventMouseMotion:
# Allow moving view while dragging handle.
if event.button_mask & MOUSE_BUTTON_MASK_MIDDLE:
return

should_deselect_all = false
if is_instance_valid(dragged_handle):
if visible and is_instance_valid(dragged_handle):
# Move the handle that's being dragged.
var event_pos := get_event_pos(event)
var new_pos := Utils64Bit.transform_vector_mult(
Expand Down
3 changes: 3 additions & 0 deletions src/ui_widgets/GridDrawingControl.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ class_name PanelGrid extends GridContainer
@export var dim_last_item := false

func setup() -> void:
for child in get_children():
child.queue_free()

for item_idx in items.size():
var item := items[item_idx]
var panel_container := PanelContainer.new()
Expand Down

0 comments on commit 3d95963

Please sign in to comment.