Simulation 'Tune' dialog - text boxes behaving in a non-standard way
Description
On the Simulation 'Tune' dialog (lower right of the Spice Simulator window) the upper and lower text boxes, which contain the upper and lower bounds for the range over which the device value can be varied, do not "register" the value typed in when the user clicks away after entering the value. These screenshots illustrate the problem:
In this example, the upper and lower text boxes imply the range is 10n to 500n, but the value in the middle box will only change in the range 50n to 200n. This is anomolous and confusing behaviour. The cause is the user clicking away from the text box, rather than pressing the 'Enter' key, after typing into the box.
Pressing the 'Enter' key after typing in a new value "registers" the new value, whereas clicking away from the dialog box leaves the entered value visible, but does not "register" it. Thus the upper and lower limits used by the software are not as shown in the upper a lower text boxes. This is non-standard behaviour for both Windows and Linux text boxes and may confuse a new user. Clicking away from the text box should "register" the entered value in the software.
It seems as if the "OnExit" events for those text boxes are not being handled. The fix should be trivial: simply point the "OnExit" event handler stub to the event handler which handles presses of the Enter key.
Please see this forum thread for the discussion: https://forum.kicad.info/t/simulation-tune-dialog-solved/28144
Steps to reproduce
- Load any project which has been set up to use the circuit simulation feature.
- Select menu item Tools | Simulator, then confirm that the simulation runs correctly and produces expected results.
- Use the 'Tune' icon to select a particular resistor or capacitor for varying.
- Confirm that upper and lower bounds values have appeared in the upper and lower text boxes.
- Click in the upper bounds text box and type a new value - after entering the new value do not press the Enter key, just click on the lower bounds text box.
- Enter a new value in the lower bounds text box - after entering the new value do not press the Enter key, just click on the slider, move it, and observe the value in the middle text box - it will not observe the new values just entered into the bounds boxes.
- Finally, type new values into the upper and lower bounds boxes, each time pressing the Enter key after the new value has been typed in. This time the new values are registered and the middle value will now observe the new bounds.
KiCad Version
Application: Eeschema
Version: (5.1.9)-1, release build
Libraries:
wxWidgets 3.0.5
libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.73.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.71.0
Compiler: GCC 10.2.0 with C++ ABI 1014
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON