Skip to content

fix: comments icon no longer blocks dragging hierarchy handles - #553

Merged
azfoo merged 2 commits into
TimeLineAnnotator:devfrom
FelipeDefensor:fix/comments-icon-overlays-handles
Jul 20, 2026
Merged

fix: comments icon no longer blocks dragging hierarchy handles#553
azfoo merged 2 commits into
TimeLineAnnotator:devfrom
FelipeDefensor:fix/comments-icon-overlays-handles

Conversation

@FelipeDefensor

@FelipeDefensor FelipeDefensor commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

The comments indicator on adjacent hierarchy units sat on top of the body drag handles, making those boundaries impossible to drag. Reported on macOS; the glyph is narrower on Windows, so it may not reproduce there.

Cause: the comments icon has z = level + 1, above the drag handles' z = 0. Click dispatch uses QGraphicsView.itemAt, which returns the topmost item — and the icon's bounding box overhangs the handle's x, so clicks resolved to the icon, which isn't a drag trigger.

Fix: raise the drag handles above the decorative overlays (HANDLE_Z = 100) so they always win the hit-test. Handles were already above all bodies, so only handle-vs-icon stacking changes. Also covers the loop icon's matching overlap with the start handle.

Added a regression test asserting the comments icon stacks below both handles.

@FelipeDefensor FelipeDefensor added this to the 0.6.4 milestone Jul 2, 2026
Comment thread tests/ui/timelines/hierarchy/test_hierarchy_ui.py Outdated
Comment thread tilia/ui/timelines/hierarchy/handles.py Outdated
The hierarchy comments icon (z = level + 1) stacked above the body drag
handles (z = 0). QGraphicsView.itemAt returns the topmost item, and the
comments emoji's bounding box overhangs the handle x (notably wide on
macOS), so clicks near a boundary resolved to the icon — which is not a
left_click_trigger — so the boundary could not be dragged. Adjacent units
carrying comments (e.g. S/R/D sections) buried every internal boundary
handle.

Raise drag handles above the decorative overlays so they always win the
hit-test. Handles were already above all bodies, so only handle-vs-icon
stacking changes.
@FelipeDefensor
FelipeDefensor force-pushed the fix/comments-icon-overlays-handles branch from 7965ce1 to 8e3ac31 Compare July 2, 2026 14:52
@FelipeDefensor
FelipeDefensor marked this pull request as ready for review July 2, 2026 14:58
@FelipeDefensor
FelipeDefensor requested a review from azfoo July 2, 2026 14:58
loop box z-level would have been higher than the lowest hierarchy if the user used more hierarchy levels than the number of default colours.
@azfoo
azfoo merged commit 4c575f1 into TimeLineAnnotator:dev Jul 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants