Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deselected handles when panning with hidden handles #1147

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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