324 Commits

Author SHA1 Message Date
Jon Evans 082ec945fc Reduce memory usage of text/fields
Lazy construction of caches that are only needed
for some of these reduces their footprint significantly.
2026-03-19 21:25:34 -04:00
Jon Evans e468788aa8 Fix up kicad-cli DRC project and library handling
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23379
2026-03-09 20:42:29 -04:00
John Beard c4c19018c3 Pcbnew: Restrict includes of pad.h/footprint.h
There are some headers which don't need to include pad.h (which brings
padstack.h) - they just need forward defines.

While pad.h is not an especially heavy include on the scale of things,
footprint is quite heavy. And both reduce inclusion load and
reduce the number of files needlessly sensitive to changes in headers.
2026-03-05 02:18:34 +08:00
Seth Hillbrand 6c9c75eb07 Remove property.h and property_mgr.h from inspectable.h
This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.

Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
2026-02-13 19:54:46 -08: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
Mike Williams a3c1cd3d9a board: use GetItemSet() instead of poorly imitating it
Most of the spots are missing one or more newer board item types,
where "newer" means in the last sevenish years...
2026-02-10 21:21:43 -08:00
Mark Roszko 314735e2fc Move message dialogs to KICAD_MESSAGE_DIALOG define
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22830
2026-01-25 12:42:13 -05:00
Alex Shvartzkop f6c3627e66 Fix scaling of action plugin icons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22804
2026-01-25 20:08:53 +03:00
Seth Hillbrand e741ee2e6c Cache netclass clearances
Importing Altium boards can generate hundreds of netclasses.  Our O(N)
search was choking on the overload
2026-01-09 16:15:20 -08:00
Damjan 03215844fd pcbnew: plugin buttons initially missing or inoperative 2026-01-09 15:46:21 -08:00
Seth Hillbrand 0f0fbc55d7 Fix memory leak in Python pcbnew.FootprintLoad()
PCB_IO_MGR::FindPlugin() returns a new PCB_IO* that the caller owns. The
Python wrapper functions (FootprintLoad, FootprintSave, etc.) in
footprint.i call GetPluginForPath which calls FindPlugin, but the
returned plugin object was never deleted because SWIG didn't know
Python owned it.

The %newobject directive tells SWIG that Python owns the returned
PCB_IO* and should delete it when the Python object is garbage
collected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22526
2026-01-06 04:45:06 -08:00
jean-pierre charras 05437125ac Pcbnew, Python interface: handle PCB_BARCODE 2025-12-28 11:54:27 +01:00
jean-pierre charras ecc642c994 fix footprint.i after code change from PCB_IO_MGR.PluginFind() -> FindPlugin()
It does not fix other issues like memory leak created by FindPlugin() use.
2025-12-19 07:57:46 +01:00
Mark Roszko b54750156d Add drc for custom field mismatch with schematic symbol 2025-12-07 21:03:33 -05:00
Mark Roszko 6c1e54f7a6 Edit pcbnew.i from a treadmill 2025-12-05 01:39:44 +00:00
Mark Roszko 2008754ad8 Remove the loner uppercase E in the filename 2025-12-04 20:13:01 -05:00
Mark Roszko 8c02b80f89 Make the gendrill writer base filename match the class name. Also merged in gen_drill_report_files.cpp 2025-12-04 20:06:51 -05:00
Raman Varabets c5a2b86379 Handle Python multi-phase initialization support in swig-4.4.0
Signed-off-by: Mark Roszko <mark.roszko@gmail.com>
2025-11-22 11:50:47 -05:00
Jon Evans baa29c1a58 Port footprint library table to new system 2025-11-04 06:54:53 -05:00
Jon Evans 266c8c8754 Refactor and consolidate startup wizard
- Add welcome page
- Add settings migration
- Add library table configuration
- Combine sentry and updates into a privacy step
- Support in single-top mode
2025-10-15 22:18:52 -04:00
Jeff Young 814f65934f Improvements to DRC marker clearance paths.
Reverts most of the fix for 9778. Highlighting
multiple markers creates confusion in both the
status bar and how the associated clearance paths
are shown.

Also adds more clearance path graphics to make
the need for a fix to 9778 somewhat less acute.

Also makes clearance graphics scale with marker.
2025-10-10 21:38:46 +01:00
Jeff Young ac775e716f Simplify annotation graphics for DRC markers.
Also includes some performance tweaks, mostly around
not copying large structures.
2025-09-19 20:06:39 +01:00
Seth Hillbrand 8f0b3b59f0 Offer to create missing plugin directory 2025-09-02 20:32:14 -07:00
John Beard 299a6c6c7b Netinfo: avoid transitive string_utils.h include
Put the string manipuuation utils in the cpp, and
remove string_utils.h from the includes of netinfo.h.

This spams that header into about 350 files, not all of which
need it. Then go round and tidy up the places (most exporters
and dialogs) where CPP files weren't including string_utils.h
when they used it, as well as some other order-sensitive
include issues that turned up.
2025-08-12 20:00:15 +08:00
Seth Hillbrand 6cd076eed4 Blast quite a bit of LOCALE_IO into the sun
After forcing the locale-specific read/writes out of our IO, we can
remove the global LOCALE_IO calls in many places.

Still to do: exporters, pcm, specctra, settings, drawing sheets,
plotters
2025-07-14 15:30:42 -07:00
Jeff Young c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young a7e2878e6b Kicad SEXPR should no longer need LOCALE_IO. 2025-07-14 13:17:53 +01:00
Jeff Young 68d4940087 Thread-safety (potentially KICAD-VMX...)
... KICAD-6PV, KICAD-82, KICAD-R3A, and others.
2025-07-13 15:25:10 +01:00
Jeff Young 18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Jeff Young 116bd924c2 Static cast safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20958
2025-06-08 23:21:02 +01:00
jean-pierre charras 6d064e8bb3 Fix pcbnew.py BOARD_ITEM::Duplicate() after changes in board_item.h changes 2025-05-21 18:23:36 +02:00
Jeff Young 524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +01:00
jean-pierre charras 945c990a53 pcb_group.i: add missing include to use PCB_GROUP. 2025-04-10 08:57:53 +02:00
Mike Williams 05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Ian McInerney 7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +00:00
Seth Hillbrand 3b24b5b74b Fix SWIG QA 2025-02-24 14:13:36 -08:00
Jon Evans cd403a27a9 SWIG: re-wrap LSET::FmtHex and co
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19546
2025-01-18 09:04:25 -05:00
Jon Evans 54e8233b36 Don't scan for API plugins if server is disabled 2025-01-10 21:46:51 -05:00
Jon Evans c13af4ed36 Remove warning severity override
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19573
2025-01-09 17:34:57 -05:00
Jarrett Rainier d01c939e49 Moved scrollwheel anchor pads to centre-band 2025-01-04 09:44:43 +00: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
Jarrett Rainier bbde2900e9 ADDED: Capacitive scrollwheel footprint wizard 2024-12-30 23:39:18 +00:00
Jon Evans 3bc190e515 Add deprecation notices to SWIG API 2024-12-30 11:25:04 -05:00
JamesJCode 5020b8a950 Fix FOOTPRINT Python QA 2024-12-29 09:16:54 +00:00
JamesJCode 3800bae281 Enforce thread safety in clearance and creepage checks
Previously, these checks injected a custom handler to add graphic
objects to a DRC marker. This was not thread-safe and was causing
non-deterministic crashes. The DRC reporting methods now accept
a customer handler which is called on the newly created
PCB_MARKER within the commit context. This defaults to nullptr
for DRC checks which do not require graphics or other additional
processing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19282
2024-12-23 18:10:47 +00:00
Jon Evans 9eda526871 API: Show API actions alongside SWIG action plugins in preferences 2024-12-14 18:00:07 -05:00
Jeff Young 753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
Jeff Young 9e7ffc6ff0 Load input-specific project; don't use default (blank) project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19176
2024-11-22 21:29:05 +00:00
Jon Evans 9ed3474a5b Add more SWIG compatibility shims 2024-11-16 13:04:27 -05:00
jean-pierre charras 9495a5bc28 SWIG: disable some warnings 476 (Initialization using std::initializer_list) 2024-11-09 17:38:28 +01:00