The symbol chooser's footprint dropdown now fetches filtered results from
pcbnew via KIWAY instead of requiring direct access to FOOTPRINT_LIST.
Filter criteria (pin count, footprint patterns) are serialized as JSON,
sent to pcbnew, and matching footprints are returned as a JSON array.
The filtering uses preloaded footprints from the adapter rather than
re-reading from disk, which eliminates the main performance bottleneck
when selecting symbols.
Tree adapters now call GetFootprints() directly instead of going through
GFootprintList and its cache file. FOOTPRINT implements LIB_TREE_ITEM so
footprint objects work directly in library tree displays similar to
LIB_SYMBOL.
Removed cache read/write calls from files.cpp, footprint_edit_frame.cpp,
and pcb_base_edit_frame.cpp. The footprint chooser uses AsyncLoad() and
BlockUntilLoaded() to ensure libraries are ready before building trees.
GFootprintList still exists for cvpcb and eeschema cross-module access
via KIWAY, but no longer reads or writes cache files.
The three library adapters (symbol, footprint, design block) each had
their own AsyncLoad() and GetLibraryStatus() implementations that were
nearly identical. This moves both to the base class.
The per-library mutex is removed. Each adapter now uses a single
shared_mutex for its library map. Read operations take shared locks,
write operations take unique locks. This simplifies the locking model
from two levels to one.
Derived classes override a new enumerateLibrary() method to perform
type-specific enumeration. The base class handles threading, status
tracking, and error handling.
Also adds a new WithFootprintsForLibrary() routine that takes a callback
but handles the locking internally so callers don't need to remember
The comparator used in equal_range for searching the footprint list
did not handle null entries, while the sort comparator did. If any
null entries existed in the list due to concurrent modification or
error conditions, the binary search would crash when comparing them.
Add null checks to the equal_range comparator and the result loop
to match the defensive coding pattern used in the sort comparator.
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
Footprint library nicknames are case sensitive but the comparison for
the library tree control was case insensitive.
Also make the footprint name comparisons case sensitive as well. While
not strictly necessary, the plan is to start using the name defined in
the footprint file instead of the file name which will allow for case
sensitivity.
Fixes lp:1833701
https://bugs.launchpad.net/kicad/+bug/1833701
(cherry picked from commit d8fff5c820)
Added checks to StrCmpNum() function in common/sting.cpp to prevent
iterating past the end of the sting. Also removed length of string
parameter since it did not seem to be used anywhere.
Fixes lp:1818157
https://bugs.launchpad.net/kicad/+bug/1818157
Be more intelligent about sorting lib tree items. (Footprint
entries, for instance, come out of an already-sorted list.)
Don't recreate menus twice when laoding Footprint Editor.
More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.
For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.