Repository navigation
fix(gui): refresh components only when values change - #2306
Conversation
Focus events from unchanged component controls rebuilt the parameter table and reopened bitmask help, interrupting dropdowns. Skip unchanged component synchronization and redundant field writes, and remove the duplicate FocusOut binding. Copy nested component values during synchronization so subsequent edits remain detectable while preserving the evaluator reference. Cover unchanged focus events, repeated edits, and receiver connection cascades with real Tk controls. Signed-off-by: YoussGm3o8 <youssefelkesti2005@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting. Reviewed at head This fixes the spurious parameter-table refresh when a component field gains or loses focus without a change, and it is ready to merge; the new test pins the change-detection and deepcopy logic. Minor (1)
|
|
Thanks, for this, merged |
Description
Fixes #2302
Opening an inline component dropdown generates focus events even when its value has not changed. Those events were treated as edits and rebuilt the parameter table, repeatedly opening bitmask usage help and preventing the dropdown from staying open.
Remove the duplicate focus-out binding and skip redundant field writes and table refreshes when component values are unchanged. Copy nested component values during synchronization so subsequent edits remain detectable while preserving the dictionary reference used by computed parameters. Keep the existing bitmask help behavior.
Checklist
git commit --signoff)Testing
The three new regression cases fail without the fix and pass with it. They use real Tk controls to check unchanged focus events, repeated edits, and receiver connection/protocol updates.
722 affected tests pass on Windows with Python 3.14.6. One known pre-existing orientation layout failure was deselected.
An automated check in the full offline editor confirms that both receiver dropdowns open without reopening bitmask help.
Applicable pre-commit and pre-push checks pass, including Pylint and MyPy. Scoped Pyright checks also pass.
Unit tests pass
Integration tests pass
Manual testing performed
Tested on flight controller hardware
The full repository suite and Linux/macOS behavior were not tested locally for this change.
The fork's Windows packaging job fails because the Chinese language-file URL returns a 404 response, which the installer compiler rejects. The Pylint 3.14 job cannot import Tkinter and also reports diagnostics in unchanged files. Neither workflow is changed by this PR. See the Windows build log and Pylint run. Both packaging and Pylint passed at the upstream base commit,
acad9f5a.