Don't apply pruning to libraries that don't have
any children, since the point of the pruning is to
hide libraries that don't directly match a search
term if they don't have any children that match.
Fix searching for full LIB_IDs that got broken by
the implementation of "AND"
Fix searching for library names alone
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17205
Also changes the scoring algorithm to start at 0 and then increment
to 1 (the value that tells us to show, but not expand) only if the
search terms and lib filters are empty.
Also simplifies the scoring algorithm so that it only
differentiates between exact-match, match-at-start and
any-match. The rest of the position-based matching
stuff is gone, as is the knowledge of the name vs the
keywords vs the description. All that is left to the
provider of the weighted search terms array.
CHANGED: Symbol chooser search now considers custom symbol fields
Visible columns can be controlled in database libraries.
In standard KiCad libraries, we show columns for all custom fields for now.
Customizable column visibility will be added in the future.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11946
When using the "Filter" search for footprints/symbols, the least
surprising outcome is that the window filters the existing
(alphabetically sorted) list but does not change the display order based
on scoring.
This also needs to adjust the fix for
https://gitlab.com/kicad/code/kicad/-/issues/259 as that assumed the
selected element would be the first below the group (not the case if we
are sorting alphabetically)
Fixes https://gitlab.com/kicad/code/kicad/issues/11746
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.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road. Better
to just escape them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
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.