Reannotate does not preserve unit associations correctly
Description
"Reset existing annotations" does not always successfully keep units grouped together. I don't know what conditions it fails to do this in, but I have a repro.
Steps to reproduce
- Load the attached project.
- On page 8 (first instance of ADC_DAC), note the grouping of U108A, U108B, and U108C all close together in the upper left.
- Switch to page 5 (Regulator1), and run a partial reannotation with the settings shown in the screenshot below.
- Return to page 8 and check the same components, noting that they are now U108A, U108B, and U106C
KiCad Version
Application: KiCad Schematic Editor arm64 on arm64
Version: 7.99.0-1350-g1ed4cd3644, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.3.1
FontConfig 2.14.0
libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Platform: macOS Ventura Version 13.4 (Build 22F66), 64 bit, Little endian, wxMac
Build Info:
Date: Jun 6 2023 01:20:23
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.3
Curl: 7.77.0
ngspice: 40
Compiler: Clang 13.0.0 with C++ ABI 1002
Build settings: