fix(options): defer typed spinbox updates - #519
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
=======================================
Coverage 91.65% 91.65%
=======================================
Files 247 247
Lines 94783 94787 +4
Branches 15882 15884 +2
=======================================
+ Hits 86875 86881 +6
+ Misses 4590 4589 -1
+ Partials 3318 3317 -1 ☔ View full report in Codecov by Harness. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
The settings dialog saved each
valueChangedsignal and then refreshed all controls. Qt keyboard tracking emitted this signal after each typed character. The refresh interrupted entry before the user could type the complete value.User impact
Users can type complete ktool and other numeric settings values. Spin-box buttons, arrow keys, and mouse-wheel changes still apply immediately.
Validation
uv run ruff format --check src/erlab/interactive/_options/ui.py tests/interactive/test_options.pyuv run ruff check src/erlab/interactive/_options/ui.py tests/interactive/test_options.pyQT_QPA_PLATFORM=offscreen uv run pytest -q tests/interactive/test_options.pywith PyQt6: 61 passedQT_API=pyside6 QT_QPA_PLATFORM=offscreen uv run pytest -q tests/interactive/test_options.py: 61 passedgit diff --check