Fix "Trace selection" index input inconsistency on Windows (Issue #111)#116
Open
okashaluai wants to merge 4 commits intoneurodroid:masterfrom
Open
Fix "Trace selection" index input inconsistency on Windows (Issue #111)#116okashaluai wants to merge 4 commits intoneurodroid:masterfrom
okashaluai wants to merge 4 commits intoneurodroid:masterfrom
Conversation
…t avoid collisions with them. wxID_HIGHEST is the last reserved ID.
… types a number and presses Enter, that event: is ignored by default (goes to the default dialog handler and does nothing useful) unless you specify wxTE_PROCESS_ENTER
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.
This PR resolves Issue #111 , which describes an inconsistent behavior in the "Trace selection" panel on Windows.
Problem:
On Linux, entering a number (e.g. 5) into the "Index" field correctly switches to the corresponding trace/sweep.
On Windows (Stimfit-Lite), entering a number sometimes causes the field to jump to a different trace than intended — making the input unreliable and confusing (What I have discovered is that the issue is simpler than expected the inconsistency is only with the index displayed and it has nothing to do with the showed graph -it shows the correct trace graph-).
Fix:
The fix included the following minor changes:
wxID_HIGHEST + 1and so on (wxID_HIGHESTis the last reserved ID).wxSpinCtrlincludes awxTextCtrlfor manual number entry. When a user types a number and presses Enter, that event: is ignored by default (goes to the default dialog handler and does nothing useful) unless you specifywxTE_PROCESS_ENTERPrevented race conditions or unintended updates during input validation or focus events that were specific to the Windows build.
Tested on:
✅ Windows 10 with wxWidgets 3.2.8
✅Ubuntu 24
Manually tested input behavior for multiple sweep numbers — all updated correctly and matched expectations.
Notes: