Eeschema: symbol alternate pin definition issue
When changing an existing schematic symbol by adding alternate pin definitions, the alternate pin definitions are lost after saving and reopening the schematic. It appears that when the alternate pin definition was implement, the alternate pin comparisons were not added to the LIB_PART == operator. This causes the symbol management code in SCH_SCREEN to see the symbols as identical and drops the modifications to the symbol.
The expected behavior is that both the original symbol (without alternate pins) and the modified symbol (with alternate pins) are correctly mapped to the appropriate schematic symbol and saved in the schematic file.
Steps to reproduce
- Open the attached project and add an alternate pin with a different pin type and style to the ALT-PIN symbol and save the symbol.
- Open the schematic and add a new instance of the ALT-PIN symbol using the symbol chooser.
- Open the symbol properties dialog (e) for the newly added symbol and change the pin to the newly added alternate pin and click the OK button. Notice that the grid "Electrical Type" and "Graphic Style" to not update when the alternate pin is selected (this could be a GTK and/or wx 3.0 issue).
- The new symbol should now have the alternate pin name and graphical style. Save the schematic and close the Eeschema.
- Open Eeschema. The new symbol will have the correct symbol name but the wrong pin graphical type.
- Open the alternate pin panel in symbol properties dialog and notice there is no alternate pin available.
- Open the schematic file with a text editor and observe there is only on ALT-PIN symbol in the symbols section of the file. There should be a second ALT-PIN symbol with suffix appended to the name along with the correct alternate pin definitions and the new schematic symbol library link should point to this symbol.
Application: Eeschema Version: (5.99.0-8533-g07d4a28024), debug build Libraries: wxWidgets 3.0.4 libcurl/7.68.0 GnuTLS/3.6.13 zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3 Platform: Linux 5.4.0-62-generic x86_64, 64 bit, Little endian, wxGTK, gnome-classic, x11 Build Info: Date: Jan 20 2021 06:41:53 wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24 Boost: 1.71.0 OCC: 7.3.0 Curl: 7.68.0 ngspice: 31 Compiler: GCC 9.3.0 with C++ ABI 1013 Build settings: KICAD_SCRIPTING=ON KICAD_SCRIPTING_MODULES=ON KICAD_SCRIPTING_PYTHON3=ON KICAD_SCRIPTING_WXPYTHON=ON KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON KICAD_SCRIPTING_ACTION_MENU=ON KICAD_USE_OCC=ON KICAD_SPICE=ON KICAD_STDLIB_DEBUG=OFF KICAD_STDLIB_LIGHT_DEBUG=OFF KICAD_SANITIZE=OFF