170 Commits

Author SHA1 Message Date
Christoph Moench-Tegeder 129995acbd Handle libspnav login on FreeBSD just like on Linux
FreeBSD uses libspnav, just like a Linux does, so all the
conditional code addressing the spnav APIs should be used
on FreeBSD, too.
Unfortunately, the logic was not consistent in all places:
sometimes we had "#ifdef", sometimes "#if defined" and
sometimes it was negated as "#ifndef". To make the intention
clearer across both Linux and FreeBSD, I unified all places
to a "#if defined(__linux__) || defined(__FreeBSD__)".
If we get another OS latching onto the same logic, we should
introduce a simple flag for this, but for only two OSes I
decided against adding central logic for this.
2026-02-16 22:56:27 +00:00
Seth Hillbrand d45f46a900 Extract PLUGIN_ACTION_SCOPE enum from api_plugin.h
Create lightweight plugin_action_scope.h containing only the enum class.
Replace #include <api/api_plugin.h> in eda_draw_frame.h with the new
header and a forward declaration of PLUGIN_ACTION.

This removes transitive includes wx/bmpbndl.h, wx/filename.h and
nlohmann/json_fwd.hpp from 79 TUs.
2026-02-13 17:12:42 -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
Mark Roszko dad49d5dba Reduce tiny fp errors that can be introduced when updating footprints
Moving by the cursor position (double) and then back to the integer coordinate position sometimes added tiny tiny tiny shifts in the coordinate.
2025-12-06 15:39:57 -05:00
Jeff Young e6fd3826c3 Make sure listeners get updated when schematic changes.
Also be safer about pulling pointers out from under
search results.

Also remove old frame-based board listeners (they're
now hosted directly on the board).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21817
2025-09-26 17:41:50 +01:00
Jeff Young 6e316d9faa ADDED: menu items to control cross-probing from ERC
dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17916
2025-09-10 17:52:09 +01:00
Jeff Young 3c5fb9d90d CHANGED: progressive disclosure in DRC dialog.
CHANGED: moved Report All Track Errors to config menu.

ADDED: menu items to control cross-probing from DRC
dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17916
2025-09-10 17:52:09 +01:00
Seth Hillbrand 0a5de5010f ADDED: Spacemouse support for Linux
Uses libspnav to handle spacemouse data.  Overlays on existing
spacemouse framework to handle view activation

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16133
2025-08-12 07:04:54 -07:00
Jeff Young 55a36c1ce7 CHANGED: retire the select-lib-table dialogs.
We now allow the user to specify which in the
New Library dialog.

Also retires the "Export power symbols too" dialog.

Also gives a bunch of file and library dialogs
more explicit titles.

Also removes separate code-paths for Export to
Library and Export to New Library.  The regular
code path has a "New Library..." button now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
2025-07-20 19:06:40 +01:00
Jeff Young 273ca3de77 Re-entrancy guard for sym/fp change timers.
(Potentially KICAD-XJN.)
2025-07-13 16:39:50 +01:00
Jeff Young f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Jeff Young 34139ae305 Push generalised sketch-mode support down into DXF_PLOTTER. 2025-05-10 17:31:59 +01:00
Mike Williams 5fd294cad2 eda frame: hoist FocusItem calls up a layer
Prep for SCH_GROUPs
2025-04-01 14:34:20 -04:00
Jeff Young 0a4533703c Performance. 2025-03-24 10:28:41 +00:00
Ian McInerney 04ab369a49 Make the PCB layerbox not needed in pcbcommon 2025-02-28 01:57:37 +00:00
Ian McInerney 7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +00:00
Jeff Young 8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00:00
Wayne Stambaugh 42a1d1cf0b Include folder and 3D viewer code housekeeping. 2025-01-11 07:25:14 -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
Seth Hillbrand fbbb642c0c Move all nlnav to unique_ptrs
7daded7c60 moved them to bare pointers but
this was not required to allow forward declarations.  We only need to
place the CTOR/DTOR fully in the cpp file where the nlnav headers are
included
2024-12-30 15:43:15 -08:00
John Beard c39573ace3 Pcbnew: get footprint by name doesn't have to be a member on PCB_BASE_FRAME
This function doesn't access anything private to PCB_BASE_FRAME. So
split it into a static and slim the PCB_BASE_FRAME API just a
smidgen.
2024-11-01 20:35:50 +08:00
Seth Hillbrand e0453d9bcc Further cleanup of LSET
Remove duplicative functions.  Standardize on C++ stdlib formatting
2024-07-08 22:00:53 -07:00
Seth Hillbrand cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Jeff Young 1eb26b439a REMOVED new footprint dialog.
We now just create an "Untitled" footprint.

Also fixes a bug where the preview of new footprints
would zoom in too far.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17573
2024-05-31 10:36:51 +01:00
Alex Shvartzkop 5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young 0890ac57dd Improve clarity of default zone settings. 2024-02-03 13:22:16 +00:00
Jeff Young 7e46e85c7d Update copyrights. 2023-11-11 15:29:34 +00:00
Jeff Young 6ecfc89a4a Honour originTransforms in search panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15031
2023-11-09 18:41:18 +00:00
Jeff Young 23033451b1 Cleanup. 2023-09-29 00:13:12 +01:00
Jeff Young 1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
Marek Roszko 3cd60007c5 Dont leak richio into everything 2023-09-07 22:29:40 -04:00
Jeff Young c07e9c834f Validate new footprint / save as footprint info before exiting dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13923
2023-09-06 12:49:37 +01:00
Mike Williams b1a388ca69 Grids: Support X and Y for all grids, add optional names 2023-08-30 11:22:19 -04:00
Seth Hillbrand 14f6e32c74 ADDED: Change watcher for libraries
When editing or viewing library symbols, the files are watched for
underlying changes.  If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.

This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -07:00
Jeff Young a0adb59437 Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170
2023-03-13 20:26:11 +00:00
Wayne Stambaugh 664e5629f2 Document board change event listener code. 2023-03-13 13:59:01 -04:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Jeff Young 67e6603699 Move updateUnits functionality to where it can be shared.
Also call it when adding a footprint via the chooser.

Fixes https://gitlab.com/kicad/code/kicad/issues/13340
2023-01-02 22:12:26 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young 19eab62516 More safety around ratsnest state.
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
2022-11-30 13:00:21 +00:00
Jeff Young 3221877fe8 Push autosave-require down in to EDA_BASE_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11790
2022-10-10 14:03:52 +01:00
Jeff Young d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young 1bad72f14f Remove bad static_cast.
(m_settings isn't a PCBNEW_SETTINGS in non-PCB_EDIT_FRAMEs)
2022-07-24 23:41:41 +01:00
Jeff Young 722b2588f4 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087
2022-04-08 11:40:53 +01:00
markus-bonk 1a9ef4bd0f Add support for using a SpaceMouse to pan & zoom in the schematic editor. 2022-03-31 19:03:41 +00:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young 2250211ebf More wxT-ification. 2022-02-09 17:04:32 +00:00