Skip to content

fix: resync range slider handle label when handle can't reach edited value - #358

Merged
tlambert03 merged 1 commit into
pyapp-kit:mainfrom
tlambert03:fix-stale-range-label
Oct 16, 2026
Merged

tlambert03 merged 1 commit into
pyapp-kit:mainfrom
tlambert03:fix-stale-range-label

Conversation

@tlambert03

Copy link
Copy Markdown
Member

small fix I noticed while reviewing #353. if you type a value into a QLabeledRangeSlider handle label that the handle can't actually move to (e.g. it's blocked by a neighboring handle) and the slider value doesn't change as a result, the label is never resynced... so it keeps showing whatever it clamped to rather than the real handle position.

for example, with range (0, 100) and value (20, 50, 80), typing 500 into the middle label twice: the first edit moves the handle to 79, but the second leaves the label showing 100 while the handle is still at 79.

this just sets the label back to the actual handle value after setSliderPosition. It doesn't conflict with #353 (which makes this more visible, since with setExpandRangeOnHandleEdit(True) the label isn't clamped at all and would show 500).

🤖 Generated with Claude Code

…value

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.84%. Comparing base (2c25dba) to head (a948880).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #358      +/-   ##
==========================================
+ Coverage   84.81%   84.84%   +0.02%     
==========================================
  Files          49       49              
  Lines        3924     3925       +1     
==========================================
+ Hits         3328     3330       +2     
+ Misses        596      595       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tlambert03
tlambert03 merged commit 11cb5ea into pyapp-kit:main Oct 16, 2026
26 of 28 checks passed
@tlambert03
tlambert03 deleted the fix-stale-range-label branch October 16, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant