48785 Commits

Author SHA1 Message Date
Jeff Young
e230d5164d Honour renderSettings' default font.
This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
2025-07-17 09:35:21 +01:00
Jeff Young
0495828a55 Honour front/back layer types for user layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21284
2025-07-17 09:35:21 +01:00
Seth Hillbrand
9d770fe243 Add a bit of documentation to help future us 2025-07-16 16:39:10 -07:00
Seth Hillbrand
9f903a2661 Fix sheet number access
getPageNumber is actually asking for the parent path rather than the
sheet path itself.  Without this, we don't match the cached page number
and instead match against the virtual page number that is position
dependent

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21296

(cherry picked from commit 8edc7b8b40a2f60b8e9959eec6901605da2aff27)
2025-07-16 16:35:36 -07:00
Wayne Stambaugh
fdb8e0d079 Do not refresh PCB canvas when clearing every selected item.
It only needs to be done once after all of the items are updated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21332

(cherry picked from commit 63ec5af8a109b937ce3749562a58e641e6078280)
2025-07-16 18:29:32 -04:00
Seth Hillbrand
f6b599e155 Remove temporary file saving step
We implemented the intermediate temporary file in order to avoid issues
during save.  Unfortunately, this is heavily system-dependent and seems
to cause problems with unusual setups.  Now that we cache writing using
the prettifier, the errors during output will not affect the existing
file

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21330
2025-07-16 09:20:33 -07:00
Seth Hillbrand
5235b8e3ca One. More. Time. 2025-07-15 17:23:03 -07:00
Seth Hillbrand
6120b430d4 Correct exact language in help message 2025-07-15 15:26:57 -07:00
Seth Hillbrand
1066595a2c Add wallclock timeout to PNS walkaround
WALKAROUND::singlestep is used by both shove and walkaround modes and
can bog down when applied to clusters with many objects.  In these
cases, we are unlikely to find a viable solution and it is beter to
allow the user to find a different ending position

(cherry picked from commit d9cfb942812a57238d5ed6bbaa2c1d22a8676071)
2025-07-15 15:24:36 -07:00
Seth Hillbrand
5f48e2cbf3 Add some additional context for the sync pin error
When editing using synchronized pins mode, you place a pin on all units
but if you already have a pin that only exists on one unit, you might
get a confusing error.  This helps nudge people with to to resolve it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18466
2025-07-15 14:31:11 -07:00
Seth Hillbrand
ab5aa661e9 Fix a few more stagglers for floating point
Update banned functions to better catch these

- page size
- erc/drc reports
- x/y position files
- color alpha
- footprint reports
- specctra
2025-07-15 13:27:45 -07:00
Seth Hillbrand
9cb3a37b6f Prevent command line applications handling dark mode
Double-check before getting background color from invalid m_parent also

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21317
2025-07-15 08:56: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
Mark Roszko
486522e0b4 Fix MSVC build error, LSET iterator is incomplete for use with alg::contains 2025-07-15 07:41:37 -04:00
Seth Hillbrand
e04c5783cf Break out of the zone tool on complete
After placing a zone, we want to be able to immediately edit the zone
points.  But in the zone tool, we have the intermediate context menu
that doesn't help, so breaking back to the selection tool simplifies
that workflow

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21319
2025-07-14 18:09:26 -07:00
Jeff Young
dc4f639c61 Make sure selected item is still valid before activating (KICAD-18S). 2025-07-14 23:46:03 +01:00
Jeff Young
a3bf095387 Clear selection before sending table msg (KICAD-KWE). 2025-07-14 23:46:03 +01:00
Jeff Young
338c414933 Let wxWidgets clean up its own child windows.
Potentially KICAD-P6J.
2025-07-14 23:46:02 +01:00
Jeff Young
de1376e369 Cleanup. 2025-07-14 23:46:02 +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
Seth Hillbrand
55da0e46af Remove locale-specific floating point from io
Use only C-locale functions wxString::ToCDouble and fmt::format{}
functions so that we do not need to set the locale for file io
operations

This also introduces a cmake check that looks for certain banned
functions (strtod, strtof and atof) that convert strings into doubles
by the user locale or formatting specifiers like %f/%g that convert
doubles into strings by the users locale.  It will prevent compilation
in this case.

For the limited cases where we want to show the user a string in their
locale, we have an override string "format:allow" that can be added to
lines in order to allow them with %f/%g format specifiers
2025-07-14 14:26:00 -07:00
Seth Hillbrand
60822714de Prevent mutex deadlock
Load calls migrate so they don't both need locks
2025-07-14 14:22:46 -07:00
Jeff Young
28da0d3e1e Attempt to fix non-Mac builds. 2025-07-14 20:47:51 +01:00
Jeff Young
28cf485d00 Formatting. 2025-07-14 20:46:43 +01:00
Jeff Young
0c220d1a8c Move CURL shutting-down flag to std::atomic.
Also removes lock from KICAD_CURL::Init(), which
leaves us open to multiple parallel Init()'s, but
it's not clear that happens.
2025-07-14 19:16:31 +01:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
79d17fcb6e Cleanup export zone settings for initializing zones (KICAD-EYF). 2025-07-14 14:12:00 +01:00
Jeff Young
caf6e23064 Fix m_importProperties not getting nulled (KICAD-6BJ). 2025-07-14 13:17:53 +01:00
Jeff Young
5074a2861f Repair zone-to-zone copper clearance test.
Don't copy zone fill when not necessary.
Make sure zone polys (not copies) have bbox caches.
2025-07-14 13:17:53 +01:00
Jeff Young
f7e85a7b20 Improved thread safety. 2025-07-14 13:17:53 +01:00
Jeff Young
1b21b880e6 Thread safety. 2025-07-14 13:17:53 +01:00
Jeff Young
80c447f869 Thread safety. 2025-07-14 13:17:53 +01:00
Jeff Young
a1c26e4516 Thread safety. 2025-07-14 13:17:53 +01:00
Jeff Young
f0909e125e Thread safety. 2025-07-14 13:17:53 +01:00
Jeff Young
da57c4aa74 Formatting. 2025-07-14 13:17:53 +01:00
Jeff Young
4bc0651a3e Better debugging. 2025-07-14 13:17:53 +01:00
Jeff Young
b53b1cfd01 Debugging. 2025-07-14 13:17:53 +01:00
Jeff Young
a7e2878e6b Kicad SEXPR should no longer need LOCALE_IO. 2025-07-14 13:17:53 +01:00
Jeff Young
5d4eb2cce6 Wait for chooser to finish initializing before enabling char hook (KICAD-BJ0). 2025-07-14 13:17:53 +01:00
Jeff Young
4137b9d31c Don't overflow int rebuilding selection rect (KICAD-E4J). 2025-07-14 13:17:53 +01:00
Wayne Stambaugh
718b7e744a Do not allow selection of excluded DRC markers when they are not visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21265
2025-07-13 18:13:35 -04:00
John Beard
9de414d1b3 Pcbnew: polygon boolean subtraction: area ordering is more robust
This will also handle the case when more than two items are subtracted,
e.g. many small items witrhin one larger item.  Again, thanks to
Kliment for a smart idea!
2025-07-14 03:58:28 +08: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
d3046e6aee Don't steal unrelated timer events (potentially KICAD-XJN). 2025-07-13 16:30:03 +01:00
Jeff Young
1b24c0a72b Fix copy/pasta. 2025-07-13 15:25:10 +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
8bb9c47f9b Don't presume an edit frame (KICAD-PWS).
Also KICAD-PVR, KICAD-TWN and KICAD-JNQ
2025-07-13 15:25:10 +01:00
Jeff Young
b4524a47e8 Don't presume an edit frame (KICAD-PWS).
Also KICAD-PVR, KICAD-TWN and KICAD-JNQ
2025-07-13 15:25:10 +01:00
Jeff Young
4765d1b90d Don't enumerate pads when in pad edit mode (potentially KICAD-9P8). 2025-07-13 15:25:10 +01:00
Jeff Young
6b32815887 Be more robust around filesystems that don't support timestamps (KICAD-R7V). 2025-07-13 15:25:10 +01:00