Spice model editor adds unwanted instance field when parameter grid is focused
Description
When you add a model to a symbol, if you click into the parameter grid and don't edit anything, you will get the first parameter in the grid added to the Sim.Params
line, with its default value.
The first parameter is often temp, and its default value is 0, which overrides the global temperature and changes the sim results.
It's not hard to remove the field manually, but it's very rare that I actually want to specify temp so it's annoying that it gets added just by focusing the parameter grid.
Steps to reproduce
- add a resistor, or any other symbol without a spice model already attached, to a schematic
- edit the resistor's properties and click Simulation Model...
- Under built-in SPICE model, select Device: Diode
- Click the parameter grid, expand some categories, etc., but don't type anything into a value
- Click OK
- Notice that you now have
Sim.Params
set totemp=0
KiCad Version
Application: KiCad Schematic Editor arm64 on arm64
Version: (7.0.0-rc2-138-g8aa225bd1e), release build
Libraries:
wxWidgets 3.2.1
FreeType 2.12.1
HarfBuzz 5.3.1
FontConfig 2.14.0
Platform: macOS Monterey Version 12.2.1 (Build 21D62), 64 bit, Little endian, wxMac
wxWidgets: 3.2.1 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.3
Curl: 7.77.0
ngspice: 38
Compiler: Clang 13.0.0 with C++ ABI 1002
Build settings:
KICAD_SPICE=ON