Update global lib tables after PCM package changes without kicad restart
This is a follow up to #9713 (closed)
Currently global lib tables are stored in a static global vars and are only initialized once. This means that if the PCM was launched before they are initialized (i.e. before any of the editors are opened) then any libraries added/removed through PCM will be picked up, otherwise user has to restart KiCad.
Eliminating the need to restart KiCad would need on a rough glance:
- After PCM dialog is closed invalidate/reload global lib tables
- Invalidate/reload project lib tables that are based on global lib tables
- Notify any open windows that tables changed
- Somehow deal with footprints/symbols that are potentially yanked from under the editors while they are opened
KiCad Version
Application: KiCad (64-bit)
Version: (6.99.0-3555-gbd28bd7a00), release build
Libraries:
wxWidgets 3.2
FreeType 2.11.1
HarfBuzz 4.2.0
FontConfig 2.14.0
libcurl/7.83.1-DEV Schannel zlib/1.2.12
Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Sep 23 2022 12:28:54
wxWidgets: 3.2.1 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.83.1-DEV
ngspice: 37
Compiler: Visual C++ 1929 without C++ ABI
Build settings:
KICAD_SPICE=ON