Skip to content

[patch] Stop ValueSlider reporting a change on held frames that move nothing - #626

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-xka0g5
Oct 11, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-xka0g5

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Requested by Matt · project thread

Before: holding a float ValueSlider still after a drag reported a change on every frame, whenever the dragged value was one a float cannot hold exactly. ImageGui's held straighten never settled because of it, and ImageGui carries a workaround.

After: a held pointer that does not move reports no change, and nothing is marked edited.

How: the drag is accumulated as a double, and SetValue compared that double with the float it was handed, which differ by float rounding on every frame. It now rounds to the stored type (float or int) before comparing.

Tests: ValueSlider_AHeldPointerThatStopsReportsNoChange drags 7 px on a 0..1 slider (0.035, not exact in a float) and holds; it fails on main and passes here. The widget suites pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_018BGac9LmQV495Bsnrmo1b7


Generated by Claude Code

…nothing

A drag is held as a double, and a float slider compared that double with
the float it was handed, so a value a float cannot hold exactly read as a
fresh change on every frame the pointer rested. Values are now compared
as they are stored.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018BGac9LmQV495Bsnrmo1b7
@matt-edmondson matt-edmondson self-assigned this Oct 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@matt-edmondson
matt-edmondson merged commit c7837cb into main Oct 11, 2026
17 checks passed
@matt-edmondson
matt-edmondson deleted the claude/project-thread-xka0g5 branch October 11, 2026 12:52
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