63 Commits

Author SHA1 Message Date
Seth Hillbrand 0c10366e84 Fix symbol chooser flicker with missing libraries
Libraries with permanent load errors (LOAD_ERROR) were re-added to
m_pending_load_libraries on every timer tick, creating an infinite
retry loop. Each iteration called m_lazyLoadHandler() which triggered
Regenerate(), rebuilding the tree and resetting scroll position every
second.

Skip LOAD_ERROR libraries instead of retrying them, and only call the
lazy load handler when at least one library was actually loaded in the
current iteration.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23455
2026-03-16 12:16:45 -07:00
Jon Evans f06a303384 Symbol chooser performance improvements
Cache LIB_SYMBOL properties used for chooser filtering
Reduce copying during creation of chooser widgets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23267
2026-03-03 21:26:07 -05:00
Seth Hillbrand fff428dcd6 Add THROTTLE class and DrainPendingEvents
Five call sites independently reimplemented the same
time-gated throttle pattern.  This consolidates them all
into a single THROTTLE class backed by steady_clock.

Three call sites duplicated the wxWidgets YieldFor workaround
for timer-event backlog (wxWidgets issue #26192). This replaces them
with a shared DrainPendingEvents free function.
2026-03-03 11:33:10 -08:00
Jeff Young b12af57fc9 Honour library table row disabled flags.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23091
2026-02-17 12:33:48 +00:00
Seth Hillbrand c52ab91c84 Reduce compile times by extracting headers
Break the most expensive header include chains that contaminate the
largest number of translation units

New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
2026-02-13 17:10:45 -08:00
Jeff Young 3578602b4a Allow keywords to be selected as a chooser column.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22644
2026-01-16 13:30:14 +00:00
Seth Hillbrand 1143df89b1 Fix database library symbols disappearing in symbol chooser
The GetLibraryStatus() check was only verifying that the optional had a
value, not that the library was actually loaded. Database libraries return
a status even when not fully loaded, causing them to be skipped during
tree population.

Check both that the status exists AND that load_status is LOADED before
considering a library as ready for display.

Additionally, we need to clear the HTML placeholders when loading fails
to prevent them leaking

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16667
2026-01-11 17:53:00 -08:00
Jeff Young 4413cc75d8 Formatting. 2026-01-05 19:27:32 +00:00
Jeff Young 0859aa4b75 Default to showing Value column in symbol library tree.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22347
2025-11-25 12:06:58 +00:00
Jon Evans 84d8b7889d Remove legacy symbol lib table code 2025-10-15 22:18:55 -04:00
Jon Evans e1ea6a1302 Shorten class name for legibility 2025-10-15 22:18:54 -04:00
Jon Evans 467cf22bd9 More porting of schematic to new library system 2025-10-15 22:18:51 -04:00
Jon Evans 992be7fe35 Move symbol editor to new library system 2025-10-15 22:18:51 -04:00
Jon Evans 194091acae Switch schematic editor to using new library system
ADDED: lazy loading of symbol libraries in chooser
2025-10-15 22:18:50 -04:00
Jeff Young 82124c9cef Leave decision to show mandatory field columns to user.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13600
2025-08-04 11:11:19 +01:00
Jeff Young 34e075e112 Rework libtree SearchTerms to honour shownColumns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21419
2025-08-03 20:32:19 +01:00
Jeff Young 06dcb64ad8 Harden progress reporter API against misuse.
Also, titles are nouns, not verbs.  (Messages
*inside* reporters are verbs.)

Also implements progress reporter for Altium
schematic import.
2025-06-01 19:38:24 +01:00
Jon Evans 8903a82c50 Fix design block panel trampling symbol chooser settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19190
2025-01-26 18:32:00 -05:00
Seth Hillbrand 0b2d4d4879 Revise Copyright statement to align with TLF
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
2025-01-01 14:12:04 -08:00
Jeff Young f7f86174a0 Make sure symbol editor prefs go in symbol_editor file.
(And same for footprint editor.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18905
2024-10-13 20:14:14 +01:00
John Beard df5fe44839 sch_symbol.h doesn't need sch_lib_table.h
It doesn't even use the forward-declared
SYMBOL_LIB_TABLE.

Including this pulls in the whole richio system,
and sch_symbol.h is a very-included header.

Quite a few things do use SYMBOL_LIB_TABLE, but nowhere
near as many as use SYMBOL.
2024-10-04 18:06:18 +01:00
Jeff Young 251ed2ee54 Formatting and "auto" reduction. 2024-06-19 12:39:22 +01:00
Rosy 17891f7a1d HTTP Libraries: Add support for descriptions of sublibraries 2024-04-30 11:57:00 +00:00
Alex Shvartzkop cb25c8620e Performance optimizations for database libraries.
(cherry picked from commit e68df8e1d1)
2024-02-23 20:29:18 +03:00
Jeff Young e549d7c0c6 Formatting and clearer variable names.
(No functional changes.)
2024-01-23 16:02:30 +00:00
Jeff Young e4baf877c8 performance efficiencies 2023-12-18 18:36:02 +00:00
Jeff Young fa11e9138d ADDED support for pin and fp filtering in FOOTPRINT_CHOOSER.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7176
2023-09-29 17:03:50 +01:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Jon Evans 6cce99e0d0 Support showing Value field in symbol chooser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13527
2023-01-19 22:14:10 -05:00
Jon Evans 2b94b7df77 DbLibs: Support empty virtual table names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12902
2022-12-10 16:35:11 -05:00
Jon Evans 39a8ab8738 Make sure to set the lib table for a plugin before it gets used
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12847
2022-12-10 16:04:54 -05:00
Jeff Young 8eb68ee472 Add pin/unpin context menu to Symbol Chooser and Footprint Chooser.
Also moves some more code down into common so it can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/12384
2022-09-21 14:45:12 +01:00
Jon Evans e294fe2074 ADDED: Dynamic field columns in symbol chooser
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
2022-09-05 16:38:14 -04:00
Jon Evans 49354e52a8 Add support for sub-libraries concept
Sub-libraries allow a single-level hierarchy inside a symbol library.

This is useful for database libraries and for supporting other EDA library types where a
single file can contain multiple logical groupings of symbols.
2022-08-27 18:47:39 -04:00
Jon Evans 300d92438c Allow hiding symbol library tables from symbol chooser
Hidden but loaded libraries are useful when using database libraries
2022-08-26 20:18:40 -04:00
Jeff Young 753f2f3e4c Display descriptions in second column of library trees.
Also fixes some bugs in how the columns are sized.

Fixes https://gitlab.com/kicad/code/kicad/issues/12090
2022-07-28 14:51:47 +01:00
Jeff Young def87c969e Redo the pinned-libraries storage architecture.
1) always use preferences directly
2) allow nicknames from either preferences or project
3) store-after-modify

Fixes https://gitlab.com/kicad/code/kicad/issues/12000

Fixes https://gitlab.com/kicad/code/kicad/issues/11892
2022-07-22 09:31:10 +01:00
Jeff Young 05219e4d9a Add pinned library support to Choose Symbol and Choose Footprint. 2022-07-09 20:06:31 -06:00
Jeff Young 1f16092e29 Infobar warning if symbol loading was cancelled.
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).

Also makes sure that any cancel in the preLoad step is honoured in the
sync step.  (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)

Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.

Fixes https://gitlab.com/kicad/code/kicad/issues/8372
2022-02-27 17:06:08 +00:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

Fixes https://gitlab.com/kicad/code/kicad/issues/9157

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Jeff Young 5c21f93803 Consistency in progress and error messages. 2021-06-26 13:23:43 +01:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Jon Evans 358f01ba66 Use HTML report window for symbol loading issues 2021-04-02 19:50:50 -04:00
Jon Evans 82a4cacb4f Add threaded library load to symbol editor 2021-03-19 20:23:54 -04:00
Ian McInerney 6c3cf33170 Cleanup some compiler warnings 2021-03-19 21:18:45 +00:00
Jon Evans 93c991926f Use threading for loading symbol libraries 2021-03-19 00:56:26 +00:00