Skip to content

Conversation

@TimMonko
Copy link

@TimMonko TimMonko commented Jan 2, 2026

x-ref napari/napari#8534

Starting from commit 55b6639, it seems there was a disconnection in updating text.
I added a test to demonstrate the issue, which fails on main but passes with this PR

Again, like in #320, I'm not sure this is the correct fix, but my idea was this:
make setDecimals call updateText, so that also in the __init__ of SliderLabel the text gets forced to render properly, rather than just setText. But maybe there are other events or some bigger event that should be calling updateText? I didn't want to put updateText in the init for this reason, because then it would duplicate, but maybe there are other instances.

Now, setDecimals will properly update the display of the text -- which before was both uncentered and the wrong decimals

Below should be 0 decimals, but on main is not:

image

With this PR:

image

p.s. I tried to learn git rebase for these commit and seemingly screwed up 🙃

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.40%. Comparing base (9ce358e) to head (3aea1ab).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #323   +/-   ##
=======================================
  Coverage   86.40%   86.40%           
=======================================
  Files          49       49           
  Lines        3861     3861           
=======================================
  Hits         3336     3336           
  Misses        525      525           

☔ View full report in Codecov by Sentry.
📢 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.

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