1814 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 2df6f06c2f Fix gerbview assertion when drawing flashed shape without D_CODE
Remove wxASSERT_MSG for null D_CODE in drawFlashedShape. The null
guard and early return already handles this case correctly. Malformed
gerber files can have items without a valid aperture code.

Fixes KICAD-1089
2026-02-16 11:20:50 -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
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
Seth Hillbrand 8eb3f3c618 Enable GVFS/network filesystem visibility in file dialogs
On GTK, wxFileDialog defaults to local_only mode which hides GVFS-mounted
filesystems like Google Drive, SMB shares, and external drives mounted
through GVFS. This adds a platform-specific function that disables
local_only mode to show these network/virtual filesystems.

Apply AllowNetworkFileSystems to all file dialogs across KiCad
to ensure directories on network filesystems are visible when
browsing for files.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14372
2026-01-29 12:43:20 -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
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
Sven Pauli 75887af324 Ask to remove non existing file from history. 2026-01-07 10:49:52 +00:00
Seth Hillbrand 75584340e5 Revert "Improve responsivity for selected items"
This reverts commit 205b3f560a.

Accidentally dropped move handling.  Will look for other ways
2026-01-04 07:18:23 -08:00
Seth Hillbrand 205b3f560a Improve responsivity for selected items
We don't need a full repaint for items when selected, just update
colors.  Selected mode doesn't require hiding the existing items, we
just need to repaint them in a new color.  Then we can use the cached
elements

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22591
2026-01-04 06:38:42 -08: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 7ddcce49ac Clean up secondary pointers for some of the Gerber toolbar controls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22604
2025-12-31 16:49:44 +00:00
Jeff Young ba3e35b13e Protect toolbar controls from improper contexts. 2025-12-30 13:26:20 +00:00
dsa-t a2657db5e5 Fix assert failures when opening non-ASCII files in gerbview.
Fixes KICAD-KEV


(cherry picked from commit 7d03b6bb8c)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-12-20 03:19:19 +03:00
Jeff Young c4b72c386a Formatting. 2025-12-15 16:38:43 +00:00
dsa-t 332b4ed107 gerbview: significantly improve performance when zip archive has extra ASCII files.
(cherry picked from commit bddc4e5f89)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-11-22 15:27:37 +03:00
jean-pierre charras bdf1805891 PANEL_STARTWIZARD_LIBRARIES: fix minimal size of panel.
Previously, a too small size was used, because a wxStaticText was not initialized
when the panel best size was computed.
It is now initialized in the CTOR, before sizes are computed, and is taken in account.
2025-11-17 09:33:18 +01:00
jean-pierre charras 97dc4fa4bd Gerbview: fix regression: Fix correct handling of number separated by ','
This is an issue visible only when using a locale using ',' as float separator.
In code we are using wxString::ToCDouble(). It should accept only '.' as float
separator and see ',' as a separator between words.
Looks like wxString::ToCDouble() accepts both '.' and ',' as float separator
(at least on wxWidgets 3.2.6)
2025-11-16 14:51:02 +01:00
jean-pierre charras 904c8318c8 Gerbview: fix regression: incorrect handling of complex Aperture Macro
In some cases, operands could be lost.
2025-11-16 10:57:32 +01:00
Jeff Young e094a3d34a Naming conventions and simplification. 2025-11-09 21:19:54 +00:00
Jeff Young d78f6857c1 Export Gerber slots as single-pad-footprints.
(We export round holes as vias, but they don't
allow slots.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22057
2025-11-01 19:48:43 +00:00
Seth Hillbrand 61ab7cc915 ADDED: AUI Memory
Using the new wx3.3 routines to serialize the state of our AUI elements,
we store them using JSON in the preferences for each window

I have left the SavePerspective in place for now to see how legacy
(mostly *nix) builds handle this and provide a smooth transition to 3.3

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2381
2025-09-24 18:43:47 -07: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
jean-pierre charras 45166bf5c3 Gerbview: fix broken behavior for deprecated command IPPOS and IPNEG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21715
2025-09-11 14:30:50 +02:00
Jeff Young 8c3026cf1a Naming conventions. 2025-08-25 12:13:38 +01: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
jean-pierre charras 6d576a11a8 Fix 2 compil warnings. 2025-08-16 17:19:26 +02:00
Jeff Young d5f16adde1 ADDED: maintenance page to preferences. 2025-08-15 16:57:46 +01:00
Seth Hillbrand 188ffda029 Add a 90°-only mode for polygon creation
Sometimes, you don't want those 45° corners in your nice, clean zones.
This adds an additional mode that can be selected, cycling through
free-angle, 45° angle and 90° angle constraints
2025-08-12 16:48:36 -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 6947b3b233 Even more open-coded dialog state-saving cleanup. 2025-08-11 17:19:12 +01:00
Jeff Young 57f3f22aa4 nullptr safety 2025-08-03 12:51:34 +01: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
jean-pierre charras e6c36703d0 Gerbview: code cleaning: update a .fbp dialog to use our usual .fbp settings
It does not really change the actual code.
2025-07-17 11:00:14 +02: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
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 21b294e204 Don't specify number of rows, wxWidgets will figure it out (KICAD-7HS)
(and likes to assert if you don't let it.)
2025-07-02 23:10:10 -06:00
Jeff Young 238719184e Prevent assert (and access violation) in wxWidgets.
(It directly dereferences the ArrayString with the
FilterIndex, without bounds checking it.)
2025-06-30 11:59:08 -06:00
Jeff Young ca1db93013 Iterator safety. 2025-06-16 11:46:18 +01:00
Jeff Young 3bc4cbc596 Performance tweaks. 2025-06-14 20:25:59 +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 5ed332771c Don't overwrite return value. 2025-06-14 20:25:59 +01:00
Jeff Young e4294aab85 Don't export negative layers to copper.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20949
2025-06-10 09:43:39 +01:00
Jeff Young e045def6f7 Correct underline spacing in dialogs; flatten origins & axes. 2025-06-09 12:53:11 +01:00
Jeff Young af1a246e12 Nullptr safety. 2025-06-06 18:28:39 +01:00
Jeff Young d6857ddc56 Naming conventions. 2025-06-06 18:28:39 +01:00