fix(ui): refresh stale grid hover highlight after rubber-band drag (#20) #120

Merged
ValleyGeek merged 2 commits from 0.1.39/issue-20-rubber-band-highlight into main 2026-06-22 00:55:06 +00:00
Member

Summary

  • #20 — Qt suppresses hover events for a widget while a mouse button is held, so whatever item was hovered right before a rubber-band drag began stayed frozen with a gray "hovered" highlight for the rest of the drag and beyond, since GridSelectionFilter fully consumes plain/empty-space clicks (returns True), skipping the click handling that would otherwise have refreshed hover. Added GridSelectionFilter._refresh_hover(), called at the top of every left-button release the filter handles, which sends a synthetic HoverMove at the current cursor position so Qt recomputes the correct hover state immediately instead of waiting for some later real hover event.

Test plan

  • ruff check / ruff format --check
  • pytest
  • PR-prep version bump 0.1.39 → 0.1.40

Refs #20.

Stacked on #119 — part of the 11-PR sequential chain into main.

## Summary - **#20** — Qt suppresses hover events for a widget while a mouse button is held, so whatever item was hovered right before a rubber-band drag began stayed frozen with a gray "hovered" highlight for the rest of the drag and beyond, since `GridSelectionFilter` fully consumes plain/empty-space clicks (returns `True`), skipping the click handling that would otherwise have refreshed hover. Added `GridSelectionFilter._refresh_hover()`, called at the top of every left-button release the filter handles, which sends a synthetic `HoverMove` at the current cursor position so Qt recomputes the correct hover state immediately instead of waiting for some later real hover event. ## Test plan - [x] `ruff check` / `ruff format --check` - [x] `pytest` - [x] PR-prep version bump 0.1.39 → 0.1.40 Refs #20. Stacked on #119 — part of the 11-PR sequential chain into `main`.
Qt suppresses hover events for a widget while a mouse button is held, so
whatever item was hovered right before a rubber-band drag began stayed
frozen with State_MouseOver (a gray fill) for the rest of the drag. Plain
clicks and empty-space clicks are then fully consumed by GridSelectionFilter
(it returns True), which skips Qt's own click handling — the handling that
would otherwise have refreshed hover — so that stale highlight lingered on
the original item even after selecting something else. A new rubber-band
drag incidentally fixed it because dragging across cells generates fresh
MouseMove events once the button is released (#20).

Add GridSelectionFilter._refresh_hover(), called once at the top of every
left-button release we handle, which sends a synthetic HoverMove at the
current cursor position so Qt recomputes State_MouseOver immediately instead
of waiting for some later real hover event.

Threading notes: n/a — pure main-thread Qt event handling, no worker involved.
docs: PR-prep for issue 20 - bump to 0.1.40
All checks were successful
CI / lint (push) Successful in 8s
CI / test (push) Successful in 1m50s
CI / appimage (push) Successful in 8m20s
CI / build-appimage (push) Successful in 0s
CI / windows-exe (push) Successful in 9m34s
CI / build-windows-exe (push) Successful in 0s
e04a54adda
ValleyGeek changed target branch from 0.1.38/issue-111-dupe-scan-crash to main 2026-06-22 00:45:11 +00:00
Claude force-pushed 0.1.39/issue-20-rubber-band-highlight from e04a54adda
All checks were successful
CI / lint (push) Successful in 8s
CI / test (push) Successful in 1m50s
CI / appimage (push) Successful in 8m20s
CI / build-appimage (push) Successful in 0s
CI / windows-exe (push) Successful in 9m34s
CI / build-windows-exe (push) Successful in 0s
to 188311dd51 2026-06-22 00:52:12 +00:00
Compare
ValleyGeek deleted branch 0.1.39/issue-20-rubber-band-highlight 2026-06-22 00:55:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer!120
No description provided.