Text Box corrupted with multi-unit symbols
Description
Current behavior:
Closing KiCad and re-opening it changes multi-unit library symbols.
Expected behavior
Closing/re-opening KiCad should have no impact on multi-unit library symbols.
Details
The "text box" drawing primitive is treated differently than rectangles or simple text. The property "Common to all units" is either not saved properly or not loaded properly on multi-unit symbols, leading it to be always on. Analysis of the .kicad_sym text file suggests that the issue happens at the loading phase of the symbol. When later saving the library, the previous version of the symbol is replaced by the corrupted version.
P.S. The schematic editor is also affected by this issue.
Steps to reproduce
- Open the symbol editor
- Create a new symbol with 2 units per package.
- In the Unit A, add a text box. Make sure the option Common to all units is not checked.
- In the Unit B, add another text box. Make sure the option Common to all units is not checked.
- Save.
- Close the symbol editor but not KiCad.
- Re-open the symbol in the symbol editor and confirm it is still valid.
- Close KiCad completely.
- Re-open KiCad, and open the syhmbol in the symbol editor. Confirm the symbol is now corrupted.
KiCad Version
Application: KiCad x86_64 on x86_64
Version: 7.0.8, release build
Libraries:
wxWidgets 3.2.3
FreeType 2.13.2
HarfBuzz 8.1.1
FontConfig 2.14.2
Platform: Freedesktop.org SDK 23.08 (Flatpak runtime), 64 bit, Little endian, wxGTK, ubuntu, wayland
wxWidgets: 3.2.3 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.7.2
Curl: 8.4.0-DEV
ngspice: 41
Compiler: GCC 13.2.0 with C++ ABI 1018
Build settings:
KICAD_SPICE=ON
P.P.S. the issue has also been confirmed on a non-flatpak build
Application: KiCad x86_64 on x86_64
Version: 7.0.7-7.0.7~ubuntu22.04.1, release build
Libraries:
wxWidgets 3.2.1
FreeType 2.11.1
HarfBuzz 6.0.0
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
Platform: Ubuntu 22.04.3 LTS, 64 bit, Little endian, wxGTK, ubuntu, wayland
Build Info:
Date: Aug 13 2023 23:14:49
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.2
Curl: 7.88.1
ngspice: 38
Compiler: GCC 11.4.0 with C++ ABI 1016
Build settings:
KICAD_SPICE=ON