347 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 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 f53c2e17a9 Rework of 0970fb8b.
SetMinSize( ..., -1 ) still required for non-growable
panels.
2026-02-09 14:04:51 +00:00
Seth Hillbrand edf6ce9f9d Fix XOR mode for last visible layer
When XOR mode is enabled, the last visible layer must
use TARGET_NONCACHED instead of the configured target.
This ensures the layer participates in XOR compositing
before cached items are flushed at frame end.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22889
2026-01-30 12:28:56 -08:00
Seth Hillbrand 27ac5ad7b5 Fix Gerbview XOR mode broken after hide all layers
UpdateXORLayers() tracks the last visible layer and disables XOR diff
for it to prevent incorrect rendering onto the background. When layer
visibility was changed via SetVisibleLayers(), UpdateXORLayers() was
not called, causing the XOR state to become stale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22889
2026-01-30 09:41:13 -08:00
Jeff Young d40dced428 Use the correct preferences.
The fooptrint viewer has its own WIDNOW_SETTINGS.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22709
2026-01-13 18:26:02 +00:00
Seth Hillbrand b2766a60ef Avoid selecting hidden layers
This can mess up our display

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18983
2026-01-01 17:39:20 -08:00
Jeff Young c4b72c386a Formatting. 2025-12-15 16:38:43 +00:00
Seth Hillbrand 0785e7525b Auto-update flyout icons when changed
Provides an update action to refresh the icon display when the user
changes the angle mode using a hotkey.  Also unifies the angle modes
between schematic, pcb and library editors
2025-09-22 12:19:20 -07:00
Mark Roszko 1e9025a4dc Move to a fixed enum for page sizes as well as well as holding a list of types accessible in a vector.
Drops some hardcoded size names in places among other bits.

Woooo committed pushed at 36000 feet.
2025-09-13 20:12:53 +02:00
Seth Hillbrand 26f0c03e61 ADDED: support for 45 degree crosshairs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6047
2025-08-23 06:20:00 -07: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 65f4524164 Cleanup (KICAD-XZP). 2025-07-28 19:37:52 +01:00
Seth Hillbrand 094870e7a4 String fixes
- Clarify wording in a couple places
- Fix missing 'not' and remove non-standard dashes
- Standardize on single-quote for strings in strings
2025-07-23 17:36:51 -07:00
Jeff Young 6541202d42 Repair COMMON_TOOLS to know about frame-specific WINDOW_SETTINGS
Remove the older architectures for ensuring non-empty
grids and zooms

Move new architecture to PARAM_LIST::Load,
and add zoom support

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21318
2025-07-15 15:24:11 +01:00
Jeff Young 18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Mike Williams 40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young 4ae4f9ea87 Wait for wxWidgets to destroy window. 2025-03-31 15:14:59 +01:00
Jeff Young 0a4533703c Performance. 2025-03-24 10:28:41 +00:00
jean-pierre charras eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Ian McInerney 85810510f4 Tweak toolbar settings a bit
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
  the various tool types
2025-02-28 01:57:37 +00:00
Ian McInerney 548334b4e2 Load toolbar configuration from settings 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
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 753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
jean-pierre charras b6bf7d6f44 Revert "Gerbview: Add build option do enable/disable the 3Dconnexion support."
This reverts commit 336532303e.
A better fix for the link issue on MSYS2 will be committed
2024-09-21 16:28:05 +02:00
jean-pierre charras 336532303e Gerbview: Add build option do enable/disable the 3Dconnexion support.
On msys2 a link issue (3 undefined symbols) prevent Gerbview to be built.
So I added this option (KICAD_ENABLE_3DMOUSE_GERBVIEW, enabled by default)
to disable 3Dconnexion support on request.
2024-09-21 13:24:43 +02:00
Kamil Galik 2068ed31a4 ADDED: 3D Mouse support in Gerber Viewer and Drawing Sheet Editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13306
2024-09-21 08:22:19 +00: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
jean-pierre charras 6fc662188f Gerbview: fix a minor issue.
When the option "always hide all layers but active" is set, the active layer
changed using hotkeys or Toolbar layer selector did not update the visible
selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18059
2024-05-22 17:25:01 +02:00
jean-pierre charras 93bd2c73ff Gerbview: rename diff mode by forced opacity display mode and make opacity adjustable.
The diff mode (option in left toolbar) was never a differential display mode.
It is actually an option to force the alpha channel (opacity) of layer colors
to a given value.
So change the name and tool tips to force opacity mode, and make the opacity
parameter adjustable in preferences.

Gerbview: cleanup: remove a old and dead code.
2024-05-10 16:22:55 +02:00
jean-pierre charras 68c0be1097 Gerbview: cleanup: remove a old and dead code. 2024-05-09 17:54:05 +02:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
jean-pierre charras 36b9ef0dc9 Gerbview: update view items after reordering/modifying view layers.
Previously, after updating the gerber layer order, displayed D_codes where
not always those corresponding to the active layer.
2024-03-09 18:13:24 +01:00
jean-pierre charras 7944803f8c GERBVIEW_FRAME::RemapLayers(), fix incorrect handling of layers visibility
When modifying the gerber layers visibility, other (non gerber) layers must
be not modified.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17282
2024-03-08 17:03:11 +01:00
Jeff Young 9ff66d0e71 Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934

(cherry picked from commit 9d40374baf)
2024-02-23 16:53:30 +01:00
jean-pierre charras d91e744f0f Gerbview: fix incorrect layer visibility settings after removing the current layer 2024-02-07 10:49:24 +01:00
Marek Roszko b4bfdf95d3 Explicitly add 48, 128, 256 to icon bundles for each app 2024-01-16 17:21:44 -05:00
Marek Roszko 9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Jeff Young d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Jeff Young f58c0c370c Re-arrange visibility flags only.
Colors are owned by the slot, not the layer objects.
2023-10-01 19:12:34 +01:00
Jeff Young d9f1aaa8e3 Keep colors & visibility with layer objects, not layer number.
Also fixes a bug where the Layers manager would keep getting wider
each time the longest item was moved

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15790
2023-10-01 19:01:02 +01:00
Marek Roszko 22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
jean-pierre charras efdead2008 Gerbview: added (in Layers Manager) a new setting to adjust draw offset
and rotation of the active layer. This is a draw option only.
2023-09-06 20:08:45 +02:00
Mike Williams b1a388ca69 Grids: Support X and Y for all grids, add optional names 2023-08-30 11:22:19 -04:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young 782c73300b Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least.  Plotters still define their own mils-to-iu scale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00