Compare commits

..

872 Commits

Author SHA1 Message Date
Wayne Stambaugh 19b2df4693 Tag stable version 9.0.4. 2025-08-17 15:32:36 -04:00
Alex Shvartzkop a883bd2f82 Update translations 2025-08-17 01:15:57 +03:00
dsa-t c90d61a870 Translated using Weblate (Spanish)
Currently translated at 86.1% (8666 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/es/
2025-08-17 00:13:38 +02:00
Gaston Schelotto d419d09dc1 Translated using Weblate (Spanish)
Currently translated at 86.0% (8664 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/es/
2025-08-17 00:12:37 +02:00
Максим Горпиніч d717bcbdc9 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10065 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-08-17 00:11:35 +02:00
Sárkány Lőrinc 58fd4c71b9 Translated using Weblate (Hungarian)
Currently translated at 34.1% (3441 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-08-17 00:11:35 +02:00
Максим Горпиніч f494da6cc5 Translated using Weblate (Ukrainian)
Currently translated at 95.1% (9577 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-08-17 00:11:35 +02:00
Sárkány Lőrinc 915d0bda9e Translated using Weblate (Hungarian)
Currently translated at 34.1% (3436 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-08-17 00:11:35 +02:00
Максим Горпиніч dfb17e7d3a Translated using Weblate (Ukrainian)
Currently translated at 92.4% (9306 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-08-17 00:11:35 +02:00
Максим Горпиніч 5470a916a4 Translated using Weblate (Ukrainian)
Currently translated at 91.7% (9234 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-08-17 00:11:35 +02:00
Sárkány Lőrinc 83b52c2dab Translated using Weblate (Hungarian)
Currently translated at 34.0% (3425 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-08-17 00:11:35 +02:00
Frank Sonnenberg 7396aefc3b Translated using Weblate (German)
Currently translated at 99.9% (10062 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-08-17 00:11:34 +02:00
2tama3 b31e878118 Translated using Weblate (Japanese)
Currently translated at 100.0% (10065 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-08-17 00:11:34 +02:00
Sárkány Lőrinc 016a884266 Translated using Weblate (Hungarian)
Currently translated at 33.9% (3420 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-08-17 00:11:34 +02:00
Gaston Schelotto 519c28d93e Translated using Weblate (Spanish)
Currently translated at 86.1% (8666 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/es/
2025-08-17 00:11:34 +02:00
CloverGit 8163d10285 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10056 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-08-17 00:11:34 +02:00
YÜKSEL AÇIKGÖZ 16b326967a Translated using Weblate (Turkish)
Currently translated at 99.9% (10064 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-08-17 00:11:34 +02:00
Jan Straka d1de8754dc Translated using Weblate (Czech)
Currently translated at 78.2% (7875 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/cs/
2025-08-17 00:11:34 +02:00
ZbeeGin 02bb2e84f7 Translated using Weblate (Polish)
Currently translated at 99.3% (10000 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-08-17 00:11:34 +02:00
ssantos 22131142ab Translated using Weblate (Portuguese)
Currently translated at 98.6% (9928 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-08-17 00:11:34 +02:00
Francisco Jose Rey eaa9669e4b Translated using Weblate (Spanish)
Currently translated at 85.7% (8627 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/es/
2025-08-17 00:11:34 +02:00
Stefan Bjornelund the Gnome af05b8ef41 Translated using Weblate (Swedish)
Currently translated at 99.9% (10058 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-08-17 00:11:34 +02:00
Henrik Kauhanen 95cd898f7f Translated using Weblate (Swedish)
Currently translated at 99.9% (10058 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-08-17 00:11:33 +02:00
dsa-t ed42d8e3b8 Translated using Weblate (Russian)
Currently translated at 100.0% (10065 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-08-17 00:11:33 +02:00
co8 j b373041454 Translated using Weblate (Japanese)
Currently translated at 100.0% (10065 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-08-17 00:11:33 +02:00
Mark Roszko 09628aefbb Reuse the visibility bitmap bundles to reduce gdi object exhaustion
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21386
2025-08-15 13:02:36 +00:00
Seth Hillbrand 7a1866c6d5 Fix copy pasta causing crash
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21486

(cherry picked from commit a45cb0015a)
2025-08-14 16:28:51 -07:00
Seth Hillbrand c4400e6857 Keep the drill results visible
When clicking "Generate", we want to see if the drill action was
successful so we must avoid closing the window prematurely

(cherry picked from commit 38ee4359eb)
2025-08-14 15:49:26 -07:00
Alex Shvartzkop 9de49e3ac5 Altium PCB import: fix 3D models rotation when 3D body is on bottom side.
See https://gitlab.com/kicad/code/kicad/-/issues/18450
2025-08-15 01:14:14 +03:00
Alex Shvartzkop 1fc06dd44a Fix zones having no net when opening Altium or Legacy PCBs.
At least these importers set the zone net code before zone layers.

d3b80ae2aa caused IsOnCopperLayer()
to return false in BOARD_CONNECTED_ITEM::SetNetCode,
so the net code was getting set to 0.
2025-08-14 21:10:36 +03:00
Alex Shvartzkop 6d24a4f946 Remove unused variable. 2025-08-14 17:46:07 +03:00
Alex Shvartzkop 87949aba38 Remove unused method. 2025-08-14 17:46:04 +03:00
John Beard 9292bf6514 Pcbnew: array tool: fix radio button not intialising
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20723
(cherry picked from commit ebc86d1fa4)
2025-08-12 17:13:30 +08:00
John Beard 612601bb65 Eeschema: propagate alt mode icons to render settings on prefs change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21462
(cherry picked from commit ea8d0519bd)
2025-08-11 21:13:38 +08:00
Mike Williams f371dfb478 schematic: avoid crash on missing tool
(cherry picked from commit adde48010e)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21454
2025-08-09 17:39:54 +03:00
Wayne Stambaugh 440e8c9669 Tag stable version 9.0.4 release candidate 1. 2025-08-08 14:22:07 -04:00
Seth Hillbrand 111c4fec5b Do not create teeny segments in outline
bezier misalignment in the outline can cause 1nm segments which will
break STEP export.  Use our chaining epsilon setting to get the minimum
distance that we require two points to be separated to consider them
distinct
2025-08-08 09:20:44 -07:00
John Beard acb005f044 Netclass: allow multiple assignments with the same pattern
This isn't really a problem, and overwriting the entry allows
for silent data loss by making a new assignment with the
same pattern as an existing one.

The resolve netclasses are de-duplicated later, so it's even
OK if the whole assignment is duplicated (in theory), but
continue to clean these up.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21316
(cherry picked from commit db97d77544)
2025-08-08 22:46:35 +08:00
JamesJCode 9af8594db9 Ignore empty net class fields in net class ERC
(cherry picked from commit 88c09517f2)
2025-08-08 14:37:34 +01:00
John Beard dcb8f7f9c7 Pcbnew: fix outline drawing of PTH pads
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21448
(cherry picked from commit 6bdfe2bce6)
2025-08-07 23:07:28 +08:00
Mark Roszko 143819d735 Use the full bitmap bundles in ACTION_MENU 2025-08-06 20:42:37 -04:00
John Beard 57d10fde70 Eeschema: fix alt mode resetting on symbol update
GetName is the alt name if it's set, so use GetBaseName.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21439
(cherry picked from commit a8d69c856f)
2025-08-07 01:19:23 +08:00
John Beard 41a3516f18 Eeschema: fix alt pin icon/OP current preference resetting
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21440
(cherry picked from commit 8023227829)
2025-08-07 01:02:25 +08:00
Jeff Young ac270d16eb Don't set m_IsPreviewer to force 3D models.
It has unintended side-effects (such as showing
user drawings and user comments layers).

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

(cherry picked from commit b2ecaf1ddc)
2025-08-06 11:23:52 +01:00
dsa-t 39d2499cd7 Fix erroneous hex parsing when opening legacy PCB files on MSVC.
e.g. "FFFF8007" does not fit into signed "long" type (4 bytes on MSVC),
so strtoul returns 0x7FFFFFFF and sets errno to EINVAL.


(cherry picked from commit 39978ab2e2)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-05 23:14:41 +03:00
Jeff Young 4f59aaf2be Fix broken tentvias read logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20840
2025-08-05 16:20:41 +01:00
Jeff Young 462c7673eb Frame needs an extra kick to toggle grid visibility.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21409

(cherry picked from commit dc7312efd6)
2025-08-05 16:20:41 +01:00
Alex Shvartzkop a46f75eed2 Update translations 2025-08-05 15:14:47 +03:00
CloverGit 28d4ba54fb Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10054 of 10062 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-08-05 14:13:44 +02:00
dsa-t e0fe0411f9 Translated using Weblate (Russian)
Currently translated at 100.0% (10062 of 10062 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-08-05 14:13:44 +02:00
2tama3 6fad082d45 Translated using Weblate (Japanese)
Currently translated at 100.0% (10062 of 10062 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-08-05 14:13:44 +02:00
Alex Shvartzkop 44ef026f1c Update generated custom DRC rules help files, required for Weblate. 2025-08-05 15:05:58 +03:00
Alex Shvartzkop e43bc82053 Revert "Ignore autogenerated files"
This reverts commit 83b8bdf137.
2025-08-05 14:37:51 +03:00
Jon Evans 997cee8120 pcbnew/api: Expose pad-to-die length
Closes #21346.


(cherry picked from commit 29c733c651)

Co-authored-by: Ben Gamari <ben@smart-cactus.org>
2025-08-04 21:01:08 -04:00
John Beard 026280780c Pcbnew: when moving, select move origin by mouse, not cursor
Selecting the origin fby the cursor position makes it impossible
to select a item further from a grid point than another. This is
especially noticeable when selecting pins while using large grids

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10471
(cherry picked from commit 8c4c3b7e5e)
2025-08-05 04:35:00 +08:00
John Beard 1bb42bcb59 Pcbnew: improve snapping: avoid cases where a valid snap is excluded
Trimming items that don't have an "involved" real item needs to be
done at the time that the nearest point is found. Otherwise, if
there are multiple nearest points at the same location, and an
'uninvolved' one is chosen, it will later be discarded, and the
grid snap will be the fallback.

The effect of this is that grid snaps can appear to be very
agressive and also inconsistent, as it sometimes uses the item
snap (when it happens to choose an "involved" one) and sometimes not.

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

(cherry picked from commit 3606d25ab6)
2025-08-05 04:34:59 +08:00
Seth Hillbrand 7b602142b1 Remove the forced ancillary grid
If you are moving an object, we already have the axis snap, forcing the
grid to center at the start of the move prevents us from easily aligning
elements by moving them.

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

(cherry picked from commit 29dc45d584)
2025-08-04 12:01:24 -07:00
Seth Hillbrand 2e5be57499 Pass hotkeys from search pane to frame
If the search pane doesn't handle the key, push it through the frame
hotkey handling system

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

(cherry picked from commit 322c08d5f0)
2025-08-04 11:58:44 -07:00
Seth Hillbrand dc0b408eeb Optimize zone-zone clearance checks
Improve the CREEPAGE_GRAPH:::GeneratePaths to skip unused checks.
Handle zone-zone paralellism better

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

(cherry picked from commit faeaee824a)
2025-08-04 11:47:17 -07:00
Seth Hillbrand 4360db3a09 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

(cherry picked from commit e04c5783cf)
2025-08-04 11:45:16 -07:00
Seth Hillbrand a4e95c500f 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

(cherry picked from commit 9cb3a37b6f)
2025-08-04 11:44:23 -07:00
Salvador E. Tropea 541a727e15 Always use PCB_PLOTTER::PlotJobToPlotOpts for plotter exports
Removes PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob
2025-08-04 07:23:50 -04:00
John Beard de31b133e1 Pcbnew: fix mistaken angle int cast in arc properties
(cherry picked from commit 2b69e118e0)
2025-08-04 17:42:19 +08:00
Jeff Young d6e5d7b6be More discriminatory test for 2-1/2 digits after decimal. 2025-08-03 21:35:13 +01:00
jack2bs b7f823227e bitmap2component: Adding file drag and drop
(cherry picked from commit 8c017c7503)
2025-08-03 10:02:39 -04:00
Jeff Young c1f3b5aab9 nullptr safety
(cherry picked from commit 57f3f22aa4)
2025-08-03 13:32:54 +01:00
Jeff Young e27424d1b4 Attempt to fix non-Clang builds.
(cherry picked from commit 25ad1f051e)
2025-08-03 13:32:31 +01:00
Jeff Young 09cbdd8db7 Support dash-dot-dot line style in DXF.
Fixes KICAD-TY8.

(cherry picked from commit 91b7bc0843)
2025-08-03 13:31:14 +01:00
Jeff Young c0c8910207 Move search handlers to std::shared_ptr.
(cherry picked from commit 5accdc2d94)
2025-08-03 13:31:09 +01:00
Jeff Young 23f1e287aa See if copying netclasses is responsible for KICAD-V6Z (and others).
(cherry picked from commit a75fd2bb23)
2025-08-03 13:30:22 +01:00
Jeff Young 68f4a6117e Copy c'tor / operator= safety.
Also fixes a memory leak of search pane handlers.

(cherry picked from commit 8c85cd43f3)
2025-08-03 13:09:58 +01:00
Jeff Young 3bdeb84b51 Don't allow default copy c'tor to copy arrays of pointers.
Fixes KICAD-SJ2.

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

(cherry picked from commit d91cce930f)
2025-08-03 12:54:24 +01:00
Jeff Young b907fe412f Don't attempt to fetch last char of empty string.
Fixes KICAD-5ED.
Fixes KICAD-RC1.
Fixes KICAD-W0B.

(cherry picked from commit ed40391bde)
2025-08-01 17:40:04 +01:00
Jeff Young 25d89307c9 Nullptr safety.
Fixes KICAD-P7Q.

(cherry picked from commit ac3eac9ed0)
2025-08-01 17:40:04 +01:00
Jeff Young d917ff6893 Don't assume a tree root.
Fixes KICAD-Y72.

(cherry picked from commit 6c6c02a329)
2025-08-01 17:40:04 +01:00
Jeff Young 0da6ca2300 Don't clip table borders.
(cherry picked from commit 6ac5ca7fc4)
2025-08-01 17:40:04 +01:00
Jeff Young f27ed9857c Bump short-form-mm from 2 digits after decimal to 2-1/2.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21357

(cherry picked from commit b1e686be97)
2025-08-01 17:40:04 +01:00
Jeff Young d88e5972e7 Similar local labels on different sheets are fine
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21334

(cherry picked from commit 3eb66e1b3d)
2025-08-01 17:40:04 +01:00
Jeff Young 6867a77da0 Prevent stale selections.
(cherry picked from commit fa7d67d80a)
2025-08-01 17:40:04 +01:00
Jeff Young 6e4ca91229 Formatting.
(cherry picked from commit 7a4107b985)
2025-08-01 17:40:03 +01:00
John Beard 6f11df5ad6 Pcbnew: prevent a timer callback happening during ACTIVATION_HELPER destruction
Speculative fix, as I couldn't reproduce. But this seems like it could
cause the reported issue, though I think ~ACTIVATION_HELPER and the
callback should both be on the same event loop, so it's not clear to me
that it is exactly the issue.

And add a wxCHECK to at least bail safely before handing a nullptr off to the
later functions.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20693
(cherry picked from commit 8a4496f458)
2025-08-01 21:25:43 +08:00
Marek Roszko e610bc7ec5 Allow QA to create new SCHEMATIC instances rather than reusing a single container
Why make cleanup complicated lol
2025-07-31 23:48:32 -04:00
Marek Roszko 480c2f0277 Use m_project member instead of Prj() inside SCHEMATIC 2025-07-31 23:47:04 -04:00
Marek Roszko e49d44ea25 Remove the callback on RecomputeIntersheetRefs 2025-07-31 23:44:55 -04:00
Marek Roszko e29df06568 Split part of RecalculateConnections to SCHEMATIC, fix cli loader to call RecalculateConnections which fixes rules areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20528
2025-07-31 23:43:18 -04:00
Marek Roszko e95ae05dcf Move CleanUp to SCHEMATIC 2025-07-31 23:34:22 -04:00
Marek Roszko 651fb1118f Move BreakSegment(s/OnJunction) out of SCH_EDIT_FRAME 2025-07-31 23:11:47 -04:00
Alex Shvartzkop b5c2ed30be Update translations 2025-07-31 19:38:28 +03:00
CloverGit 037a58cb76 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10055 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-31 18:36:20 +02:00
2tama3 c66cb1a2ee Translated using Weblate (Japanese)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-31 18:36:20 +02:00
Jan Straka 2303e72e2c Translated using Weblate (Czech)
Currently translated at 78.2% (7871 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/cs/
2025-07-31 18:36:20 +02:00
2tama3 35a05ecec5 Translated using Weblate (Japanese)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-31 18:36:20 +02:00
Mustafa Selçuk ÇAVDAR fd20a9acff Translated using Weblate (Turkish)
Currently translated at 99.5% (10015 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-31 18:36:19 +02:00
Stefan De Raedemaeker 1a1917a0a9 Translated using Weblate (Dutch)
Currently translated at 89.8% (9044 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/nl/
2025-07-31 18:36:19 +02:00
co8 j 8949dd8f11 Translated using Weblate (Japanese)
Currently translated at 99.9% (10063 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-31 18:36:19 +02:00
Stefan De Raedemaeker dec0ada04f Translated using Weblate (Dutch)
Currently translated at 88.2% (8885 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/nl/
2025-07-31 18:36:19 +02:00
Sárkány Lőrinc c6fbf80684 Translated using Weblate (Hungarian)
Currently translated at 33.8% (3406 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-31 18:36:19 +02:00
ZbeeGin ffe8521a8a Translated using Weblate (Polish)
Currently translated at 99.3% (10000 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-07-31 18:36:19 +02:00
Sárkány Lőrinc efdebaa529 Translated using Weblate (Hungarian)
Currently translated at 32.9% (3316 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-31 18:36:18 +02:00
Pferd O 639f9fce1f Translated using Weblate (German)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-31 18:36:18 +02:00
Alex Shvartzkop 2a36da6723 Fix DPI value in Cairo printing on MSW.
Linux will need a different fix.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20477 on MSW
2025-07-29 17:07:35 +03:00
Seth Hillbrand 38f4f04a18 Prevent radius from overflowing 2025-07-28 15:57:52 -07:00
Jeff Young 7679413f2f Honour board's PAGE_INFO when plotting drill maps.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21393

(cherry picked from commit d7b5456dfb)
2025-07-28 20:35:05 +01:00
Jeff Young 149cac25f4 Don't remove nonexistent entries from wxArrayStrings (KICAD-PG7)
(cherry picked from commit 51e244d7d4)
2025-07-28 20:34:52 +01:00
Jeff Young be7cf117a5 Shutdown safety (KICAD-N5Y).
(cherry picked from commit 59caea4344)
2025-07-28 20:34:39 +01:00
Jeff Young 083dc651b4 Improve debugging (KICAD-XS0).
(cherry picked from commit 6cfe5ecc94)
2025-07-28 20:34:31 +01:00
Jeff Young e7d47265f8 Cleanup (KICAD-XZP).
(cherry picked from commit 65f4524164)
2025-07-28 20:33:43 +01:00
Jeff Young 2a246801eb Handle undo when changing new item before placing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21391

(cherry picked from commit a191d4e6e5)
2025-07-28 20:33:32 +01:00
Jeff Young 9d2b6ce033 Fix padstack/boundingbox issue.
Earlier fix to stop clearing the boundingRadius
for each unique layer also cleared it for
ERROR_INSIDE (when we aren't rebuilding it).

Re-order whole routine to make this more clear.

(cherry picked from commit 046c36d060)
2025-07-28 20:14:20 +01:00
Jeff Young e9a331f2df Fix deficient c'tors and operator=.
(cherry picked from commit 60ec152d90)
2025-07-28 20:13:23 +01:00
Jeff Young e582a8ced9 Honour pad holes when hit-testing.
They may be bigger than the pad.

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

(cherry picked from commit c58b1146de)
2025-07-28 20:13:13 +01:00
Seth Hillbrand 64f8258f1f Don't prompt for rule areas and no-net shapes
Highlighting and placing vias will pop up a potential net list. This
should not include things without nets

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

(cherry picked from commit dd41e2b00b)
2025-07-25 16:41:38 -07:00
Seth Hillbrand 21ed7a0641 Avoid unmapped layers
ViewGetLayers returns the item layer even if it is invalid.  We filter
this out at the base and skip items that cannot be displayed in the
view.

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

(cherry picked from commit d538f8d848)
2025-07-24 13:41:41 -07:00
Seth Hillbrand e7eedc7567 Junctions are wires in schematic editor
Treat junctions like wires for the purposes of the selection filter.
Allows selecting them together with wires and avoids grouping with
"Other Items" which is confusing

(cherry picked from commit 16f82d1de5)
2025-07-24 10:53:36 -07:00
Seth Hillbrand 87f375b54f Align import brd file icon with grid
(cherry picked from commit 740f55fd30)
2025-07-23 17:38:13 -07:00
Seth Hillbrand 562d0ff296 Force trimming whitespace in env vars
Nothing good can come of leading or trailing whitespace in environment
variables.  They don't resolve correctly and you can't see why

(cherry picked from commit 8d65217fda)
2025-07-23 17:38:09 -07:00
Seth Hillbrand 609296c5e6 Don't protect arbitrary paths
We only need to protect our predefined variables, not ones that the user
might create that uses the same pattern

(cherry picked from commit d195e93ebe)
2025-07-23 17:38:08 -07:00
Seth Hillbrand 2b4544cfea Optimize zone-zone checks in filler
Teardrops are calculated as zones, so when we create a board with
thousands of teardrops, we don't want to run O(n^2) checks on the
clearance between multiple teardrops.  Instead, we can check only the
clearance where the two zones have the potential to interact

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

(cherry picked from commit b165240118)
2025-07-22 09:53:46 -07:00
Marek Roszko e31b0950a8 Add missing demo installs
(cherry picked from commit 3d15317282)
2025-07-22 18:53:06 +08:00
Jeff Young 435f0176dc Don't promote pads to footprints for align/distribute.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21337
2025-07-21 21:30:12 +01:00
Jeff Young 7c97ed6f16 Fix merge error.
(cherry picked from commit d8cbafe858)
2025-07-21 21:05:44 +01:00
Jeff Young 17af4aa5ce Make auto-created labels work with new multi-create architecture.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21306

(cherry picked from commit 5fb40f152c)
2025-07-21 21:03:26 +01:00
Jeff Young 41effa1556 See if we can't fix the ever-growing window bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20120

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

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

(cherry picked from commit 9d074c1679)
2025-07-21 21:02:01 +01:00
Jeff Young e5f97dac98 Code clarity.
(cherry picked from commit da8abffea4)
2025-07-21 21:01:16 +01:00
Jeff Young f149c48fc8 Formatting.
(cherry picked from commit f1686cc568)
2025-07-21 21:01:13 +01:00
Jeff Young db02ccfc40 Naming conventions.
(cherry picked from commit c49156fb35)
2025-07-21 21:01:09 +01:00
Seth Hillbrand 8bbde3bfc6 Speed up massively slow outline convert
Avoid unneeded comparisons for segments that will never touch.  Helps in
pathological cases of O(10000+) segments in an outline

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

(cherry picked from commit d53cbe638f)
2025-07-19 17:34:03 -07:00
Seth Hillbrand 9ba20b1a69 Remove context menu from position interactively
It was marked "TODO: This does not work" and indeed it crashed when
trying to use it on some items.  When it did not crash, it did not show
a menu, so the TODO was in fact accurate

(cherry picked from commit cb1bf5613e)
2025-07-18 16:56:44 -07:00
jean-pierre charras 5e1e1df3c7 French translation update 2025-07-18 18:19:22 +02:00
Seth Hillbrand 90507e11a3 Update translations 2025-07-18 08:10:34 -07:00
CloverGit d2eaa8b096 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-18 16:51:00 +02:00
Stefan Bjornelund the Gnome bab7a98842 Translated using Weblate (Swedish)
Currently translated at 99.9% (10056 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-07-18 16:51:00 +02:00
2tama3 1ec3bf4da9 Translated using Weblate (Japanese)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-18 16:51:00 +02:00
Luka Borkovic ca40cb3ef8 Translated using Weblate (Serbian)
Currently translated at 18.9% (1909 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:51:00 +02:00
Luka Borkovic 87fe50f323 Translated using Weblate (Serbian)
Currently translated at 18.9% (1909 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:51:00 +02:00
Luka Borkovic afed6765b0 Translated using Weblate (Serbian)
Currently translated at 18.9% (1909 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:50:59 +02:00
Sárkány Lőrinc 7e18c2689f Translated using Weblate (Hungarian)
Currently translated at 32.9% (3318 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:59 +02:00
Sárkány Lőrinc 70d399169a Translated using Weblate (Hungarian)
Currently translated at 32.9% (3318 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:59 +02:00
CloverGit 2a65e2fcfd Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-18 16:50:59 +02:00
co8 j 9ed0613fc8 Translated using Weblate (Japanese)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-18 16:50:59 +02:00
CloverGit 8a088e96d0 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10062 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-18 16:50:59 +02:00
Pferd O 5ddddc0628 Translated using Weblate (German)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:59 +02:00
Pferd O a043d6d0bb Translated using Weblate (German)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:59 +02:00
Luka Borkovic ec655d19ae Translated using Weblate (Serbian)
Currently translated at 18.8% (1899 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:50:59 +02:00
Luka Borkovic 1513611839 Translated using Weblate (Serbian)
Currently translated at 18.8% (1899 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:50:59 +02:00
ZbeeGin 890e99c1f1 Translated using Weblate (Polish)
Currently translated at 99.7% (10036 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-07-18 16:50:59 +02:00
Sárkány Lőrinc 38362dd872 Translated using Weblate (Hungarian)
Currently translated at 32.8% (3310 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:59 +02:00
Sárkány Lőrinc 9fadc3536c Translated using Weblate (Hungarian)
Currently translated at 32.8% (3310 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:59 +02:00
Sárkány Lőrinc a2bcf846b4 Translated using Weblate (Hungarian)
Currently translated at 32.8% (3310 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:58 +02:00
Sárkány Lőrinc db50dc29c4 Translated using Weblate (Hungarian)
Currently translated at 32.8% (3310 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:58 +02:00
Sárkány Lőrinc d5962f45e7 Translated using Weblate (Hungarian)
Currently translated at 32.8% (3310 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:58 +02:00
Pferd O 2044e6ee5f Translated using Weblate (German)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:58 +02:00
Pferd O eb7eef2007 Translated using Weblate (German)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:58 +02:00
CloverGit f22b398721 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10062 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-18 16:50:58 +02:00
YÜKSEL AÇIKGÖZ 0c824a3c38 Translated using Weblate (Turkish)
Currently translated at 99.9% (10063 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-18 16:50:58 +02:00
YÜKSEL AÇIKGÖZ 1a086065f1 Translated using Weblate (Turkish)
Currently translated at 99.9% (10063 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-18 16:50:58 +02:00
Luka Borkovic b6c303bf63 Translated using Weblate (Serbian)
Currently translated at 18.8% (1898 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-18 16:50:58 +02:00
2tama3 1a7c22a75e Translated using Weblate (Japanese)
Currently translated at 99.9% (10062 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-18 16:50:58 +02:00
Sárkány Lőrinc a9d56c2082 Translated using Weblate (Hungarian)
Currently translated at 32.4% (3261 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-18 16:50:57 +02:00
Pferd O 66a0b874ff Translated using Weblate (German)
Currently translated at 99.8% (10051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:57 +02:00
Pferd O 493aa263b9 Translated using Weblate (German)
Currently translated at 99.8% (10051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:57 +02:00
Pferd O 3fac3e83cd Translated using Weblate (German)
Currently translated at 99.8% (10051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:57 +02:00
Pferd O e3c528f2cf Translated using Weblate (German)
Currently translated at 99.8% (10051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:57 +02:00
Pferd O c0dec56076 Translated using Weblate (German)
Currently translated at 99.8% (10051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-18 16:50:57 +02:00
Seth Hillbrand bc02818134 Handle model projection in Altium import
If the model is seated on the back, KiCad just needs to rotate and
offset for the board (if it is placed)

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

(cherry picked from commit 8556bd45c2)
2025-07-17 16:48:53 -07:00
Seth Hillbrand 8521ec583c Reverse order in HPGL
Satisfies the request for TRUMPF laser

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21336
2025-07-17 11:01:53 -07:00
Seth Hillbrand c45394b0f2 Properly align imported dimensions
The height depends on which direction the dimension is being pulled.

Also try to mimic Altium's automatic arrow in/out style

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

(cherry picked from commit e8219c4300)
2025-07-17 10:34:51 -07:00
Jeff Young 8bf44292f5 Fix one more missing addParamsForWindow(). 2025-07-17 16:36:45 +01:00
Jeff Young 3949647754 Must use addParamsForWindow to init WINDOW_SETTINGs structs.
(cherry picked from commit beb83e87ea)
2025-07-17 16:31:32 +01:00
Jeff Young ac1aad35b7 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21328
2025-07-17 13:43:10 +01:00
Jeff Young a51a705ea4 Don't clear pin-assignments when changing sim model.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19533

(cherry picked from commit b4dcb05208)
2025-07-17 12:52:02 +01:00
Jeff Young f10d11d36c 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

(cherry picked from commit e230d5164d)
2025-07-17 10:05:07 +01:00
Jeff Young 593537c52e Honour front/back layer types for user layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21284

(cherry picked from commit 0495828a55)
2025-07-17 10:05:07 +01:00
Seth Hillbrand 8edc7b8b40 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
2025-07-16 16:34:47 -07:00
Wayne Stambaugh 63ec5af8a1 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
2025-07-16 16:45:13 -04:00
Seth Hillbrand 6fcbf3f0d4 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

(cherry picked from commit f6b599e155)
2025-07-16 09:22:25 -07:00
Seth Hillbrand 0a2ee53b2e One. More. Time.
(cherry picked from commit 5235b8e3ca)
2025-07-15 17:23:46 -07:00
Seth Hillbrand 9a9f7f4d1b Correct exact language in help message
(cherry picked from commit 6120b430d4)
2025-07-15 15:28:22 -07:00
Seth Hillbrand 15bc336b1d 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

(cherry picked from commit 5f48e2cbf3)
2025-07-15 15:28:22 -07:00
Seth Hillbrand d9cfb94281 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
2025-07-15 15:24:16 -07:00
John Beard 28a4164c9a 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!

(cherry picked from commit 9de414d1b3)
2025-07-16 04:30:21 +08:00
John Beard 95228d092c Pcbnew: polygon booleans - try subtraction in both orders if null result
While there is technically some kinds of defined order (last selected item is
'A' in the 'A - B (- C...)' operation, it's easy to drag select and then
get a null result.

So if this happens to a non-commutative operation, try again in the
reverse order. In the usual case (2 items), this will get what the user,
presumably, wants. If there are more than 2, it will either work, or the
user can undo and try merging the "B" operand before subtracting, or do
them one at a time (at which point the order-reverse logic will help
again).

Thanks to Kliment for an this usability suggestion!

(cherry picked from commit 8d07eb7f24)
2025-07-16 04:30:21 +08:00
John Beard 55117ba314 Pcbnew: handle circles in polygon booleans
(cherry picked from commit 401eba4e91)
2025-07-16 04:30:21 +08:00
John Beard 79a07fa52d Pcbnew: polygon boolean ops: clear arcs first to avoid assert
(cherry picked from commit f36af7e08a)
2025-07-16 02:32:42 +08:00
John Beard 50b6eb193b Pcbnew: polygon boolean subtraction - allow holes
The problem was using outlines, not the UnitSet function.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19348
(cherry picked from commit 563bb7a538)
2025-07-16 02:32:42 +08:00
Seth Hillbrand 819ce0b0df Add paste length control to PCB Editor as well
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732

(cherry picked from commit fd0b8fcc3c)
2025-07-15 10:44:25 -07:00
Seth Hillbrand 27d6c36f2d Add maximum pasted string length
Allows the user to avoid pasting unparsable boards as strings, which
freezes the system as we try to display enormous texts

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

(cherry picked from commit c5fde2aeb5)
2025-07-15 10:44:25 -07:00
Jeff Young 42ccfceebd 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

(cherry picked from commit 6541202d42)
2025-07-15 15:25:54 +01:00
Jeff Young 9d4e6bd42f Make sure selected item is still valid before activating (KICAD-18S).
(cherry picked from commit dc4f639c61)
2025-07-15 15:25:20 +01:00
Jeff Young c0d2ce00d4 Clear selection before sending table msg (KICAD-KWE).
(cherry picked from commit a3bf095387)
2025-07-15 15:25:15 +01:00
Jeff Young c9bf1d1b40 Cleanup.
(cherry picked from commit de1376e369)
2025-07-15 15:25:07 +01:00
Jeff Young e141a5df3f Attempt to fix non-Mac builds.
(cherry picked from commit 28da0d3e1e)
2025-07-14 20:49:24 +01:00
Jeff Young 09bdaf6ef0 Formatting.
(cherry picked from commit 28cf485d00)
2025-07-14 20:49:20 +01:00
Jeff Young cff49ba3b4 LIB_TABLE::migrate() is called from Load(), which already has a lock. 2025-07-14 19:44:47 +01:00
Jeff Young 8179d363db 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.

(cherry picked from commit 0c220d1a8c)
2025-07-14 19:19:58 +01:00
Jeff Young d3b80ae2aa Cleanup export zone settings for initializing zones (KICAD-EYF).
(cherry picked from commit 79d17fcb6e)
2025-07-14 19:19:49 +01:00
Jeff Young f66a5be0d6 Fix m_importProperties not getting nulled (KICAD-6BJ).
(cherry picked from commit caf6e23064)
2025-07-14 13:21:52 +01:00
Jeff Young 604b598ac8 Repair zone-to-zone copper clearance test.
Don't copy zone fill when not necessary.
Make sure zone polys (not copies) have bbox caches.

(cherry picked from commit 5074a2861f)
2025-07-14 13:21:49 +01:00
Jeff Young a1254102e4 Improved thread safety.
(cherry picked from commit f7e85a7b20)
2025-07-14 13:21:45 +01:00
Jeff Young 73bca72cdb Thread safety.
(cherry picked from commit 1b21b880e6)
2025-07-14 13:21:42 +01:00
Jeff Young dff78f8961 Thread safety.
(cherry picked from commit 80c447f869)
2025-07-14 13:21:39 +01:00
Jeff Young 2bd6e11dc0 Thread safety.
(cherry picked from commit a1c26e4516)
2025-07-14 13:21:03 +01:00
Jeff Young 29d34a6e4d Thread safety.
(cherry picked from commit f0909e125e)
2025-07-14 13:20:59 +01:00
Jeff Young c5a3e8e15f Formatting.
(cherry picked from commit da57c4aa74)
2025-07-14 13:20:55 +01:00
Jeff Young 166314907d Better debugging.
(cherry picked from commit 4bc0651a3e)
2025-07-14 13:20:52 +01:00
Jeff Young 9d392d832f Debugging.
(cherry picked from commit b53b1cfd01)
2025-07-14 13:20:48 +01:00
Jeff Young ecb2016047 Kicad SEXPR should no longer need LOCALE_IO.
(cherry picked from commit a7e2878e6b)
2025-07-14 13:20:29 +01:00
Jeff Young 120dbd12ee Wait for chooser to finish initializing before enabling char hook (KICAD-BJ0).
(cherry picked from commit 5d4eb2cce6)
2025-07-14 13:19:50 +01:00
Jeff Young 44af22cbb6 Don't assume a non-null root (KICAD-SYR). 2025-07-14 13:19:14 +01:00
Wayne Stambaugh 3bcf0a438a Do not allow selection of excluded DRC markers when they are not visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21265

(cherry picked from commit 718b7e744a)
2025-07-13 18:17:34 -04:00
Jeff Young 777b731687 Re-entrancy guard for sym/fp change timers.
(Potentially KICAD-XJN.)

(cherry picked from commit 273ca3de77)
2025-07-13 16:57:33 +01:00
Jeff Young 1e881c6a36 Don't steal unrelated timer events (potentially KICAD-XJN).
(cherry picked from commit d3046e6aee)
2025-07-13 16:56:44 +01:00
Jeff Young 7d04a86695 Fix copy/pasta.
(cherry picked from commit 1b24c0a72b)
2025-07-13 16:56:39 +01:00
Jeff Young 06933ee9f0 Thread-safety (potentially KICAD-VMX...)
... KICAD-6PV, KICAD-82, KICAD-R3A, and others.

(cherry picked from commit 68d4940087)
2025-07-13 16:56:36 +01:00
Jeff Young ae61630010 Don't presume an edit frame (KICAD-PWS).
Also KICAD-PVR, KICAD-TWN and KICAD-JNQ

(cherry picked from commit 8bb9c47f9b)
2025-07-13 16:55:53 +01:00
Jeff Young ca4b4c7db3 Don't presume an edit frame (KICAD-PWS).
Also KICAD-PVR, KICAD-TWN and KICAD-JNQ

(cherry picked from commit b4524a47e8)
2025-07-13 16:55:07 +01:00
Jeff Young ff92a7c731 Don't enumerate pads when in pad edit mode (potentially KICAD-9P8).
(cherry picked from commit 4765d1b90d)
2025-07-13 16:54:18 +01:00
Jeff Young bfd88ffa18 Be more robust around filesystems that don't support timestamps (KICAD-R7V).
(cherry picked from commit 6b32815887)
2025-07-13 16:54:14 +01:00
Jeff Young 6e28b01f4c Separate non-copper track processing for hand edited boards and SWIG.
(cherry picked from commit 4e63316963)
2025-07-13 16:54:10 +01:00
Jeff Young a0ebf4f571 Quiet wxWidgets assert (KICAD-HRE).
(cherry picked from commit f0c3f469a1)
2025-07-13 16:52:49 +01:00
Jeff Young 1523f29c83 Lock safety.
("row" should not exceed the lifetime of "lock".)

(cherry picked from commit abc23a313d)
2025-07-13 16:51:21 +01:00
Jeff Young 30e6f10026 Quiet wxWidgets assert (KICAD-XJ2). 2025-07-13 16:51:21 +01:00
Mark Roszko 16ce70befb Quote the relaunch command string
(cherry picked from commit c594e1da5c)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-07-12 23:23:55 +00:00
Jeff Young 18330c8cd1 Symbol chooser has different canvases.
(cherry picked from commit 05fcfdaf87)
2025-07-12 22:39:23 +01:00
jean-pierre charras d66bfa58e7 DIALOG_LABEL_PROPERTIES: allows entering spaces in label names.
This issue was created by switching to FILTER_COMBOBOX in this dialog.
Spaces in labels are not a good idea, but this is needed to enter group
members to a bus definition

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

(cherry picked from commit a0485a38a7)
2025-07-12 18:31:12 +02:00
Jeff Young 13eea9cd19 Fix merge error. 2025-07-12 17:16:03 +01:00
Jeff Young ac35cbec48 Don't presume a selection.
(cherry picked from commit eb877a2fb4)
2025-07-12 17:11:25 +01:00
Jeff Young 1b1dee4a2a Fix copy/pastas.
(cherry picked from commit 66921b5026)
2025-07-12 17:11:22 +01:00
Jeff Young fa3b897a2a Don't bother with save changes for a kill.
(cherry picked from commit a9ab850f93)
2025-07-12 17:11:19 +01:00
Jeff Young 13fc7cede5 Debugging.
(cherry picked from commit ad83ad512a)
2025-07-12 17:11:16 +01:00
Jeff Young 6121a4641e It's too late to flag these at render time.
(And we don't control what kind of nonsense fonts
have either.)

(cherry picked from commit c09fc59ba5)
2025-07-12 17:11:12 +01:00
Jeff Young e0b5f101ea Clear arcs when merging zones (KICAD-DZ2).
(cherry picked from commit 2708aaad8d)
2025-07-12 17:11:07 +01:00
Jeff Young 8f2983399b Remove overzealous assert (KICAD-7YQ).
(cherry picked from commit 21992c5030)
2025-07-12 17:11:04 +01:00
Jeff Young 69d37e5485 Commit messages are title caps.
(They appear in the Undo menu.)

(cherry picked from commit b498ca0376)
2025-07-12 17:10:58 +01:00
Jeff Young 457883db09 Debugging.
(cherry picked from commit be1e79ccd8)
2025-07-12 17:10:11 +01:00
Jeff Young a7364e365b Reentrancy guard for placeAnchor (KICAD-A6J).
(cherry picked from commit cd48cc4007)
2025-07-12 17:10:06 +01:00
Jeff Young ff64e888f5 Handle duplication of reference images for array tool (KICAD-R7M).
(cherry picked from commit 58b5dae1ee)
2025-07-12 17:09:19 +01:00
Jeff Young 855762f676 Attempt to prevent random DRC crashes.
(cherry picked from commit 860fb9cabb)
2025-07-12 17:09:13 +01:00
Jeff Young 6e24ad8cad Re-entrancy guard for zones and vias (potentially KICAD-AFQ).
(cherry picked from commit 6474913fe8)
2025-07-12 17:09:03 +01:00
Jeff Young 4b8ae90444 Don't try to write to non-editable combobox (KICAD-6JS).
(cherry picked from commit 68109fc0a9)
2025-07-12 17:08:59 +01:00
Jeff Young 9c3f2a20ec Don't presume a selection (potentially KICAD-8VP).
(cherry picked from commit 34367020c4)
2025-07-12 17:08:53 +01:00
Jeff Young 1771a49017 Remove double-assert.
(getPropertyFromEvent() already asserts if it can't find one.)

(cherry picked from commit fc0bcdc8a3)
2025-07-12 17:08:50 +01:00
Jeff Young 1c5b6e0d8a Nullptr safety (KICAD-S1B).
(cherry picked from commit 3ec557cf4a)
2025-07-12 17:08:46 +01:00
Jeff Young e0f9b0dbf4 Bounds checking (KICAD-GGM).
(cherry picked from commit e51908e6c8)
2025-07-12 17:08:42 +01:00
Jeff Young 14c06a3acb Less auto.
(cherry picked from commit b2ba9d3371)
2025-07-12 17:07:42 +01:00
Jeff Young fe10e6036f We're creating the symbol library, so if it's not in the cache, then it's not in the library. 2025-07-12 09:45:43 +01:00
Jeff Young b5f19e11ae Formatting. 2025-07-12 09:14:16 +01:00
Columba Livia 4a99dc1a99 fix for issue 17429 - DRC exclusion instability
- backported from master
- fix for issue-17429 - DRC unnconnected items exclusion instability
  - new serialization format for unconnected items (MainID and AuxID
    last)
- RunOnUnconnectedItems sorts RN_NET edges for stability
- ResolveDRCExclusions now matches unconnected items by not matching on
      MainID and AuxID
2025-07-11 15:58:14 -07:00
Mark Roszko 9ea4b899a2 Fix the relaunch command
(cherry picked from commit 2c9f189441)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-07-11 22:39:29 +00:00
Ian McInerney 0708c6d67c Link copper layer color swatches in 3D viewer
(cherry picked from commit 33a4d6ea6f)
2025-07-11 16:10:47 +01:00
Jeff Young 4eab3916d4 Fix MSW build. 2025-07-11 14:44:10 +01:00
Jeff Young 8e2ba60c41 Mostly debugging help for Sentry, but also gives the user a better Undo string.
(cherry picked from commit 327d0ec51f)
2025-07-11 14:43:28 +01:00
Jeff Young 083e15e6d9 Formatting.
(cherry picked from commit 0797217595)
2025-07-11 14:43:24 +01:00
Jeff Young d72743f133 ERC exclusions go in the project file, not the local settings.
Potentially KICAD-PEV.

(cherry picked from commit 8ae6d179f0)
2025-07-11 14:43:19 +01:00
Jeff Young ee36806c94 Retire WINDOW_FREEZER in favour of wxWindowUpdateLocker.
Also pulls out previous fix to a Sentry issue I can
no longer find, at least until I figure out what
went wrong.
2025-07-11 13:09:27 +01:00
Jeff Young f6906ee982 Specialize table cell properties exposure.
(Also removes solder mask properties from textboxes.)

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

(cherry picked from commit bdd8790180)
2025-07-11 13:09:27 +01:00
Jeff Young aefebbf1b0 Upgrade ShowPlayer re-entrancy guard (KICAD-XAC).
(cherry picked from commit 53c90b0469)
2025-07-11 13:09:27 +01:00
Jeff Young 7f74d9abda Upgrade ShowPlayer re-entrancy guard (KICAD-XAC).
(cherry picked from commit fa00626512)
2025-07-11 13:09:27 +01:00
Jeff Young b9e49a0123 Formatting.
(cherry picked from commit 7a91441a82)
2025-07-11 13:09:27 +01:00
jean-pierre charras cf9f11a135 Fix mingw build (from master branch) 2025-07-10 08:41:21 +02:00
Mark Roszko ce1f3b8819 Add support for SHAddToRecentDocs on windows with app model id 2025-07-09 20:11:23 -04:00
jean-pierre charras d83275c469 Pcbnew, shape modification on polygonal shapes: clear arcs if any in polys.
Arcs cannot be handled by polygon boolean transforms, and must be cleared

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21134
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21277

(cherry picked from commit 06346f5ab5)
2025-07-09 17:33:03 +02:00
Jeff Young d4cfc0464e Be consistent about getting board copper layers.
(cherry picked from commit d2a623719b)
2025-07-09 16:01:27 +01:00
Jeff Young 4f30fecd84 Multithreaded safety. (KICAD-T5A)
(cherry picked from commit f097fbdfcc)
2025-07-09 16:01:27 +01:00
Jeff Young af44eedbce Shutdown safety.
(cherry picked from commit 0f19ed5f9f)
2025-07-09 16:01:27 +01:00
Jeff Young 264cd9e4f3 No point-editor support for rotated tablecells. (KICAD-RN8)
(cherry picked from commit e0351b60b2)
2025-07-09 16:01:27 +01:00
Jeff Young 3aca4393ac Shutdown safety. (Potentially KICAD-TJK.)
(cherry picked from commit 479daa37c5)
2025-07-09 16:01:27 +01:00
Jeff Young 9ba079de2c Shutdown safety. (Potentially KICAD-S3Q.)
(cherry picked from commit c183e1e3d2)
2025-07-09 16:01:27 +01:00
Jeff Young f7e2e0a1d4 Formatting.
(cherry picked from commit f7e275ba04)
2025-07-09 16:01:27 +01:00
Jeff Young a3d0831acc Put all focused items through ID lookup when un-brightening them. (Potentially KICAD-RN1)
(cherry picked from commit 4a653c548b)
2025-07-09 16:01:27 +01:00
Jeff Young bee098283c Don't attempt to update status bar while closing (KICAD-506).
(cherry picked from commit 30adcaa390)
2025-07-09 16:01:26 +01:00
Jeff Young 5b5fa6ede6 Collect more debugging.
(cherry picked from commit f589ed906f)
2025-07-09 16:01:26 +01:00
Jeff Young 55c686b704 Formatting.
(cherry picked from commit b4f44a0833)
2025-07-09 16:01:26 +01:00
Jeff Young 4c9bc832ec MakeNetNavigatorNode() will attempt to select it (while frozen). KICAD-VV8
(cherry picked from commit 0ba617bf1a)
2025-07-09 16:01:26 +01:00
Jeff Young 52f4c46a22 Debugging.
(cherry picked from commit 0d34db67cd)
2025-07-09 16:01:26 +01:00
Jeff Young 4f5b6c6d12 Don't assert inner layer in Footprint Editor (KICAD-STX).
(cherry picked from commit 5d8def9055)
2025-07-09 16:01:26 +01:00
Jeff Young 50138ccf69 Don't double-delete panes. (Potentially KICAD-22T)
(cherry picked from commit 5390e0d7f9)
2025-07-09 16:01:26 +01:00
Jeff Young ed91410496 Don't presume a single MAIL_SYMBOL_NETLIST to footprint chooser. KICAD-XBW
(cherry picked from commit 866659df97)
2025-07-09 16:01:26 +01:00
Mark Roszko 954e75b014 Windows, msys2 build: fix cast not accepted by GCC
(cherry picked from commit d0288dbcbf)

Co-authored-by: jean-pierre charras <jp.charras@wanadoo.fr>
2025-07-09 13:45:58 +00:00
Mark Roszko 60d428dbac Add a -n arg for "new instance" to kicad.exe for use with the relaunch command 2025-07-09 06:59:54 -04:00
Mark Roszko 589bfeafe3 Fix shift+middle click on windows no longer working
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21267
2025-07-09 06:59:18 -04:00
Sebastian c494dbd978 Fix updating embedded drawing sheet by marking true to update the embed drawing files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20800

(cherry picked from commit 3cafe2e6bb)
2025-07-08 23:37:26 +01:00
Graham Keeth fe6add129f change title case to sentence case in Git preferences
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20784
(cherry picked from commit 454c95ac51)
2025-07-08 23:37:02 +01:00
aris-kimi 8b6c314296 Sim:Fix an unescaped while loop
(cherry picked from commit cf5d4df78a)
2025-07-08 23:36:21 +01:00
Ian McInerney 83d71d95ae Don't set the dimension group's action to the origin action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21274
2025-07-08 23:28:34 +01:00
jean-pierre charras 2cc2ba603e Pad editor dlg: set the default thermal spoke to 90 deg for RR pad shape
It was 45 deg, but this default value is good for round pads only, not
for rectangular pad shapes.

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

(cherry picked from commit cef15bcf30)
2025-07-08 18:17:46 +02:00
jean-pierre charras 34e4a34231 EEschema: avoid DNP and EXCLUDE from SIM markers blinking when moving an object
They were redrawn multiple times, and not always on the right graphic layer, thus
creating draw artifacts.

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

(cherry picked from commit b8d2bdb3d2)
2025-07-08 14:55:18 +02:00
jean-pierre charras ae069e82d1 Step export: handle castellated pads.
Only pads having the fab property "Castellated" are handled.
Imported from master build, commit 60f65e68c1
2025-07-08 14:55:17 +02:00
Jeff Young b21da0e582 Fix merge error. 2025-07-08 12:51:24 +01:00
Jeff Young 8f98861d5f Only promote to footprints when it's clear that's what the user meant.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21207

(cherry picked from commit 8a0e0b620c)
2025-07-08 12:45:10 +01:00
Jeff Young 7b15c5f343 Don't special-case footprint children for undo of delete.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21204

(cherry picked from commit 02365bb206)
2025-07-08 12:44:02 +01:00
Jeff Young 0186970f24 Ignore visibility and style attrs in instance data.
It appears that it's always null/0.  (At least in this
test-case.)

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

(cherry picked from commit 17158f21da)
2025-07-08 12:43:19 +01:00
Jeff Young 32de29ff4e More protection for stale wxDataView items. 2025-07-08 10:23:00 +01:00
Jeff Young 7ad1823d41 Attempt to patch SWIG for VIEW_ITEM::GetClass().
(cherry picked from commit da9544dfd1)
2025-07-08 09:44:56 +01:00
Jeff Young 1dbeec7c0f Show Actual Clearance even for same-net objects.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21261

(cherry picked from commit 4ff51913cf)
2025-07-08 08:44:23 +01:00
Jeff Young ccf24de599 Debugging.
(Separate so Sentry can tell us which one fired.)

(cherry picked from commit 9098750ba0)
2025-07-08 08:44:23 +01:00
Jeff Young cbc407260c Bounds checking. KICAD-A6F.
(cherry picked from commit 0ccd706faf)
2025-07-08 08:44:23 +01:00
Jeff Young b929b8dd87 Not all callers are expecting GUI to be put up at this level.
Potentially KICAD-RVC.

(cherry picked from commit 4e62a71448)
2025-07-08 08:44:23 +01:00
Jeff Young 5e9a755348 Respect non-free-pads mode for Move Exactly.
(Also makes sure the filters are always in the
same order, though this may be immaterial.)

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

(cherry picked from commit edbe570d42)
2025-07-08 08:44:23 +01:00
Jeff Young 512131a062 Equality for doubles. (Potentially KICAD-SV8)
(cherry picked from commit c960f69a9b)
2025-07-08 08:44:23 +01:00
Jeff Young 8177960946 Include LAYER_LOCKED_ITEM_SHADOW in PADSTACK::EffectiveLayerFor() (KICAD-V2W)
(cherry picked from commit 9e07f1e68b)
2025-07-08 08:44:23 +01:00
Jeff Young c23a3426c3 Remove noisy assert. KICAD-6XH
We may need to support showing complex numbers at some
point, but as we don't today it's sort of moot.
2025-07-08 08:44:23 +01:00
Jeff Young 55f7da60e7 Fix format specifier (KICAD-SV6).
(cherry picked from commit b08990646c)
2025-07-08 08:44:23 +01:00
Jeff Young 2492451270 Don't assume strings are non-empty (KICAD-PMX).
(cherry picked from commit 96eb11cb9e)
2025-07-08 08:44:23 +01:00
Jeff Young 03c56f05a4 Commenting.
(cherry picked from commit 9faf8b3d4c)
2025-07-08 08:44:23 +01:00
Jeff Young f8acb1f2d9 Clear seleciton before removing rows. (KICAD-BER).
(cherry picked from commit 275ff1cb4e)
2025-07-08 08:44:23 +01:00
Jeff Young d2cf153688 Load appearances presets to render job.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20660

(cherry picked from commit 61986ab7c8)
2025-07-08 08:44:23 +01:00
Jeff Young e845ca539c ADDED: appearance preset selection to Render Jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20682

(cherry picked from commit 70cbdbff89)
2025-07-08 08:44:23 +01:00
Jeff Young 497a7983cb ADDED: some individual flags for render jobs.
Also fixes bug where error code wasn't returned.

Also fixes bug where user's preferences were being
overwritten with each job.

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

(cherry picked from commit d2b3f8ba28)
2025-07-08 08:44:23 +01:00
Jeff Young 0619bb9179 Formatting.
(cherry picked from commit 0730a0bc86)
2025-07-08 08:44:23 +01:00
Jeff Young ca78205d66 Dirty connectivity when deleting via layers.
(Also dirty the document when removing blind/buried
vias.)

(This fixeds KICAD-FOY as a side-effect.)

(cherry picked from commit bf193c5ea1)
2025-07-08 08:44:23 +01:00
Jeff Young 7f4ac37b08 If library was updated outside KiCad, the symbol may have been deleted. (KICAD-QZ9)
(cherry picked from commit 7bab41d746)
2025-07-08 08:44:23 +01:00
Jeff Young 7d3bd92a46 Remove double-layer-processing.
(The caller already handles cycling through the
layers.)

(cherry picked from commit 7fc9fc5f58)
2025-07-08 08:44:23 +01:00
Jeff Young 4f6de4c5a1 Bounds checking (KICAD-8V9) 2025-07-08 08:44:23 +01:00
Jeff Young 6a11c7d87a Debugging.
(cherry picked from commit bacc82c589)
2025-07-08 08:44:23 +01:00
Jeff Young ff086a48f1 Quiet assert. (KICAD-QZJ)
(cherry picked from commit dc96b99e22)
2025-07-08 08:44:23 +01:00
Jeff Young adc05de7db Pads can be on Dwgs & Eco layers. (KICAD-RQE)
(cherry picked from commit 7d18c237b3)
2025-07-08 08:44:23 +01:00
Jeff Young 3e3570c395 Don't assume a schematic. (KICAD-G7S)
(cherry picked from commit 4b510c59f9)
2025-07-08 08:44:23 +01:00
Jeff Young c9c033dd04 Don't trip over a stale sort column index. (KICAD-B3X)
(cherry picked from commit e1d1243a91)
2025-07-08 08:44:23 +01:00
Jeff Young dc8811db45 Type safety (KICAD-QQT).
(cherry picked from commit 86280d5a65)
2025-07-08 08:44:23 +01:00
Jeff Young 2a04ab947b Clear arcs before running boolean ops (KICAD-QXG).
(cherry picked from commit 9c884242f6)
2025-07-08 08:44:23 +01:00
Jeff Young 4a8a1fc882 Iterate pad layers when doing collisions (KICAD-R3Q).
(cherry picked from commit 1184bc3c36)
2025-07-08 08:44:23 +01:00
Jeff Young 53a3955eeb Don't assume a string (KICAD-8QP).
(cherry picked from commit 82d4ab5094)
2025-07-08 08:44:23 +01:00
Jeff Young 6a2bd02a22 User could lock the file at any time (KICAD-73V).
The file being locked is not a programming error.

(cherry picked from commit e18b4cbf72)
2025-07-08 08:44:23 +01:00
Jeff Young 798f763090 We need to catch these when they're created. During write is too late.
(cherry picked from commit 2a7474b33e)
2025-07-08 08:44:23 +01:00
Jeff Young adb96ecdf3 Make sure we don't end up with stale picker handlers (lots of Sentry tickets).
(cherry picked from commit 69b23df4c3)
2025-07-08 08:44:23 +01:00
Jeff Young d16c2e4b25 Prevent wxWidgets assert. (KICAD-QZ5)
(cherry picked from commit 2892642516)
2025-07-08 08:44:23 +01:00
Jeff Young 2f0c89b197 Sort col may not be in the current columns. (KICAD-G74)
(cherry picked from commit 4e4dfa0a38)
2025-07-08 08:44:23 +01:00
Jeff Young 7da15c8027 Prevent wxWidgets assert (KICAD-6VM).
(cherry picked from commit 7b0aceb99e)
2025-07-08 08:44:23 +01:00
Jeff Young 061957bd22 Clear arcs before boolean ops (KICAD-CFQ).
(cherry picked from commit b077b32c43)
2025-07-08 08:44:23 +01:00
Jeff Young 24b56fa1c2 Fix a pair of copy/pastas (KICAD-JC2).
(cherry picked from commit 9ee5950c44)
2025-07-08 08:44:23 +01:00
Jeff Young b6384167bc More tool loop safety. 2025-07-08 08:44:23 +01:00
Jeff Young b6dd1d2a46 ADDED: row height and column width property inspector properties.
(This time for SCH tables.)

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

(cherry picked from commit ee097a7073)
2025-07-08 08:44:23 +01:00
Jeff Young 86c475ced9 Debugging for removing items not in the view.
(cherry picked from commit 0375985d58)
2025-07-08 08:44:23 +01:00
Jeff Young fc0b0a577f Tool loop safety.
(cherry picked from commit a7319bfcd0)
2025-07-08 08:44:23 +01:00
Jeff Young 583b23406c Static_cast safety.
(cherry picked from commit 6f7023116d)
2025-07-08 08:44:23 +01:00
Jeff Young 8c82ecfa3a Double check file dlg results on MSW.
(cherry picked from commit 54cfb62597)
2025-07-08 08:44:23 +01:00
Jeff Young 0d34fef2b6 Be careful with legacy ".pro" conversions.
(cherry picked from commit 762fd179d3)
2025-07-08 08:44:23 +01:00
Jeff Young c52201f427 Assert when nested_settings is null.
(cherry picked from commit 4d06fbce1a)
2025-07-08 08:44:23 +01:00
Jeff Young 5da5d12198 Check file extensions before trying to open.
(cherry picked from commit e74f56c629)
2025-07-08 08:44:23 +01:00
Jeff Young 0c28401be1 Don't overflow trying to draw ticks on ruler (KICAD-9HV).
(cherry picked from commit fde693ebe1)
2025-07-08 08:44:23 +01:00
Jeff Young 3a003fd3d3 Move selection before deleting (KICAD-7BH).
(cherry picked from commit 221cc13c79)
2025-07-08 08:44:23 +01:00
Jeff Young c4847cf704 Formatting.
(cherry picked from commit 5a2bae207b)
2025-07-08 08:44:23 +01:00
Jeff Young 1ab64fa11c Don't pass a null sheetPath to GetValue() (KICAD-QPF).
(cherry picked from commit cccaeb3b29)
2025-07-08 08:44:23 +01:00
Jeff Young 5f2a758160 Make sure legacy colours always works.
Also, don't line wrap "Use PCB editor copper colors".
2025-07-08 08:44:23 +01:00
Jeff Young 55946d40ec Clear arcs before calling SHAPE_POLY_SET boolean ops (KICAD-9Z0). 2025-07-08 08:44:23 +01:00
Jeff Young ab5b2dd17b Update enabled layers when starting FP Editor. 2025-07-08 08:44:23 +01:00
Jeff Young 1d0dd0f60a Update enabled layers when starting FP Editor. 2025-07-08 08:44:23 +01:00
Jeff Young 8d24b4908c Nullptr safety (KICAD-AD).
(cherry picked from commit e0bfc220b4)
2025-07-08 08:44:23 +01:00
Jeff Young 9d9726ba6c Remove noisy assert (KICAD-KMP).
(cherry picked from commit c5dd17a415)
2025-07-08 08:44:23 +01:00
Jeff Young c72c7891c6 Don't force symbol to have a library (KICAD-74K).
(cherry picked from commit 233da7934d)
2025-07-08 08:44:23 +01:00
Jeff Young 416337ddbd Don't specify number of rows, wxWidgets will figure it out (KICAD-7HS)
(and likes to assert if you don't let it.)

(cherry picked from commit 21b294e204)
2025-07-08 08:44:23 +01:00
Jeff Young a296502041 Attempt to circumvent GetValue() getting called when there's no wxDataViewItem.
(cherry picked from commit 880ff60416)
2025-07-08 08:44:22 +01:00
Jeff Young 57c1aa8a75 Don't use wxFRAME_FLOAT_ON_PARENT if there's no parent (KICAD-GJS).
(cherry picked from commit 60869cc950)
2025-07-08 08:44:22 +01:00
Jeff Young b5da37b118 Formatting.
(cherry picked from commit 9a3c9d780f)
2025-07-08 08:44:22 +01:00
Jeff Young 10f5405d24 Don't choke on degenerate polygons.
It's a bit late to be asserting during drawing.
We'd need to know how the object was created to
do anything about it.

(cherry picked from commit 8dc62e1db5)
2025-07-08 08:44:22 +01:00
Jeff Young 4f11e1c548 This is also used for save as. (KICAD-81M)
(cherry picked from commit 04e38d3fcd)
2025-07-08 08:44:22 +01:00
Jeff Young a1cf7dac0a Respect "exclude DNP" setting for Gerber X3.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21201

(cherry picked from commit fa9a588683)
2025-07-08 08:44:22 +01:00
Jeff Young 7210cac0de Ensure algorithmic safety (KICAD-ARX).
(cherry picked from commit 5ab735eb93)
2025-07-08 08:44:22 +01:00
Jeff Young bd5b98cb46 Ensure algorithmic safety (potentially KICAD-9RN).
(cherry picked from commit 39f6b30ee7)
2025-07-08 08:44:22 +01:00
Jeff Young ccc25e4cc7 Make sure event has position before querying it (KICAD-796).
(cherry picked from commit f5f59e797d)
2025-07-08 08:44:22 +01:00
Jeff Young 33f3fb31ab Don't attempt to update temp lines when it will fail (KICAD-FWF).
(cherry picked from commit 5e907f864e)
2025-07-08 08:44:22 +01:00
Jeff Young 6ccf1804f4 Fix double-delete.
The JSON_SETTINGS stuff makes copies of the
JOBSET_DESTINATION.  That ends poorly when it
contains just a naked C++ pointer.

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

(cherry picked from commit eafa1a7af0)
2025-07-08 08:44:22 +01:00
Jeff Young 8756294cfb ADDED: row height and column width property inspector properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21224

(cherry picked from commit 18d9e113a6)
2025-07-08 08:44:22 +01:00
Jeff Young 864f398789 Don't attempt to convert reference image to a SHAPE_POLY_SET.
Also make sure we render table thicknesses when they're
drawn on copper layers.

(cherry picked from commit bf6712d4f4)
2025-07-08 08:44:22 +01:00
Jeff Young 14c7c3f61f UNDEFINED_LAYER no longer copacetic for pads (KICAD-QOC).
(cherry picked from commit b04057498d)
2025-07-08 08:44:22 +01:00
Jeff Young ff7c50c739 Remove noisy assert.
(cherry picked from commit b3b5f6963f)
2025-07-08 08:44:22 +01:00
Jeff Young 05458e12b4 Allow pin autoplacer to run on symbol not yet in schematic (KICAD-JMA).
(cherry picked from commit 26f8f1cdd1)
2025-07-08 08:44:22 +01:00
Jeff Young d1a1624cbe Fix nullptr crash (KICAD-SPF).
(cherry picked from commit d47454bb66)
2025-07-08 08:44:22 +01:00
Jeff Young d88af6418a Nullptr safety (KICAD-1R8).
(cherry picked from commit a5ae1103e4)
2025-07-08 08:44:22 +01:00
Jeff Young 46c8f04ccb Fix CloseProject assertions (and potentially crashes).
(cherry picked from commit 24ae06a96f)
2025-07-08 08:44:22 +01:00
Jeff Young b5f808e6fb Clear selections before deleting grid rows (KICAD-J40).
(cherry picked from commit a2cf59cc89)
2025-07-08 08:44:22 +01:00
Jeff Young 10f4e340ba Check that library exists before checking read-only (KICAD-6Z8).
(cherry picked from commit 2052595dac)
2025-07-08 08:44:22 +01:00
Jeff Young 8a1cf01186 Don't try to select items that don't exist (KICAD-J0X).
(cherry picked from commit a75e0b126a)
2025-07-08 08:44:22 +01:00
Jeff Young ece360c835 Nullptr safety (KICAD-F5D).
(cherry picked from commit b179a6cac8)
2025-07-08 08:44:22 +01:00
Jeff Young 0a2abf38d0 Don't assert on autosave dir not writeable (KICAD-6ZA).
(cherry picked from commit 382ba0629e)
2025-07-08 08:44:22 +01:00
Jeff Young 2c4015c684 Embed fonts used in fields as well as text items.
(Also, don't presume a non-stroke font is an outline
font.  We may have more types in the future....)

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

(cherry picked from commit 97a3a09c90)
2025-07-08 08:44:22 +01:00
Jeff Young d6241d7279 ClearArcs before calling SHAPE_POLY_SET boolean ops.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21209

(cherry picked from commit 21c9364063)
2025-07-08 08:44:22 +01:00
Jeff Young ca3e7b1e49 Allow move action when selection contains non-table-cells. 2025-07-08 08:44:22 +01:00
Jeff Young 6c6ef1cf5d Progress reporting for Run Jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19629

(cherry picked from commit 0464cc18b1)
2025-07-08 08:44:22 +01:00
Jeff Young d38bd7e1a6 Don't presume symbol library still exists (KICAD-74C).
(cherry picked from commit d5eeef0f2c)
2025-07-08 08:44:22 +01:00
Jeff Young 0194694676 Don't try to keep netcodes in defaultZoneSettings (KICAD-7Z8).
(cherry picked from commit 4e174f2078)
2025-07-08 08:44:22 +01:00
Jeff Young b8a6852c9b Remove overzealous assert (KICAD-MH0).
(It is still called with no layer from SWIG.)

(cherry picked from commit 07b8291173)
2025-07-08 08:44:22 +01:00
Jeff Young d0cd902e22 Nullptr safety (KICAD-6K6).
(cherry picked from commit be120b4821)
2025-07-08 08:44:22 +01:00
Jeff Young 1cbbc6ae29 Overflow protection (KICAD-ARX).
(cherry picked from commit 2ce1107e62)
2025-07-08 08:44:22 +01:00
Jeff Young 31d1c15d25 Nullptr safety.
(Potentially KICAD-372.)

(cherry picked from commit 709c0f8c72)
2025-07-08 08:44:22 +01:00
Jeff Young a19b986b02 Garbage pointer safety.
(Potentially KICAD-K2F.)

(cherry picked from commit 21a1499911)
2025-07-08 08:44:22 +01:00
Jeff Young a29e7a365f Nullptr safety.
(cherry picked from commit 071bdbdaa7)
2025-07-08 08:44:22 +01:00
Jeff Young ade690d394 Clear the entire ID cache when deleting markers.
This probably doesn't fix anything, but it may be
faster when deleting large marker sets.

It also *might* impact KICAD-AX1, but that's less
likely.

(cherry picked from commit ce1ebddbe9)
2025-07-08 08:44:22 +01:00
Jeff Young 45c1dcdee8 Tighten isCoupledDiffPair test when we only have one item.
Improves https://gitlab.com/kicad/code/kicad/-/issues/19838

(cherry picked from commit 2564e5511f)
2025-07-08 08:44:22 +01:00
Jeff Young 1b09f6c224 Remove overzealous assert (KICAD-775).
Pasting text can paste junk.  Might as well just use align_center.

(cherry picked from commit a37af2b81b)
2025-07-08 08:44:22 +01:00
Jeff Young b072d4283b Remove overzealous assert (KICAD-6VK).
(cherry picked from commit 902ae353f6)
2025-07-08 08:44:22 +01:00
Jeff Young 60a8c43b29 Assertion reduction (KICAD-756).
(cherry picked from commit fa3d23a818)
2025-07-08 08:44:22 +01:00
Jeff Young d8003365d3 Fix presumptive cast (KICAD-J24).
(cherry picked from commit 3424f2bd4c)
2025-07-08 08:44:22 +01:00
Jeff Young 0b20c2990c Nullptr safety (KICAD-78).
(cherry picked from commit ed8605b9c1)
2025-07-08 08:44:22 +01:00
Jeff Young 9bfc3856ca Add undefined netclass to severities list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20373

(cherry picked from commit 5d3279004f)
2025-07-08 08:44:22 +01:00
Jeff Young 51ec64fcc1 Must show a dialog for it to be useful.
(cherry picked from commit e48d746bbb)
2025-07-08 08:44:22 +01:00
Jeff Young 77ceba3c82 Must call SetPassEvent() for event to run in its own loop.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19805

(cherry picked from commit 9add4a39c8)
2025-07-08 08:44:22 +01:00
Jeff Young 0bec2a8838 Remove overzealous assert (KICAD-752).
(cherry picked from commit c5dd60aed9)
2025-07-08 08:44:22 +01:00
Jeff Young 4768e555e2 Set layerName before plotting drawing sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20959

(cherry picked from commit 19a6669943)
2025-07-08 08:44:22 +01:00
Jeff Young a0536a0e75 Fix merge error. 2025-07-08 08:44:22 +01:00
Jeff Young 1befc4b651 Can't use EndModal() to cancel a modal dialog that hasn't been shown yet (KICAD-6YE).
(This particular case happens when the user cancels
the progress dialog while loading symbols before the
symbol picker has been displayed.  3.5K people have
done this 13K times on MSW.)

(cherry picked from commit 0a59ca7590)
2025-07-08 08:44:22 +01:00
Jeff Young aacfa5ab83 Attempt to fix destruction order crash (KICAD-6KC).
(cherry picked from commit a7fdea9b6f)
2025-07-08 08:44:22 +01:00
Jeff Young a65339b0ba Quiet noisy assert (KICAD-9D7).
(cherry picked from commit bb92b40364)
2025-07-08 08:44:22 +01:00
Jeff Young 70a8560888 Don't assume net navigator has root item (KICAD-7Q7).
(cherry picked from commit b58f5607cc)
2025-07-08 08:44:22 +01:00
Jeff Young 7364cd3026 Don't be pedantic about selection contents when exposing commands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21112

(cherry picked from commit 100260ed59)
2025-07-08 08:44:22 +01:00
Jeff Young 8740748438 Iterator safety.
(cherry picked from commit 541ca43d9e)
2025-07-08 08:44:22 +01:00
Jeff Young 9306952037 Formatting.
(cherry picked from commit a382fd3064)
2025-07-08 08:44:22 +01:00
Jeff Young 2037b11d72 Smarten libeval missing units warning.
In particular, don't choke on multiplicative statements
including a scalar.

The new algo is not actually smart enough to eval the
whole parse tree and separate conditionals from multiplication
from addition; it just contents itself with reporting
the common case of a single value with no units.

See comments in code.

(cherry picked from commit 99076cfc5f)
2025-07-08 08:44:22 +01:00
Jeff Young 06ae603120 Formatting.
(cherry picked from commit 3284dc348a)
2025-07-08 08:44:22 +01:00
Jeff Young cb669d15e4 Escape/unescape symbol name in save as dialog.
SymbolNameInUse() also needed some help.
As did DIALOG_LIB_NEW_SYMBOL.

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

(cherry picked from commit 8302b0d6bd)
2025-07-08 08:44:22 +01:00
Jeff Young f1a7a6d4dc Don't generate and integer result when we're expecting a double.
(cherry picked from commit 38f6fc496b)
2025-07-08 08:44:22 +01:00
Jeff Young 70e595acbf Formatting.
(cherry picked from commit 52f77864bc)
2025-07-08 08:44:22 +01:00
Jeff Young 74da384711 Fix merge conflict. 2025-07-08 08:44:21 +01:00
Jeff Young 9b7dfcc818 Clear child flags for items whose undo/redo is managed by parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21111

(cherry picked from commit 2e9987e722)
2025-07-08 08:44:21 +01:00
Jeff Young 61c32913e9 Formatting.
(cherry picked from commit b2025b7568)
2025-07-08 08:44:21 +01:00
Jeff Young ac8d8467c5 Ensure any mapped layers are enabled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21138

(cherry picked from commit 6c5f682254)
2025-07-08 08:44:21 +01:00
Jeff Young b9bbf871c1 Formatting.
(cherry picked from commit a3ae173159)
2025-07-08 08:44:21 +01:00
Jeff Young fa3d04b8f7 Don't allow repeat command when one is already running.
Also, performa undo during move locally, and bar redo events.

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

(cherry picked from commit bdc3129db3)
2025-07-08 08:44:21 +01:00
Jeff Young 98ad63f87c ADDED: check/uncheck all update option buttons.
Dialog is wide enough now not to require double lines for LIB_IDs.

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

(cherry picked from commit edca1ee62d)
2025-07-08 08:44:21 +01:00
Jeff Young 2e3410f155 ADDED: Check/Uncheck All for Change Footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21150

(cherry picked from commit e3baebd53a)
2025-07-08 08:44:21 +01:00
Jeff Young 9a58b53a4c Keep currently selected group items when rebuilding toolbars. 2025-07-08 08:44:21 +01:00
Jeff Young 13236e48fc Fix merge errors. 2025-07-08 08:44:21 +01:00
Jeff Young 5c60164bb5 Warp back from context menu before running command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19560

(cherry picked from commit 74bf678d99)
2025-07-08 08:44:21 +01:00
Jeff Young 143bdbedd7 Nullptr safety.
(cherry picked from commit 27ac2beac5)
2025-07-08 08:44:21 +01:00
Jeff Young 3748df90e4 Fix typo.
(cherry picked from commit f6b814658e)
2025-07-08 08:44:21 +01:00
Jeff Young 7a695ada66 Don't overwrite return value.
(cherry picked from commit 5ed332771c)
2025-07-08 08:44:21 +01:00
Jeff Young 1277cdd570 There's no view when running tests.
(cherry picked from commit 9f7fa4df66)
2025-07-08 08:44:21 +01:00
Jeff Young 8202388aa8 Dirty clearance lines when rule areas change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20734

(cherry picked from commit e2cf944915)
2025-07-08 08:44:21 +01:00
Jeff Young f21a801545 Use courtyards for DNP cross-out sizes.
(And failing that, just pads and edges, no text.)

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

(cherry picked from commit 2844674449)
2025-07-08 08:44:21 +01:00
Jeff Young 2c27c3c54d Reset m_drcRun when deleting all markers. 2025-07-08 08:44:21 +01:00
Jeff Young 62efa38229 Fix merge error. 2025-07-08 08:44:21 +01:00
Jeff Young 29475b6fb6 Use KiCad terminology and fix broken logic around locked footprints.
(And don't show users UUIDs.)

(Also fix broken logic around skipped numbers.)

(Also removes nag dialog.)

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

(cherry picked from commit 7258546084)
2025-07-08 08:44:21 +01:00
Jeff Young 51413cb564 Don't export negative layers to copper.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20949

(cherry picked from commit e4294aab85)
2025-07-08 08:44:21 +01:00
Jeff Young 2cb0771d42 Repair saved locking logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21090

(cherry picked from commit e6d94d5b09)
2025-07-08 08:44:21 +01:00
Jeff Young 9100f22d68 Nullptr safety.
(cherry picked from commit f76608c0da)
2025-07-08 08:44:21 +01:00
Jeff Young 388ba9b8a6 Iterator safety and shared code.
(cherry picked from commit c989fc17ac)
2025-07-08 08:44:21 +01:00
Jeff Young ddae7d5437 Don't leak design blocks.
(cherry picked from commit 9ef0e7fb01)
2025-07-08 08:44:21 +01:00
Jeff Young f7d1e7fc80 Don't remove ruler from view; just hide it.
(cherry picked from commit 28369ee4dd)
2025-07-08 08:44:21 +01:00
Jeff Young 0a946a3d23 Static cast safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20958

(cherry picked from commit 116bd924c2)
2025-07-08 08:44:21 +01:00
Jeff Young f3cbd8be9a Stale pointer safety.
(cherry picked from commit 46cb3f96a0)
2025-07-08 08:44:21 +01:00
Jeff Young 9a57945d30 Formatting.
(cherry picked from commit a6707a42d1)
2025-07-08 08:44:21 +01:00
Jeff Young d842dc20eb Prefer the active layer when picking tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20963

(cherry picked from commit 5b44312a10)
2025-07-08 08:44:21 +01:00
Jeff Young 0e50c2890a Add grammar for SkyWater .subckt parameters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20220

(cherry picked from commit 0f9e858beb)
2025-07-08 08:44:21 +01:00
Jeff Young fc30a4eb3d Runtime cache for knockout text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20711

(cherry picked from commit 80d24d4720)
2025-07-08 08:44:21 +01:00
Jeff Young 8dd10e11b4 Prefer const& to passing by value.
(cherry picked from commit 1968d67bf3)
2025-07-08 08:44:21 +01:00
Jeff Young 9d8f6fbd34 Remove dead code.
(cherry picked from commit b94f5a013a)
2025-07-08 08:44:21 +01:00
Jeff Young 0ecd5d86bc Performance optimizations.
(cherry picked from commit 31c6c28882)
2025-07-08 08:44:21 +01:00
Jeff Young 573e36b2d3 Iterator safety.
(cherry picked from commit 5117ecdf3d)
2025-07-08 08:44:21 +01:00
Jeff Young b682b39180 Initializer safety.
(cherry picked from commit adb535e649)
2025-07-08 08:44:21 +01:00
Jeff Young 5dbd0603a7 Formatting.
(cherry picked from commit 639b856ea9)
2025-07-08 08:44:21 +01:00
Jeff Young ad8209069d Negative number safety.
(cherry picked from commit 265d273f93)
2025-07-08 08:44:21 +01:00
Jeff Young 33f004c5a6 Lock safety.
We're going to grab the lock every time through anyway,
might as well have it for the reads as well as the
writes.

(cherry picked from commit 95ab9f0b50)
2025-07-08 08:44:21 +01:00
Jeff Young d4a30f8b16 Comments.
(cherry picked from commit 530b4d683c)
2025-07-08 08:44:21 +01:00
Jeff Young 3616f901d1 Don't assume a frame.
(cherry picked from commit ecd4d9d64a)
2025-07-08 08:44:21 +01:00
Jeff Young f417e5b0e5 Nullptr safety.
(cherry picked from commit 92b9997948)
2025-07-08 08:44:21 +01:00
Jeff Young 31af54d978 Cleanup.
(cherry picked from commit a66aff301f)
2025-07-08 08:44:21 +01:00
Jeff Young 88d9112257 Iterator safety.
(cherry picked from commit f5c48b3f34)
2025-07-08 08:44:21 +01:00
Jeff Young ea2fa12e8a Separate icon for Constraints Resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21038

(cherry picked from commit ebe30355ce)
2025-07-08 08:44:21 +01:00
Jeff Young 70ede5a27c Nullptr safety.
(cherry picked from commit 3acdac525b)
2025-07-08 08:44:21 +01:00
Jeff Young 61a78cbc0f Fix uninitialized member variable.
(cherry picked from commit 68f1cd0a08)
2025-07-08 08:44:21 +01:00
Jeff Young 91b2afeaab Nullptr safety.
(cherry picked from commit 6609e79868)
2025-07-08 08:44:21 +01:00
Jeff Young 95925232a4 Nullptr safety.
(cherry picked from commit af1a246e12)
2025-07-08 08:44:21 +01:00
Seth Hillbrand 5586d3ef88 Fixup for cda127a9a3
Support for arbitrary layer count

(cherry picked from commit 51e36257e1)
2025-07-08 08:44:21 +01:00
Jeff Young 9e2df05050 Fix logic that's been broken for 11 years.
(And was doubly-broken when copper layers went to
even numbers only.)

(cherry picked from commit 863d3c3603)
2025-07-08 08:44:21 +01:00
Jeff Young 1c0d8805e9 Autocomplete for OUTPUT_TMP_PATH_VAR_NAME.
(Along with a list of other env vars in use.)

(cherry picked from commit dd39a50a14)
2025-07-08 08:44:21 +01:00
Mark Roszko ab23052bdc Unbind the onsize event from the parent while destructing the child
Fixes KICAD-RJA


(cherry picked from commit 5b599213f6)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-07-08 01:03:47 +00:00
Mark Roszko 4622506d7b Fix crash because the infobar button doesn't have a window yet (because the infobar was not shown yet on Windows), fixes sentry KICAD-X9Z
(cherry picked from commit 69e2c55291)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-07-08 01:03:33 +00:00
Mark Roszko 382f2ee302 Prevent invalid via layers due to property editor 2025-07-08 00:54:49 +00:00
Mark Roszko fde51f4c79 Bump vcpkg for newer opencascade port 2025-07-08 00:51:46 +00:00
Wayne Stambaugh 872b2a585c Begin version 9.0.4 development. 2025-07-07 19:12:51 -04:00
Wayne Stambaugh 21b6198547 Tag stable version 9.0.3 release. 2025-07-07 19:07:07 -04:00
Alex Shvartzkop 50e902c06b Update translations 2025-07-07 17:43:14 +03:00
dsa-t 7581502453 Translated using Weblate (Russian)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-07-07 16:41:40 +02:00
Sárkány Lőrinc 323d574991 Translated using Weblate (Hungarian)
Currently translated at 32.3% (3260 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:40 +02:00
Sárkány Lőrinc f2cd9c47ec Translated using Weblate (Hungarian)
Currently translated at 32.3% (3260 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:40 +02:00
Sárkány Lőrinc 897cad5c0b Translated using Weblate (Hungarian)
Currently translated at 32.3% (3260 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:40 +02:00
YÜKSEL AÇIKGÖZ fd6d942574 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:40 +02:00
YÜKSEL AÇIKGÖZ 3da7b5c930 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:40 +02:00
YÜKSEL AÇIKGÖZ 896c29f620 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:40 +02:00
YÜKSEL AÇIKGÖZ 616ce197c1 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:40 +02:00
YÜKSEL AÇIKGÖZ 33f6621ff8 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:39 +02:00
Johan Heikkilä 45e9486db0 Translated using Weblate (Swedish)
Currently translated at 99.9% (10056 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc 32d4750bbd Translated using Weblate (Hungarian)
Currently translated at 31.7% (3197 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:39 +02:00
YÜKSEL AÇIKGÖZ 08bb6368a0 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:39 +02:00
YÜKSEL AÇIKGÖZ b4053180ca Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:39 +02:00
YÜKSEL AÇIKGÖZ 81f6d3d084 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:39 +02:00
co8 j 248b2049e5 Translated using Weblate (Japanese)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc 9f6a32aee8 Translated using Weblate (Hungarian)
Currently translated at 31.4% (3164 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc ca80925e78 Translated using Weblate (Hungarian)
Currently translated at 31.4% (3164 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc 5d25ea693e Translated using Weblate (Hungarian)
Currently translated at 31.4% (3164 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc 674da30d37 Translated using Weblate (Hungarian)
Currently translated at 31.4% (3164 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:39 +02:00
Sárkány Lőrinc 5ee3b6f3b2 Translated using Weblate (Hungarian)
Currently translated at 31.4% (3164 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-07 16:41:38 +02:00
YÜKSEL AÇIKGÖZ 6a4efee944 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:38 +02:00
YÜKSEL AÇIKGÖZ 3604266037 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:38 +02:00
YÜKSEL AÇIKGÖZ 973bba7ba0 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-07 16:41:38 +02:00
dsa-t 68d88d0cd9 Translated using Weblate (Portuguese)
Currently translated at 91.6% (9221 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-07-07 16:41:38 +02:00
Anonymous e46109196d Translated using Weblate (Portuguese)
Currently translated at 91.6% (9221 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-07-07 16:41:38 +02:00
dsa-t 7b140480bb Translated using Weblate (Portuguese)
Currently translated at 91.6% (9221 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-07-07 16:41:38 +02:00
dsa-t 5966b2eb15 Translated using Weblate (Portuguese)
Currently translated at 91.6% (9221 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-07-07 16:41:38 +02:00
jean-pierre charras 992492e738 DIALOG_LABEL_PROPERTIES: enter key close it instead of open the drop down list
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21258

(cherry picked from commit c1eb69570d)
2025-07-06 17:00:37 +02:00
Jon Evans 9c28241e45 Make sure initial focus of label properties dialog is the text input 2025-07-06 09:28:24 -04:00
Alex Shvartzkop 0b19a1b6ec Update translations 2025-07-03 20:16:24 +03:00
Pferd O 14825e8996 Translated using Weblate (German)
Currently translated at 99.7% (10038 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-03 19:15:24 +02:00
Sárkány Lőrinc 7ca19de713 Translated using Weblate (Hungarian)
Currently translated at 30.3% (3051 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-07-03 19:15:24 +02:00
Pferd O 44a8ad79b7 Translated using Weblate (German)
Currently translated at 99.6% (10030 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-07-03 19:15:24 +02:00
dsa-t 26aac62a6a Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 8d23daa067 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 73f9990369 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 2bb4c2438e Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ dbf79075c4 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 39eff0a4f7 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ dd86187970 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ edfff51d67 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 083be47819 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 6ba759743f Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ b2668f70a2 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ 9faa139b5a Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:24 +02:00
YÜKSEL AÇIKGÖZ d7699ac826 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 44589a11bb Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 9ae89aa562 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ f6ae47b788 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 24c0aec0ba Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 1c7a5dd375 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ b8d9ff5eb5 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 8ffa043266 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 5301fa3360 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ f63ba2f615 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 6869c6bbff Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 4f3dc68f1d Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ 49311c2a4b Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ a978925939 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ abb10b925e Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
YÜKSEL AÇIKGÖZ f45312bc3b Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:23 +02:00
Luka Borkovic da33b8705b Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:23 +02:00
Luka Borkovic 5a5dc47418 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:23 +02:00
Luka Borkovic 84237b16bb Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:23 +02:00
Luka Borkovic d147d7ffa0 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:23 +02:00
Luka Borkovic 837889ecf6 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:22 +02:00
Luka Borkovic 0a590bf8f0 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:22 +02:00
Luka Borkovic 90d615456a Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:22 +02:00
Luka Borkovic fc84bf8c94 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:22 +02:00
Luka Borkovic cbd808f2e5 Translated using Weblate (Serbian)
Currently translated at 18.8% (1895 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:22 +02:00
Julio Dias 5d5fc59ce9 Translated using Weblate (Portuguese)
Currently translated at 91.6% (9221 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-07-03 19:15:22 +02:00
CloverGit c488da358e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:22 +02:00
YÜKSEL AÇIKGÖZ 4a1a82cb57 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:22 +02:00
YÜKSEL AÇIKGÖZ 26bb3386c6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:22 +02:00
YÜKSEL AÇIKGÖZ 7fea1c7073 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:22 +02:00
YÜKSEL AÇIKGÖZ c8bf6dd55c Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:22 +02:00
CloverGit 96ef9d1287 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:22 +02:00
CloverGit d8f76f324d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:22 +02:00
CloverGit 1e6eeda69e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:22 +02:00
CloverGit c415380de9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:22 +02:00
CloverGit 108ba39185 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:21 +02:00
CloverGit e163001eef Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10049 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:21 +02:00
CloverGit a51dfa93de Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (10042 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:21 +02:00
CloverGit 6bc39db87d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (10042 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-07-03 19:15:21 +02:00
YÜKSEL AÇIKGÖZ b035f0f631 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:21 +02:00
YÜKSEL AÇIKGÖZ fee5710c2b Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-07-03 19:15:21 +02:00
தமிழ்நேரம் 0c221c55f1 Translated using Weblate (Tamil)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-07-03 19:15:21 +02:00
Temuri Doghonadze 32d5fb9e0c Translated using Weblate (Georgian)
Currently translated at 10.6% (1075 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-07-03 19:15:21 +02:00
Anonymous 636ca4c170 Translated using Weblate (Serbian)
Currently translated at 17.7% (1789 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-07-03 19:15:21 +02:00
ZbeeGin b2aa3cc154 Translated using Weblate (Polish)
Currently translated at 99.7% (10036 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-07-03 19:15:21 +02:00
Wayne Stambaugh 7182278200 Tag stable version 9.0.3 release candidate 1. 2025-07-02 11:27:34 -04:00
Alex Shvartzkop be9ce460f8 EasyEDA Std import: support multiple consecutive arc parameter sets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21238

(cherry picked from commit 90f5cbf003)
2025-07-02 18:07:06 +03:00
Jeff Young adf8d6626f Further simplify scoring logic.
Do away with special cases for showing.
Do away with resetting the score separately.
All methods are subtractive (logical AND).

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

(cherry picked from commit 01a8d44bce)
2025-07-01 18:13:55 -06:00
Jeff Young f561c05dd5 Fix for new layer arch (copper on even numbers only).
(cherry picked from commit cda127a9a3)
2025-06-30 13:59:15 -06:00
Jeff Young 53b3c1c082 CHANGED: Use FILTER_COMBOBOX for label names.
Also pushes some of the implementation down a level
so that it can be shared between this and the
SYMBOL_FILTER_COMBOBOX.

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

(cherry picked from commit ee2cf47f23)
2025-06-30 13:58:58 -06:00
Jeff Young b21ba7c2aa IncrementTimeStamp() lock safety.
Increment is only called once per op, so it's not
overly performance critical.  Better to have the
lock when reading the cache values.

(cherry picked from commit a7a83efc46)
2025-06-30 12:00:15 -06:00
jean-pierre charras e12748e669 DIALOG_PIN_PROPERTIES: fix incorrect initial size when info bar is shown.
FinishDialogSettings() must be called after the info bar is initialized.

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

(cherry picked from commit 6d4cf65d5a)
2025-06-29 10:08:11 +02:00
Jon Evans eb3606bf57 Prevent crash when zooming to preset in footprint chooser
Partial cherry-pick of 0cf866d4

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21203
2025-06-28 19:46:42 -04:00
Alex Shvartzkop d3e5245606 Restore *_md.h files removed in 939659fb58 2025-06-28 15:47:50 +03:00
Jeff Young 632d23c6b0 Uninitialized variable.
(cherry picked from commit 4403c9b62f)
2025-06-28 13:57:14 +02:00
Tomasz Wlostowski d09523728d router: clean up shoved traces after aborting differential pair routing in shove mode
Note: the single-trace placer (LINE_PLACER) has moved to the FIXED_TAIL for tracking the interim placed routes (and reverting them if user pressed backspace). Unfortunately the DIFF_PAIR_PLACER didn't follow. The result was the dummy CommitPlacement() call at the end of aborted routing would commit the last shove state, even if FixRoute() was never called. For longer-term fix: fix ROUTER_TOOL logic to indicated aborted routing to the router/placer (AbortPlacement() is already there). Also implement FIXED_TAIL in diff pair placement mode.
(cherry picked from commit ed6440b782)
2025-06-28 13:57:07 +02:00
Tomasz Wlostowski 939659fb58 router: TOPOLOGY::SimplifyLine() should not try to merge segments of differing widths
Note to self: likely a regression after adding aAllowSegmentSizeMismatch parameter (default = true) to AssembleLine(). We need to improve the simplification algorithm to take differing widths into account.

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

(cherry picked from commit 0256ccb6a6)
2025-06-28 13:57:02 +02:00
Alex Shvartzkop 37b9678de3 Update translations 2025-06-27 22:51:50 +03:00
YÜKSEL AÇIKGÖZ ed8d516e1f Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:43 +02:00
YÜKSEL AÇIKGÖZ 6c2d54eee3 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:43 +02:00
YÜKSEL AÇIKGÖZ 14af40cbfd Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ f525b4c4fb Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ f063eee491 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ a485294a4c Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ 53c59d78c8 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ a6d688c125 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ 2ff7c616d8 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ 2cdd9e48c6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
YÜKSEL AÇIKGÖZ 080ca23b66 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:42 +02:00
Luka Borkovic c8f8cbcd4c Translated using Weblate (Serbian)
Currently translated at 17.7% (1791 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-06-27 21:50:41 +02:00
pominglee d6ff54156a Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 98.7% (9934 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-06-27 21:50:41 +02:00
YÜKSEL AÇIKGÖZ 5ec07eb949 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:41 +02:00
Luka Borkovic fb762b7387 Translated using Weblate (Serbian)
Currently translated at 16.3% (1643 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-06-27 21:50:41 +02:00
Manuela Silva 7061c899aa Translated using Weblate (Portuguese)
Currently translated at 91.5% (9217 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-06-27 21:50:41 +02:00
ZbeeGin ff5066b64d Translated using Weblate (Polish)
Currently translated at 99.7% (10035 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-27 21:50:41 +02:00
2tama3 4e62bd348c Translated using Weblate (Japanese)
Currently translated at 99.7% (10042 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-06-27 21:50:41 +02:00
Marco Ciampa 1cb463d329 Translated using Weblate (Italian)
Currently translated at 99.8% (10045 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/it/
2025-06-27 21:50:41 +02:00
YÜKSEL AÇIKGÖZ 4be25f09e2 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:41 +02:00
YÜKSEL AÇIKGÖZ 7c2db10051 Translated using Weblate (Turkish)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-06-27 21:50:40 +02:00
co8 j a6b3cd0bee Translated using Weblate (Japanese)
Currently translated at 99.7% (10042 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-06-27 21:50:40 +02:00
Miklós Márton bd9a0477a5 Translated using Weblate (Hungarian)
Currently translated at 30.3% (3050 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-27 21:50:40 +02:00
Pferd O 2b53544cad Translated using Weblate (German)
Currently translated at 99.6% (10029 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-27 21:50:40 +02:00
Jan Straka 7054f138c2 Translated using Weblate (Czech)
Currently translated at 78.5% (7902 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/cs/
2025-06-27 21:50:40 +02:00
Anonymous 946de96a05 Translated using Weblate (Serbian)
Currently translated at 14.5% (1469 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-06-27 21:50:40 +02:00
Anonymous aae248e5bb Translated using Weblate (Hungarian)
Currently translated at 30.2% (3045 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-27 21:50:40 +02:00
Pferd O 9e8a33101c Translated using Weblate (German)
Currently translated at 99.6% (10027 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-27 21:50:39 +02:00
jean-pierre charras 386ef962e4 STEP export: ensure messages are immediately printed, and not stored in buffer.
The issue was mainly seen on Windows, in STEP export with msys2 build but also
with other builds when exported from Pcbnew dialog

(cherry picked from commit 0d013498ef)
2025-06-24 19:04:28 +02:00
Jeff Young 2ea89e967e Fix uninitialized variable.
(This is potentially #21016.)
2025-06-24 09:44:51 -06:00
Alex Shvartzkop b229eca899 Update translations 2025-06-20 23:57:27 +03:00
Peter B 2935e92c4a Translated using Weblate (Romanian)
Currently translated at 24.0% (2424 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ro/
2025-06-20 22:56:43 +02:00
Sárkány Lőrinc a00327ef4d Translated using Weblate (Hungarian)
Currently translated at 30.2% (3046 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-20 22:56:43 +02:00
Peter B 7f1cc16f32 Translated using Weblate (Romanian)
Currently translated at 23.9% (2412 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ro/
2025-06-20 22:56:43 +02:00
ℂ𝕠𝕠𝕠𝕝 (𝕘𝕚𝕥𝕙𝕦𝕓.𝕔𝕠𝕞/ℂ𝕠𝕠𝕠𝕝) 21b1b4480e Translated using Weblate (Latvian)
Currently translated at 0.7% (78 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/lv/
2025-06-20 22:56:43 +02:00
Pferd O cbb3c68312 Translated using Weblate (German)
Currently translated at 99.6% (10028 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-20 22:56:43 +02:00
Luka Borkovic df3dc09373 Translated using Weblate (Serbian)
Currently translated at 14.6% (1470 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-06-20 22:56:43 +02:00
Sárkány Lőrinc 4b88cafda6 Translated using Weblate (Hungarian)
Currently translated at 30.2% (3045 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-20 22:56:43 +02:00
Luka Borkovic fd6e9a4674 Translated using Weblate (Serbian)
Currently translated at 14.4% (1454 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-06-20 22:56:42 +02:00
ZbeeGin 9b7c212a1d Translated using Weblate (Polish)
Currently translated at 99.7% (10035 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-20 22:56:42 +02:00
Sárkány Lőrinc 0ae604da2d Translated using Weblate (Hungarian)
Currently translated at 30.2% (3042 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-20 22:56:42 +02:00
Sárkány Lőrinc 114f99d195 Translated using Weblate (Hungarian)
Currently translated at 29.6% (2984 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-20 22:56:42 +02:00
Pferd O 68559469ac Translated using Weblate (German)
Currently translated at 99.4% (10012 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-20 22:56:42 +02:00
co8 j 6bec400271 Translated using Weblate (Japanese)
Currently translated at 99.7% (10039 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-06-20 22:56:42 +02:00
Pferd O 0a668b5b90 Translated using Weblate (German)
Currently translated at 99.4% (10011 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-20 22:56:42 +02:00
CloverGit ac35561ed8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (10041 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-06-20 22:56:42 +02:00
தமிழ்நேரம் b1b88a063d Translated using Weblate (Tamil)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-06-20 22:56:42 +02:00
Sárkány Lőrinc 94666d6efa Translated using Weblate (Hungarian)
Currently translated at 28.3% (2849 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-20 22:56:42 +02:00
Pferd O cc5afb4919 Translated using Weblate (German)
Currently translated at 99.3% (10000 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-20 22:56:42 +02:00
தமிழ்நேரம் 0d6adf987e Translated using Weblate (Tamil)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-06-20 22:56:42 +02:00
Henrik Kauhanen b860dc17ea Translated using Weblate (Swedish)
Currently translated at 99.9% (10057 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-06-20 22:56:42 +02:00
ZbeeGin 7e80958994 Translated using Weblate (Polish)
Currently translated at 99.6% (10033 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-20 22:56:41 +02:00
Pferd O f988e2093a Translated using Weblate (German)
Currently translated at 99.3% (9997 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-20 22:56:41 +02:00
dsa-t 90d264e80a router: possible fix for disappearing split-segments
https://gitlab.com/kicad/code/kicad/issues/21019


(cherry picked from commit e274307437)

Co-authored-by: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
2025-06-20 23:08:11 +03:00
Jeff Young 719512183d Eagle sheet descriptions are elements, not attributes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20957

(cherry picked from commit aaa0e74311)
2025-06-18 12:10:59 +01:00
Jeff Young fde3087324 Hack to prevent single-line scintilla scrolling bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19708

(cherry picked from commit ef473c2b01)
2025-06-18 12:10:59 +01:00
Jeff Young 1a59309762 Accept empty "(fp)" statements.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20002

(cherry picked from commit 70dfc9215d)
2025-06-18 12:10:59 +01:00
Jeff Young b9b6ee41e6 Ensure any mapped layers are enabled.
Also fixes a missing mutex for parallel access to cache
in DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances().

Also simplifies the logic for not show multiple errors.

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

(cherry picked from commit 5e707acbdb)
2025-06-18 12:10:59 +01:00
Jon Evans b1649071e8 Hyperlynx: flip Y-axis coordinates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18581
2025-06-17 17:43:46 -04:00
jean-pierre charras addd8d74b5 FP editor: use the footprint datasheet field value if it is not empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21149

cherry picked from commit c56d55b3 and fix for 9.0.x branch
2025-06-17 18:31:09 +02:00
Jon Evans c9668b81c8 API: Don't accidentally copy board's net info 2025-06-16 23:21:50 -04:00
Mark Roszko 016d937bc0 Rename JOBSET_OUTPUT_TMP_PATH to JOBSET_OUTPUT_WORK_PATH 2025-06-16 16:06:16 +00:00
jean-pierre charras b3c61d2dbc Pcbnew: fix position of rectangles after a Rotate command.
(cherry picked from commit b621e0ccf5)
2025-06-15 17:50:04 +02:00
Jon Evans 8b80853ad7 QA: Store SVGs, not PNGs
Different platforms/versions can result in very slight differences
when converting SVGs to PNGs for diffing them.
2025-06-14 16:56:47 -04:00
Seth Hillbrand 6bc7a5e35f Force grids to have entries.
If they don't in the file, reset to the default

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

(cherry picked from commit e957d10098)
2025-06-09 13:14:28 -07:00
Alex Shvartzkop 69ea0e523b Update translations 2025-06-08 17:03:31 +03:00
dsa-t 6bd0ec8c67 Translated using Weblate (Russian)
Currently translated at 100.0% (10064 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-06-08 16:01:51 +02:00
Sárkány Lőrinc 8b1750d480 Translated using Weblate (Hungarian)
Currently translated at 28.2% (2841 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-08 16:01:51 +02:00
CloverGit 9affff0d4c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (10035 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-06-08 16:01:51 +02:00
Sárkány Lőrinc d26f340e54 Translated using Weblate (Hungarian)
Currently translated at 28.1% (2833 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-08 16:01:51 +02:00
Sárkány Lőrinc 9d414e2695 Translated using Weblate (Hungarian)
Currently translated at 27.5% (2768 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-08 16:01:51 +02:00
ZbeeGin f69725305c Translated using Weblate (Polish)
Currently translated at 99.6% (10026 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-08 16:01:51 +02:00
김랑기 3300fdef45 Translated using Weblate (Korean)
Currently translated at 99.0% (9966 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ko/
2025-06-08 16:01:51 +02:00
Pferd O 02bd56d3ff Translated using Weblate (German)
Currently translated at 99.2% (9992 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-08 16:01:51 +02:00
DevAny 1db63355be Translated using Weblate (Korean)
Currently translated at 99.0% (9966 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ko/
2025-06-08 16:01:51 +02:00
CloverGit 42154e7911 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.7% (10035 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-06-08 16:01:50 +02:00
Henrik Kauhanen 1e2515c3f7 Translated using Weblate (Swedish)
Currently translated at 99.9% (10056 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-06-08 16:01:50 +02:00
ZbeeGin 054bd94935 Translated using Weblate (Polish)
Currently translated at 99.6% (10025 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-08 16:01:50 +02:00
DevAny 9c3411bc0e Translated using Weblate (Korean)
Currently translated at 98.9% (9962 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ko/
2025-06-08 16:01:50 +02:00
Pferd O e42b46a149 Translated using Weblate (German)
Currently translated at 99.2% (9987 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-08 16:01:50 +02:00
CloverGit b0ad51034e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (10021 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-06-08 16:01:50 +02:00
Frank Sonnenberg c02a4528c6 Translated using Weblate (German)
Currently translated at 99.2% (9986 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-08 16:01:50 +02:00
Pferd O 761edc19a2 Translated using Weblate (German)
Currently translated at 99.2% (9986 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-06-08 16:01:50 +02:00
Jon Evans 1bc11d0e77 Add prettifier support to ExportFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21071
2025-06-07 10:18:10 -04:00
Jon Evans d0453a89bc Restore ability for moves to be async
This is required for the API

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21047
2025-06-07 09:46:50 -04:00
Mark Roszko dad1c4ec86 Allow running jobsets in cli by description (and uuid)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20033


(cherry picked from commit 2d327d9d73)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-06-06 23:04:51 +00:00
Seth Hillbrand d22f8a2e28 Fix small segment render
Small segments, not just zero-length ones need to be drawn as circles to
avoid being dropped

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

(cherry picked from commit 8e97a98fef)
2025-06-06 15:55:06 -07:00
Seth Hillbrand a5896e231a Don't blindly deref an optional
Since the optional might not have a value (and the wxVariant seems to
equate 0 with an empty string), we should check for the valid optional
first and fallback to 0 if not set

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21081
2025-06-06 13:52:38 -07:00
Mark Roszko 10413f778c Append python Scripts directory to PATH env on windows
(cherry picked from commit fe54a2ec0f)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-06-06 03:13:18 +00:00
Mark Roszko f48b1758e5 Set an env var when running jobs that points to the temp folder for the jobset output
(cherry picked from commit ba63b07a5e)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-06-06 02:52:00 +00:00
Seth Hillbrand 846425c638 Force PTH pads to exist on all layers
By definition the PTH will exist on all layers at the moment but some
corner case allowed the NPTH layer set to be saved in the layerset,
after which it was hard to reset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20980
2025-06-05 17:11:40 -07:00
Wayne Stambaugh bbde5bead2 Revert "Fix simulation model dialog issues."
This reverts commit 3f5babd0c9.

Apparently there was another commit prior to this that has not yet been
cherry picked.
2025-06-05 16:18:40 -04:00
Seth Hillbrand 6f295db04a If we can't load the KiCad, don't crash
We already fail the test, so just continue instead of segfaulting the qa

(cherry picked from commit ed67d37480)
2025-06-05 11:41:27 -07:00
Seth Hillbrand 15b525852b Split bar check for fp/symbols
(cherry picked from commit fbaf480351)
2025-06-05 11:41:18 -07:00
Wayne Stambaugh 3f5babd0c9 Fix simulation model dialog issues.
At some point ".\" was added as the default file text control string
which triggered a SPICE model library load.  This would fail every
time the dialog was loaded for the first time.

Clear the model list box when the SPICE model library fails to load.
This way a container out of bounds exception will not get thrown when
the  library model list contains stale model indices.

Technically this does not fix issue #21063 because the crash was fixed
by catching the invalid index exception.  It does prevent an annoying
modal dialog that blocks all of KiCad.

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

(cherry picked from commit 1eb76cb14d)
2025-06-05 14:07:22 -04:00
jean-pierre charras 2de6a4e0ab Eeschema: fix crash when trying to edit a non symbol field using U,V or F
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21072

(cherry picked from commit a04bead8b0)
2025-06-05 16:41:30 +02:00
jean-pierre charras 3645c6213a DSNLEXER: do not leave a member ( m_knowsBar ) uninitialized
It can break the footprint file parser and the embedded file parser

(cherry picked from commit c278deb9ef)
2025-06-05 13:22:43 +02:00
Seth Hillbrand 5eacca8b18 Handle unquoted strings that use the bar '|' character
We use this as part of the standard sexpr now.  But previously, if a
designer used the '|' character as part of a string with no spaces, it
would be entered unquoted into the file, which neccesitates special
handling

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21065
2025-06-04 10:54:06 -07:00
Seth Hillbrand b2bbee2375 Ensure text ${LAYER} resolves to text not fp layer
We were resolving the footprint variables first for text objects.  This
resulted in always seeing the footprint layer resolution instead of the
text object if the text object was in a footprint.  But this only
happened in the board, not the fp editor.  This harmonizes the display
2025-06-03 10:08:03 -07:00
Jeff Young 1a8d2017ee Differentiate between FP previews and FP editor for 3D viewer settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21053

(cherry picked from commit 2e87a04358)
2025-06-03 16:12:15 +01:00
Mark Roszko 2a3eae74c0 Edit vcpkg-configuration.json 2025-06-03 15:10:10 +00:00
Wayne Stambaugh 0382619fbb Coding policy fixes.
(cherry picked from commit fe20f685c2)
2025-06-03 09:28:39 -04:00
Wayne Stambaugh 9135236e57 Honor escape key policy for sheet pin synchronization dialog.
(cherry picked from commit 1cef61c34f)
2025-06-03 09:27:24 -04:00
Marek Roszko c88ec23177 Fix format string
Because the var is a int and %zu is for size_t
2025-06-03 07:44:47 -04:00
Mark Roszko 835c939153 Fix kicad-cli pcb export pdf --mode-multipage
So it generates one PDF instead of multiple PDFs


(cherry picked from commit c519a6b827)

Co-authored-by: Salvador E. Tropea <salvador@inti.gob.ar>
2025-06-03 11:42:09 +00:00
Seth Hillbrand 6988d48250 Fix crash when loading footprints with bezier
We don't have an m_board with design settings, so this can be null and
crash unless we protect it
2025-06-02 17:09:24 -07:00
Wayne Stambaugh 694812b8b3 Fix incorrect board editor text box bitmap button sizes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21050

(cherry picked from commit 473ceb90cc)
2025-06-02 16:00:37 -04:00
Jeff Young bb83c74d67 Treat stacked pins as a single item in 4-way connection test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20532
2025-06-02 12:51:27 +01:00
Jeff Young a109853392 Manually cherry-pick Altium importer performance fixes. 2025-06-01 21:25:19 +01:00
jean-pierre charras 88ad461514 Revert "SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc."
This reverts commit 8279276fe4.
This commit is probably good, but arc calculations are a mined field.
So revert until is is widely tested in master branch.
2025-06-01 20:14:37 +02:00
Alex Shvartzkop 89b8b37af2 Update translations 2025-06-01 20:43:07 +03:00
dsa-t 6f994eb052 Translated using Weblate (Russian)
Currently translated at 99.9% (10063 of 10064 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-06-01 19:42:02 +02:00
Alex Shvartzkop 69e2422524 Fix string. 2025-06-01 19:54:03 +03:00
Alex Shvartzkop 092b8086d3 Fix string. 2025-06-01 19:52:06 +03:00
Alex Shvartzkop 6493269012 Update translations 2025-06-01 19:42:28 +03:00
dsa-t 1873713b6d Translated using Weblate (Tamil)
Currently translated at 99.4% (10001 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-06-01 18:41:06 +02:00
dsa-t 5340134a7a Translated using Weblate (Tamil)
Currently translated at 99.4% (10000 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-06-01 18:39:24 +02:00
தமிழ்நேரம் b3a97cd387 Translated using Weblate (Tamil)
Currently translated at 99.4% (10001 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-06-01 18:39:24 +02:00
co8 j 2a90bf84de Translated using Weblate (Japanese)
Currently translated at 99.7% (10039 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-06-01 18:39:24 +02:00
Jan Straka 515b9c416d Translated using Weblate (Czech)
Currently translated at 77.9% (7842 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/cs/
2025-06-01 18:39:24 +02:00
Morad Tamer 39dee3bbaa Translated using Weblate (Arabic)
Currently translated at 1.1% (112 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ar/
2025-06-01 18:39:24 +02:00
aris-kimi e013fe5c7a Translated using Weblate (Greek)
Currently translated at 85.9% (8647 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/el/
2025-06-01 18:39:23 +02:00
Sárkány Lőrinc ba17ba2dd5 Translated using Weblate (Hungarian)
Currently translated at 27.4% (2757 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-01 18:39:23 +02:00
Henrik Kauhanen 5c8256fdd4 Translated using Weblate (Swedish)
Currently translated at 99.9% (10052 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-06-01 18:39:23 +02:00
dsa-t 471396ef5c Translated using Weblate (Russian)
Currently translated at 99.5% (10015 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-06-01 18:39:23 +02:00
Hildo Guillardi Júnior 014ff5dab7 Translated using Weblate (Portuguese)
Currently translated at 91.4% (9199 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-06-01 18:39:23 +02:00
ZbeeGin 8719c8d050 Translated using Weblate (Polish)
Currently translated at 99.6% (10020 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-06-01 18:39:23 +02:00
Anonymous 635cbe135c Translated using Weblate (Hungarian)
Currently translated at 27.3% (2756 of 10060 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-06-01 18:39:23 +02:00
jean-pierre charras 8279276fe4 SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc.
The old algo worked fine only if the arc "middle point" was on the middle
of the arc. This algo just needs a "middle point" on the arc, not necessary
exactly near the middle of the arc.

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

(cherry picked from commit 2124f2b846)
2025-06-01 11:20:16 +02:00
Jeff Young 9efd04bb91 Retire old fix in favour of enlarged grid rows.
(This should prevent vertical scrolling which is
what makes it look like the text disappears.  the
problem with using a GRID_CELL_TEXT_EDITOR is that
it doesn't support auto-complete.)

(cherry picked from commit b5e7371275)
2025-06-01 09:47:52 +02:00
Jeff Young 2a1b02c154 Read Altium's showName property for fields.
Also fixes a potential crash bug in schematic
cleanup when breaking lines that are part of a
group.

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

(cherry picked from commit 65dfee161b)
2025-05-31 22:15:42 +01:00
Jeff Young cab050609d ADDED: field options for Update PCB from Schematic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21021

(cherry picked from commit 4a21da6b27)
2025-05-31 11:12:47 +01:00
Jeff Young ee62366607 Remove selection before notifying grid of deletion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20747

(cherry picked from commit a1cc6403bd)
2025-05-31 11:03:59 +01:00
Jon Evans 0ff77bd332 API: Use net names, not codes, and allow creating new nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21027
2025-05-30 22:12:19 -04:00
JamesJCode 580da82c37 Further DRC net class and component class match improvements
- Implements wildcard matching for constituent component classes
- Implements wildcard matching for effective net and component class names

(cherry picked from commit 41601e9c2f)
2025-05-29 22:00:40 +01:00
Alex Shvartzkop 5b62160369 Update translations 2025-05-29 21:51:04 +03:00
CloverGit ba955c8716 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10007 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-05-29 20:49:10 +02:00
Sárkány Lőrinc 84b1c5cec0 Translated using Weblate (Hungarian)
Currently translated at 27.4% (2757 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:10 +02:00
Marco Ciampa a78716656d Translated using Weblate (Italian)
Currently translated at 99.8% (10033 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/it/
2025-05-29 20:49:10 +02:00
Sárkány Lőrinc feb004b440 Translated using Weblate (Hungarian)
Currently translated at 27.3% (2752 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:10 +02:00
Pferd O eb4b665a00 Translated using Weblate (German)
Currently translated at 99.3% (9976 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-05-29 20:49:10 +02:00
weblateuser 428aaae1a9 Translated using Weblate (German)
Currently translated at 99.3% (9976 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-05-29 20:49:10 +02:00
CloverGit 5c359f6e56 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10007 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-05-29 20:49:10 +02:00
EdizonTN 305b8561c3 Translated using Weblate (Slovak)
Currently translated at 55.8% (5611 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sk/
2025-05-29 20:49:10 +02:00
Marco Ciampa 2455dc2506 Translated using Weblate (Italian)
Currently translated at 99.7% (10018 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/it/
2025-05-29 20:49:09 +02:00
Sárkány Lőrinc 0cf784f549 Translated using Weblate (Hungarian)
Currently translated at 27.1% (2724 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:09 +02:00
EdizonTN 1114790f0d Translated using Weblate (Slovak)
Currently translated at 55.7% (5600 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sk/
2025-05-29 20:49:09 +02:00
Sárkány Lőrinc 7e1f96779a Translated using Weblate (Hungarian)
Currently translated at 26.7% (2691 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:09 +02:00
___davidpr 3b8efad151 Translated using Weblate (Serbian)
Currently translated at 8.8% (890 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sr/
2025-05-29 20:49:09 +02:00
Sárkány Lőrinc 8f4f5e3c24 Translated using Weblate (Hungarian)
Currently translated at 26.5% (2668 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:09 +02:00
ZbeeGin 6518a00b33 Translated using Weblate (Polish)
Currently translated at 99.6% (10010 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-05-29 20:49:09 +02:00
Sárkány Lőrinc a11da42cb2 Translated using Weblate (Hungarian)
Currently translated at 26.4% (2655 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:09 +02:00
Sárkány Lőrinc 386be3a3cf Translated using Weblate (Hungarian)
Currently translated at 23.0% (2318 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:09 +02:00
Pferd O 22beab8224 Translated using Weblate (German)
Currently translated at 99.2% (9973 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-05-29 20:49:09 +02:00
Henrik Kauhanen 3e4e318995 Translated using Weblate (Swedish)
Currently translated at 99.9% (10039 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-05-29 20:49:08 +02:00
dsa-t 1d515a4609 Translated using Weblate (Russian)
Currently translated at 99.6% (10005 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-05-29 20:49:08 +02:00
Sárkány Lőrinc 693c435473 Translated using Weblate (Hungarian)
Currently translated at 22.2% (2233 of 10045 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-29 20:49:08 +02:00
dsa-t 45b6ea1614 Remove outdated GTK hack.
It is no longer needed with wx 3.2, and causes problems on themes like Adapta.

See https://gitlab.com/kicad/code/kicad/-/issues/9019


(cherry picked from commit 8550394cca)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-05-29 20:46:04 +03:00
Alex Shvartzkop 830b963b3a Fix wxStyledTextCtrl in field properties dialog on MSW.
The sunken border was included in the size calculation on Windows, causing the same visibility bug.

Use a panel with a border that wraps the control instead.
2025-05-29 12:28:29 +03:00
Alex Shvartzkop 6a003b94d6 Unset PCM button to avoid crash on close. 2025-05-29 12:28:29 +03:00
Jeff Young a92ac0ea99 Restore missing gutter between columns. 2025-05-29 09:23:05 +01:00
Tomasz Wlostowski fcd8419185 router: make sure we are not committing VIAs with non-unique IDs, fixes random disappearing via issue
Note to self:
LINE_PLACER::FixRoute used to silently reclaim the UID of the transient via (as used by the SHOVE's heads tracking logic).
Depending on the particular sequence of user events (the bug is next to impossible to reproduce on a touchpad), this would
result in freshly placed vias disappearing...

Fixes https://gitlab.com/kicad/code/kicad/issues/20999

(cherry picked from commit c5a4f9e747)
2025-05-28 21:34:12 -04:00
Alex Shvartzkop aeb124294e Protect against concurrent wxPlatformInfo access at startup.
wxPlatformInfo is not thread-safe.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21002
2025-05-28 21:26:53 +03:00
Alex Shvartzkop 11d1e50bfc Fix text disappearing in field properties dialog for Value.
Also keeps vertical alignment by increasing descent.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14379
2025-05-28 20:36:51 +03:00
Jeff Young c4fdf9feeb Fix Scintilla vertical scrolling issue.
(At least on MacOS.  *May* also fix GTK.)

(cherry picked from commit c5947d8901)
2025-05-28 19:31:28 +03:00
Jeff Young c5fb2283b6 Fix ambigious cast build error on msvc 2025-05-27 14:09:32 +01:00
Marek Roszko 073a2e6769 Fix ambigious cast build error on msvc 2025-05-27 06:51:46 -04:00
Jon Evans 52e9cdde99 PNS: Fix early exit from followTrivialPath
Don't mark a segment as visited until the
start of the next loop.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20379
2025-05-26 22:46:51 -04:00
Jon Evans d1e4b03ec1 API: Add CheckPadstackPresenceOnLayers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20587
2025-05-26 21:46:21 -04:00
Jon Evans 9466cab585 API: Don't set human-readable path that isn't actually 2025-05-26 20:05:16 -04:00
Jon Evans a63758e1e6 API: Add symbol path for footprint instances
See https://gitlab.com/kicad/code/kicad-python/-/issues/37


(cherry picked from commit 4dd39976a3)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 18:29:35 -04:00
Jeff Young faf6db6972 Fix faulty logic for setting range.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20982

(cherry picked from commit aa49b0319a)
2025-05-26 21:45:59 +01:00
Jeff Young d7a0555780 Fix a bunch more bugs in bezier approximation.
(cherry picked from commit e8e7282fe1)
2025-05-26 21:44:41 +01:00
Jeff Young 29d0cdb546 Use maxError when converting bezier to polyline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20312

(cherry picked from commit e44c5a7fcd)
2025-05-26 21:44:41 +01:00
Graham Keeth 4634705f1c Sim: correctly netlist AM/SFFM current sources
AM and SFFM current sources were being netlisted as voltage sources due
to the wrong prefix being added.

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

(cherry picked from commit 6bb3fc39df)
2025-05-26 21:44:41 +01:00
Jon Evans 81ea108d8c Don't bypass empty visibility recovery due to migration
In some situations, loading a project in 8.0 would wipe the
object visibility settings but the local settings also
require a format migration.  The migrator was adding visibility
for the shapes layer in this situation, bypassing the recovery
from having no objects visible.
2025-05-26 15:19:23 -04:00
JamesJCode d928a2a0e3 Re-implement wildcard matches for netclass constituents in DRC evaluation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20955

(cherry picked from commit 7176dbe6dc)
2025-05-26 19:49:25 +01:00
jean-pierre charras 44543cf30c Fix a compil warning.
(cherry picked from commit 5f17a7b024)
2025-05-26 10:45:41 +02:00
jean-pierre charras 3aa4f8a1f1 Simulator fix error message or crash in user-defined signal dialog
It happens when deleting all chars using backspace key

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

(cherry picked from commit 134e3140ff)
2025-05-25 18:57:15 +02:00
Jeff Young b7a8da81a9 Better and more complete recursion guards.
(ie: ones that actually work.)

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

(cherry picked from commit ed1b4f6e5a)
2025-05-25 08:17:23 +01:00
Jeff Young e7fa890ccc Fix typo in comparator.
(cherry picked from commit 1c8f971789)
2025-05-24 22:44:10 +01:00
Jeff Young 9aa644d437 Fix recursion issues with text variables.
1) Pass aDepth down through those versions of
CreateModel() which expand text variables

2) Be aware that unresolved text variables look
just like unexpanded text variables.

(cherry picked from commit 61d36f9d29)
2025-05-24 22:44:02 +01:00
Jeff Young e017447151 Add autocomplete for OP:power.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20984

(cherry picked from commit aae4833c94)
2025-05-24 22:42:41 +01:00
Marek Roszko 9d07784835 Show [read-only] in the title bar based on the project's state 2025-05-24 16:10:52 -04:00
Marek Roszko 2d8c805107 Ensure symbol pins are sorted before infering spice pin mapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20590
2025-05-24 14:41:13 -04:00
Marek Roszko f35078cb29 Prevent crash on failure to load ngspice's dll
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20695
2025-05-24 00:16:40 -04:00
Marek Roszko 10c7796336 Prevent oob string access in SCH_REFERENCE::IsSplitNeeded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20948
2025-05-24 00:01:16 -04:00
Marek Roszko 2bdc7d4872 Fix tuning patterns (generators) not being arrayed properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20617
2025-05-23 21:46:51 -04:00
Marek Roszko f7e851178e Add a simple hash for sch_tables to avoid too much reordering in the saved schematic file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20918
2025-05-23 21:31:51 -04:00
Seth Hillbrand 6d1bf799ff Avoid deref on missing part
We do not always have the LIB_SYMBOL set in a SCH_SYMBOL, so avoid
trying to get the embedded files from it

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

(cherry picked from commit 9d32de5154)
2025-05-23 17:04:28 -07:00
Mark Roszko 74819babf1 Load the saved rule area uuid back in
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/20918


(cherry picked from commit 5e4ad048e2)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-23 23:51:50 +00:00
jean-pierre charras 7abfda2b4f 3D viewer: do not change anything in the board shared by the FP editor.
Especially, the BOARD managed by FP editor had is m_project member reinitialized
when creating the 3D viewer, thus creating issues in FP editor, and create
a crash when closing kicad

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

(cherry picked from commit 6a9b427562)
2025-05-23 15:58:54 +02:00
Mark Roszko 64b40c7f49 Update vcpkg dependencies 2025-05-23 00:11:07 +00:00
Jeff Young 324f5e1127 Timestamps for altium footprint libs.
(cherry picked from commit afce3eb2d9)
2025-05-22 10:20:35 -07:00
Zenn Geeraerts 75a8b35581 Use case insensitivity when loading Altium files
Altium is case insensitive, so our match for internal names should be also

(cherry picked from commit d31eeb5c1b)
2025-05-22 10:20:35 -07:00
Seth Hillbrand 13442a8f91 Import Altium Projects
Handle Altium project file format

Parse individual schematic files and layout files
Create top-level schematic file
Link imported UUIDs between schematic symbol and footprints based on
refdes
Create KiCad project
Map Altium layout layers between KiCad

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

(cherry picked from commit e81956f292)
2025-05-22 10:09:02 -07:00
Wayne Stambaugh 55fbae6083 Make directive label text color behave like other labels.
Label text color will inherit from the assigned net class.  Apparently
this was overlooked when the directive labels were implemented.

(cherry picked from commit 19cb41722a)
2025-05-21 13:24:11 -04:00
Alex Shvartzkop 895ed8dd9e Update translations 2025-05-21 05:22:55 +03:00
Anonymous bd8b39260a Translated using Weblate (Tamil)
Currently translated at 99.3% (9951 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:26 +02:00
தமிழ்நேரம் 7cb5423cb9 Translated using Weblate (Tamil)
Currently translated at 99.3% (9952 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:10 +02:00
Sárkány Lőrinc 60fbfb7bf8 Translated using Weblate (Hungarian)
Currently translated at 21.4% (2152 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:10 +02:00
Pferd O c6c002bc5b Translated using Weblate (German)
Currently translated at 99.6% (9979 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-05-21 03:54:10 +02:00
தமிழ்நேரம் db5afbe9d4 Translated using Weblate (Tamil)
Currently translated at 90.6% (9077 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:10 +02:00
Jason Son 1236646ac0 Translated using Weblate (Korean)
Currently translated at 98.4% (9856 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ko/
2025-05-21 03:54:09 +02:00
Sárkány Lőrinc bc15fad57f Translated using Weblate (Hungarian)
Currently translated at 15.1% (1516 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:09 +02:00
தமிழ்நேரம் 7d85981f1a Translated using Weblate (Tamil)
Currently translated at 64.2% (6432 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:09 +02:00
Sárkány Lőrinc 38abbba4b5 Translated using Weblate (Hungarian)
Currently translated at 14.8% (1490 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:09 +02:00
தமிழ்நேரம் 636255faca Translated using Weblate (Tamil)
Currently translated at 53.9% (5408 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:09 +02:00
Sárkány Lőrinc 010f65fd32 Translated using Weblate (Hungarian)
Currently translated at 14.2% (1430 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:09 +02:00
CloverGit 01a3c22b37 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10011 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-05-21 03:54:09 +02:00
தமிழ்நேரம் 12f0dc48c7 Translated using Weblate (Tamil)
Currently translated at 48.4% (4848 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-05-21 03:54:09 +02:00
Sárkány Lőrinc 575c8490c7 Translated using Weblate (Hungarian)
Currently translated at 13.7% (1375 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:09 +02:00
Sárkány Lőrinc 9936e128a6 Translated using Weblate (Hungarian)
Currently translated at 10.4% (1044 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-05-21 03:54:09 +02:00
Tevfik Bagcivan 8e65595d54 Translated using Weblate (Turkish)
Currently translated at 65.1% (6521 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-05-21 03:54:09 +02:00
Pferd O 595a44d026 Translated using Weblate (German)
Currently translated at 99.6% (9977 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-05-21 03:54:09 +02:00
Jan Straka 47cc393908 Translated using Weblate (Czech)
Currently translated at 78.1% (7830 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/cs/
2025-05-21 03:54:09 +02:00
Adolfo Jayme Barrientos 617519046c Translated using Weblate (Catalan)
Currently translated at 42.1% (4217 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ca/
2025-05-21 03:54:08 +02:00
Ivan Chuba 679bd9ece9 Translated using Weblate (Ukrainian)
Currently translated at 76.6% (7673 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-05-21 03:54:08 +02:00
2tama3 e7d2fd5029 Translated using Weblate (Japanese)
Currently translated at 100.0% (10016 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-05-21 03:54:08 +02:00
Adolfo Jayme Barrientos f1e478bd80 Translated using Weblate (Catalan)
Currently translated at 42.0% (4214 of 10016 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ca/
2025-05-21 03:54:08 +02:00
Alex Shvartzkop 4d3ac103ad Improve performance of SEG::Contains.
(cherry picked from commit a82916f4db)
2025-05-20 15:14:10 -07:00
Seth Hillbrand b47bf99632 Safety valve for integer sqrt
If the value is negative, we have likely overflowed the available size
of the integer container.  In which case, rather than slowly counting
down, we return the largest logical square root size to allow processing
to continue

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20947
2025-05-20 15:14:07 -07:00
Seth Hillbrand de5f65d18e Dijkstra's only works with positive weights
Overlapping limits break the assumptions of the algorithm.  We limit the
weights here to only positive numbers and protect the actual alg should
any sneak past

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

(cherry picked from commit 0c23868ac2)
2025-05-19 17:57:29 -07:00
Alex Shvartzkop f1738069f9 Slightly optimize creepage DRC.
See https://gitlab.com/kicad/code/kicad/-/issues/20827

(cherry picked from commit 1fe5addafb)
2025-05-19 17:57:19 -07:00
Seth Hillbrand d6607146c4 Fix silk board edge collision case
First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle).  We were not checking this result in the QA, so add the
proper tests

(cherry picked from commit 9bedb6eedb)
2025-05-19 17:49:18 -07:00
Wayne Stambaugh 8b44bc1344 Fix a cadre of symbol pin alternate issues.
Prevent the file formatter from writing and the file parser from loading
symbol pin alternates that have an empty name or when the alternate name
is the same as the default pin name.  Apparently at some point they were
able to be created and saved.

Do not allow SCH_PIN::SetAlt() to set an alternate name when the name
does not exist in the library symbol pin alternate list.  This required
fixing the associated QA test.

When updating or changing schematic symbols from library, reset the pin
alternate to the default when the alternate no longer exists in the
symbol.

Do not populate pin alternates context menu with duplicate default pin.

Clear orphaned pin alternates to the default when saving symbols from
symbol editor.

(cherry picked from commit d16d2f5a5b)
2025-05-18 07:18:44 -04:00
Wayne Stambaugh de0394bf38 Fix update symbol from library when alternate pins are in play.
ADDED: An option in the update symbol dialog to reset alternate pins to
       their default value.

Don't set the symbol alternate pin when the updated symbol no longer
contains the alternate pin name.

Clear the alternate pin name when it's set to the default pin name.  This
is caused by a bug somewhere which hasn't been resolved and it causes the
library symbol comparison to fail when it's set.

This also changes the change/update symbol dialog layout.  Adding another
option check box was making the dialog too tall.  The option check boxes
were split into two columns which made the dialog wider.  It might be
worth using another wxCheckListBox for the options as more are added.

(cherry picked from commit 46b24a5b68)
2025-05-18 07:18:15 -04:00
Seth Hillbrand 62e1169492 When cycling next/prev selection, keep only single
We want to have only the current item in the selection rather than all
of them
2025-05-16 09:25:04 -07:00
Seth Hillbrand 6c09957799 Properly use optional
By dereferencing first, we force a get() on the optional and try to pass
that to a routine that takes an optional parameter.  Just passing the
optional reference protects against accessing an invalid

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20934
2025-05-16 08:53:59 -07:00
dsa-t bdf459f19f Use ToCDouble in ValueStringCompare.
(cherry picked from commit d59ffdcaa3)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-05-16 04:11:35 +03:00
Olliver Schinagl 0d88a985b7 export_vrml: Fix 3D model destination timestamp check
Not all hosts have `wxHAS_HUGE_FILES` enabled, which causes us to drop
millisecond resolution accuracy. In some cases, this can cause
race-conditions with externally generated components such as by KiBot
(which generates THT components with color bands on the fly), which runs
so fast, that we fall within a second resolution.

When setting the destination timestamp, there's only two valid options.
Either the destination file exists, and if it does, we use the
destination file's timestamp (current behavior) or it does not exist, in
which case we should use an 'invalid' (null, NaN, whatever).

Calling the constructor sets this up correctly and then only setting the
timestamp if the file exists. Nothing else.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20877
(cherry picked from commit cf3dbfbbe6)
2025-05-15 11:30:59 -07:00
Seth Hillbrand 8993656e72 Do not insert newlines in single line controls
2d2f443aa4 allowed the use of shift-enter
when creating tables for newlines.  However, this should not be applied
to all text controls.  We split the ones by IsMultiLine to determine if
the shift-return is a newline or a dialog close

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

(cherry picked from commit 8a0e9bef5a)
2025-05-14 17:13:47 -07:00
Seth Hillbrand ac5de5e938 Revise hierarchical sorting
The lexicographical sort for hierarchical pages needs to satisfy the
following:
- Ensure a parent comes before all its children
- Ensure all children with the same parent are sorted by page number
- Ensure all of a parent's children come before the parent's next sibling

To do this, we need to compare at each path level before descending

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

(cherry picked from commit e06e60882d)
2025-05-14 16:46:15 -07:00
Seth Hillbrand f44157657c Fix how blind/buried vias are handle in IPC356
Code 307 is used for blind/buried vias.  Additionally, the access layer
is represented based on sequential layer numbers and needed to be
adjusted for new layer numbering

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

(cherry picked from commit 4a896f84f5)
2025-05-14 15:59:36 -07:00
Jeff Young 51b99e8f10 Only report single-file issues in single-file-mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20891

(cherry picked from commit 085af89381)
2025-05-14 16:31:11 +01:00
Maciej Suminski 84a0f22250 altium: do not reshape NPTH pads to match the holes
Resizing pads affects also their solder mask and solder paste patterns,
admittedly in some unusual footprints.

(cherry picked from commit 5147fd9829)
2025-05-14 16:30:53 +01:00
Jeff Young f21c9ea31c Don't report missing color theme in B&W mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20923
2025-05-14 15:39:16 +01:00
Jeff Young 4759b04667 CHANGED: exclude heatsink pads from courtyard collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20454

(cherry picked from commit d691a257b2)
2025-05-14 11:06:13 +01:00
Jeff Young 88700ba4cc Read/write chaining tolerance to job params.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20906

(cherry picked from commit f690b42b53)
2025-05-14 11:05:41 +01:00
Jeff Young e501181f2d Search board layer names when plotting Gerbers from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20904

(cherry picked from commit 420b253ac4)
2025-05-14 11:05:15 +01:00
Seth Hillbrand afec66d478 Fix usage of PCB_FIELD( PCB_TEXT& )
Passing a pointer to the CTOR invokes the PCB_FIELD( BOARD_ITEM* ) ctor,
which is not what is intended.  Passing just the reference is better but
still ends up creating a PCB_FIELD class with type PCB_TEXT because it
didn't correctly set the type.  So we need to properly set our type and
our parent, then copy the text attributes over.  We can't use the
default copy operator because this also copies the struct_id of PCB_TEXT

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

(cherry picked from commit 750dbe6336)
2025-05-13 17:51:08 -07:00
jean-pierre charras 8aff85d3ff Pcbnew, DIALOG_SHAPE_PROPERTIES: fix an issue noticeable with POLY shapes.
After editing a polygon, the pointers m_parent and m_group where cleared.
They are now restored (like for other shapes).

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

(cherry picked from commit 848a6b6930)
2025-05-13 11:32:20 -07:00
jean-pierre charras 0bf415a266 Footprint chooser: fix crash when closing the dialog with a large footprint.
The crash was perhaps due to use after delete of data in DTOR functions, when
a footprint with a **lot** of graphics was loaded and the view cleared.
The view is now cleared before any other deletion.

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

(cherry picked from commit 63babb1a22)
2025-05-13 16:18:31 +02:00
Jeff Young 0dde037ab9 Update CLI gold files with higher arc definition. 2025-05-13 14:19:00 +01:00
Jeff Young 241959bca3 Slice() must also support aMaxError.
In some cases arcs are re-inserted.
2025-05-13 12:02:21 +01:00
Jeff Young bfa61dc8ad Third go at fixing the kimath test.
(cherry picked from commit 7f4853b8a5)
2025-05-13 10:10:46 +01:00
Jeff Young e4527bd1fe Another go at fixing the kimath test.
(cherry picked from commit acf1dca1e1)
2025-05-13 10:10:43 +01:00
Jeff Young 1520883182 Formatting.
(cherry picked from commit a95f5172c9)
2025-05-13 10:10:41 +01:00
Jeff Young 427d4173b1 Allow math tests to run with their own precision.
(cherry picked from commit 32cd142c39)
2025-05-13 10:10:34 +01:00
Jeff Young 19af8419b3 Update Cadstar gold file for increased precision.
(cherry picked from commit f54ae5246c)
2025-05-13 10:10:31 +01:00
Jeff Young 90c8c8b243 Formatting.
(cherry picked from commit c3a0621dfb)
2025-05-12 20:49:04 +01:00
Jeff Young 61f790df70 Use native arcs (not approximated ones) when converting circles to polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20895

(cherry picked from commit b70d3586c9)
2025-05-12 20:48:59 +01:00
Jeff Young f334a9a3bd Use a high definition for display of arcs in SHAPE_LINE_CHAINs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20895

(cherry picked from commit 3474e962d5)
2025-05-12 20:48:54 +01:00
Jeff Young 0ee2685ab6 Use consistent terminology and types.
(cherry picked from commit 6757ba8165)
2025-05-12 20:48:48 +01:00
Jeff Young 9e17baecbc Plot drill marks on mask layers if the pad exists there.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20859

(cherry picked from commit 5e6ef67fce)
2025-05-10 19:11:56 +01:00
jean-pierre charras 3900d8e231 Pcbnew: fix an issue that prevent to write the right layer type in brd files
In layers block, the file type for User.n was always written as "user" type.
However this type can be set to "front" or "back" by the board settings
dialog (Off-board, front or Off-board, back) and allowed in file.

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

(cherry picked from commit db23ee481c)
2025-05-10 17:01:30 +02:00
Seth Hillbrand cd3fea196c Check for valid board before query
New items may not have a board set and will return nullptr

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20893
2025-05-09 13:45:13 -07:00
Seth Hillbrand 15a71319d6 Avoid assertion on invalid page
Not all version of the dialog have tabs, so -1 is stored for these,
which does not exist in the notebook and should not be restored
2025-05-09 13:45:04 -07:00
Seth Hillbrand e387635edf Don't overwrite explicit sizes unless needed
We already did this for single-ended, this extends to dp routes

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

(cherry picked from commit c06ddf966d)
2025-05-09 13:32:55 -07:00
Wayne Stambaugh 4b009b0698 Fix ERC QA failures caused by hierarchical label root sheet test.
(cherry picked from commit bebc9669ad)
2025-05-09 15:33:26 -04:00
Seth Hillbrand 0a9d29ee3b Prevent backspace from re-filtering nets
Makes adjusting autofilled nets more pleasant.

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

(cherry picked from commit e0e1971bd6)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20894
2025-05-09 11:35:12 -07:00
Seth Hillbrand 75fa0ab0c9 Fix infinite loop in QuasiModal
Now that we use RAII nuller, we need to avoid the case where
m_qmodal_loop is nulled before it ends
2025-05-09 09:36:58 -07:00
Seth Hillbrand 914cf86d5e Make sure we re-hide hidden fields
Fields that are forced to be shown need to be re-hidden when the find
dialog closes.  While they are _also_ brightened, this flag may be
cleared by other processes, so we need to test for the forced visibility
as well.

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

(cherry picked from commit fc6f1f41d2)
2025-05-08 16:48:18 -07:00
Seth Hillbrand c6914605ef Remove errant printf 2025-05-08 15:55:56 -07:00
Seth Hillbrand 5616b9c266 Prevent overriding existing track width
Avoids resizing existing tracks to match new track.  Adds new parameter
to AssembleLine to allow current behavior while only preventing width
overrides when creating new lines

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

(cherry picked from commit 4a41f4a525)
2025-05-08 12:44:19 -07:00
Seth Hillbrand e6b4c0c7a7 Don't show warning when avoiding frozen panel
The event is expected, so we just need to return without error
2025-05-08 12:44:19 -07:00
Seth Hillbrand 6a8e1b1135 Add ability to quickly move through nets
After highlighting a net (`), press Tab to quikcly move to the next item
on the net and Shift-Tab to move to the previous

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

(cherry picked from commit 1e9cf4e3d7)
2025-05-08 12:44:19 -07:00
JamesJCode d29d5e77fe Fix broken placement of SCH_DIRECTIVE_LABELs
(cherry picked from commit c7cec5f21a)
2025-05-08 12:44:19 -07:00
Seth Hillbrand 1a7159bb09 Allow multi label input
This is a re-implementation of 39c2745f55
that was removed by e5089d783d

This implementation works in the tool, containing side effects
(hopefully) better than the initial implementation.  The multiple labels
are input as multiple lines instead of labels with spaces, allowing for
copy/paste between spreadsheets of labels

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

(cherry picked from commit 6f6ca2a35f)
2025-05-08 12:44:19 -07:00
Seth Hillbrand 58461d5925 Update search dialog
Allow regular expression in search and replace
Allow searching netnames including nets contained in buses

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

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

(cherry picked from commit aff0ad971f)
2025-05-08 12:44:19 -07:00
Wayne Stambaugh 5cb956f61b Test for hierarchical labels in root sheet when running ERC.
Hierarchical labels in the root sheet cannot be attached to a parent sheet
pin.  By definition they are unconnected.

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

(cherry picked from commit 6dcac5bded)
2025-05-08 14:45:23 -04:00
Wayne Stambaugh c1b9d5fd85 Fix broken select connection behavior.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19790

(cherry picked from commit 93cac7d0a5)
2025-05-08 14:38:44 -04:00
jean-pierre charras ae321bf186 Eeschema, Net Navigator: fix incorrect refresh of nets tree.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20648

(cherry picked from commit cc75b511ba)
2025-05-08 11:42:16 +02:00
Jon Evans 2fe7fa3b54 API: Use action wrapper for setting grid origin
Fixes https://gitlab.com/kicad/code/kicad-python/-/issues/47


(cherry picked from commit 71417fbe3b)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-07 23:29:36 -04:00
Seth Hillbrand a801b4ac8a Properly handle arc coupled items
When arcs do not share a center, the circle formed by the arc will be
closer on one side than the other.  When this happens, the NearestPoints
calculation was accidentally taking the distance from the wrong side of
the circle.

Note that this was likely due to the conventions for Rotate (positive =
reduce angle) being mixed up with angular addition

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

(cherry picked from commit 97296a3b08)
2025-05-07 14:56:26 -07:00
Jeff Young 1808cef013 Fix test failure. 2025-05-07 17:24:21 +01:00
Jeff Young 41ac949312 Skip same-net-checking for hole-to-hole collisions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20547

(cherry picked from commit b14472e105)
2025-05-07 14:11:19 +01:00
Jeff Young 8e983d7147 Also trim board item layersets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20063

(cherry picked from commit 8945bcc231)
2025-05-07 14:11:15 +01:00
Jeff Young e92c3a647f Trim library layers to instance board before comparing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20552

(cherry picked from commit da242ec3f3)
2025-05-07 14:10:30 +01:00
Jeff Young 6f0e548bd6 Don't expect a B item when evaling DIFF_PAIR_GAP_CONSTRAINT.
The checker first builds a map with only the
A items.

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

(cherry picked from commit ea8b0c0e8a)
2025-05-07 14:10:19 +01:00
Jeff Young f0b110bdb8 Formatting and reduced reliance on dyn_cast.
(cherry picked from commit 6307058ac8)
2025-05-07 14:10:16 +01:00
Jeff Young d4edee4897 Formatting.
(cherry picked from commit 6b08407bd5)
2025-05-07 14:10:03 +01:00
Jeff Young 8ac578c788 DRCEpsilon is generic. Zone knockouts need more specific values.
Each knockout can be approximated, and each knockout
will have m_ExtraClearance added.  If a neck is
between two knockouts, it will be 2X the above
values narrower than expected.

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

(cherry picked from commit 96522c4113)
2025-05-07 14:09:05 +01:00
Jeff Young a6dec68444 Attempt to fix older OCC version compile issue.
(cherry picked from commit 76d05efe7a)
2025-05-07 13:43:52 +01:00
Jeff Young 00f92c2188 Patch for gcc stupidity.
(cherry picked from commit edd858a4d2)
2025-05-07 13:43:45 +01:00
Jeff Young 67debb8257 Move STEP exporter error reporting to REPORTER interface.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20738

(cherry picked from commit e69c80f09d)
2025-05-07 13:43:40 +01:00
Jeff Young d3ac86a0dd Fix presumed copy/pasta when ensuring circles are circles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20567

(cherry picked from commit 75d9f708a8)
2025-05-07 13:42:19 +01:00
Jeff Young 00ba3e47f9 Ungroup before deleting items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20699

(cherry picked from commit 3f25b36ff1)
2025-05-07 13:41:23 +01:00
Jeff Young a9ac2c03cc unit==0 means all-units only for symbol children
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20663

(cherry picked from commit 5f0856e5d2)
2025-05-07 13:39:05 +01:00
Jeff Young 86da6633f8 Support URLs in Symbol Chooser info panel.
Also adds support for sim library fields as URLs.

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

(cherry picked from commit 34f2038a95)
2025-05-07 13:37:57 +01:00
Jeff Young f2ad3e66ac Formatting.
(cherry picked from commit a53a639523)
2025-05-07 13:34:49 +01:00
Jeff Young e0210d9b3a Fix various errors in intersecting zones test.
Also gives a clearer error message, and better
descriptions of named zones.

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

(cherry picked from commit 5573dce448)
2025-05-07 13:34:17 +01:00
Mark Roszko 8ccc548628 Add missing numpy requirement to tests/requirements.txt
(cherry picked from commit 83f9dc56d0)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-07 00:13:44 +00:00
Mark Roszko 6eecfaf64e Swap windows path chars in FILENAME_RESOLVER::ResolvePath
This fixes the QA for issue13591 falsely passing on Linux.
It is actually failing this entire time.

But there is more wtfery going on, such as wxFFile::IsOpened returning True on a directory path.


(cherry picked from commit 157180e772)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-07 00:13:20 +00:00
Mark Roszko 6151a94f4e On Linux you can fopen (read) a directory for no reason, fix SafeReadFile to make it safer
TIL


(cherry picked from commit 883a1f8d97)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-07 00:12:56 +00:00
Wayne Stambaugh 82552059c0 Begin version 9.0.3 development. 2025-05-06 13:46:13 -04:00
752 changed files with 277811 additions and 226107 deletions
-1
View File
@@ -24,7 +24,6 @@ common/template_fieldnames_lexer.h
eeschema/schematic_keywords.*
pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h
pcbnew/dialogs/panel_setup_rules_help_*.h
Makefile
CMakeUserPresets.json
CMakeCache.txt
+19 -17
View File
@@ -475,26 +475,18 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
const float zpos_copperTop_front = m_layerZcoordTop[F_Cu];
// Fill not copper layers zpos
for( int layer_id = 0; layer_id < PCB_LAYER_ID_COUNT; layer_id++ )
for( int layer = 0; layer < PCB_LAYER_ID_COUNT; layer++ )
{
if( IsCopperLayer( (PCB_LAYER_ID)layer_id ) )
PCB_LAYER_ID layer_id = ToLAYER_ID( layer );
if( IsCopperLayer( layer_id ) )
continue;
float zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
float zposTop = zposBottom + m_frontCopperThickness3DU;
float zposBottom;
float zposTop;
switch( layer_id )
{
case B_Adhes:
zposBottom = zpos_copperTop_back - 2.0f * zpos_offset;
zposTop = zposBottom - m_nonCopperLayerThickness3DU;
break;
case F_Adhes:
zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
zposTop = zposBottom + m_nonCopperLayerThickness3DU;
break;
case B_Mask:
zposBottom = zpos_copperTop_back;
zposTop = zpos_copperTop_back - m_nonCopperLayerThickness3DU;
@@ -526,11 +518,21 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
break;
default:
if( m_board->IsBackLayer( layer_id ) )
{
zposBottom = zpos_copperTop_back - 2.0f * zpos_offset;
zposTop = zposBottom - m_nonCopperLayerThickness3DU;
}
else
{
zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
zposTop = zposBottom + m_nonCopperLayerThickness3DU;
}
break;
}
m_layerZcoordTop[(PCB_LAYER_ID)layer_id] = zposTop;
m_layerZcoordBottom[(PCB_LAYER_ID)layer_id] = zposBottom;
m_layerZcoordTop[layer_id] = zposTop;
m_layerZcoordBottom[layer_id] = zposBottom;
}
m_boardCenter = SFVEC3F( m_boardPos.x * m_biuTo3Dunits, m_boardPos.y * m_biuTo3Dunits, 0.0f );
@@ -784,7 +786,7 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
{
std::bitset<LAYER_3D_END> ret;
if( m_board && m_board->IsFootprintHolder() )
if( m_IsPreviewer )
{
if( m_Cfg->m_Render.preview_show_board_body )
{
+7 -1
View File
@@ -671,6 +671,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
addShape( static_cast<PCB_DIMENSION_BASE*>( item ), layerContainer, item );
break;
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break;
@@ -696,7 +699,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *copperPolys, 0, maxError, ERROR_INSIDE );
}
else
else if( item->Type() != PCB_REFERENCE_IMAGE_T )
{
item->TransformShapeToPolygon( *copperPolys, layer, 0, maxError, ERROR_INSIDE );
}
@@ -770,6 +773,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break;
}
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break;
@@ -544,9 +544,7 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetHitSelectionOnly( bool onlySelection )
long NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand( std::string commandId )
{
if( commandId.empty() )
{
return 0;
}
std::list<TOOL_ACTION*> actions = ACTION_MANAGER::GetActionList();
TOOL_ACTION* context = nullptr;
@@ -557,9 +555,7 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand( std::string commandId )
std::string nm = action->GetName();
if( commandId == nm )
{
context = action;
}
}
if( context != nullptr )
@@ -568,27 +564,21 @@ long NL_3D_VIEWER_PLUGIN_IMPL::SetActiveCommand( std::string commandId )
// Only allow command execution if the window is enabled. i.e. there is not a modal dialog
// currently active.
TOOLS_HOLDER* tools_holder = nullptr;
if( parent->IsEnabled() && ( tools_holder = dynamic_cast<TOOLS_HOLDER*>( parent ) ) )
if( parent && parent->IsEnabled() )
{
TOOL_MANAGER* tool_manager = tools_holder->GetToolManager();
TOOLS_HOLDER* tools_holder = dynamic_cast<TOOLS_HOLDER*>( parent );
TOOL_MANAGER* tool_manager = tools_holder ? tools_holder->GetToolManager() : nullptr;
if( tool_manager == nullptr )
{
if( !tool_manager )
return navlib::make_result_code( navlib::navlib_errc::invalid_operation );
}
// Get the selection to use to test if the action is enabled
SELECTION& sel = tool_manager->GetToolHolder()->GetCurrentSelection();
bool runAction = true;
if( const ACTION_CONDITIONS* aCond =
tool_manager->GetActionManager()->GetCondition( *context ) )
{
if( const ACTION_CONDITIONS* aCond = tool_manager->GetActionManager()->GetCondition( *context ) )
runAction = aCond->enableCondition( sel );
}
if( runAction )
{
@@ -115,6 +115,11 @@ public:
~BVH_PBRT();
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
// will only land us in trouble.
BVH_PBRT( const BVH_PBRT& ) = delete;
BVH_PBRT& operator=( const BVH_PBRT& ) = delete;
bool Intersect( const RAY& aRay, HITINFO& aHitInfo ) const override;
bool Intersect( const RAY& aRay, HITINFO& aHitInfo, unsigned int aAccNodeInfo ) const override;
bool Intersect( const RAYPACKET& aRayPacket, HITINFO_PACKET* aHitInfoPacket ) const override;
@@ -22,12 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file container_2d.h
*/
#ifndef _CONTAINER_2D_H_
#define _CONTAINER_2D_H_
#pragma once
#include "../shapes2D/object_2d.h"
#include <list>
@@ -71,8 +66,7 @@ public:
* @param aBBox The bounding box to test.
* @param aOutList The list of objects that intersects the bounding box.
*/
virtual void GetIntersectingObjects( const BBOX_2D& aBBox,
CONST_LIST_OBJECT2D& aOutList ) const = 0;
virtual void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const = 0;
/**
* Intersect and check if a segment ray hits a object or is inside it.
@@ -83,11 +77,11 @@ public:
virtual bool IntersectAny( const RAYSEG2D& aSegRay ) const = 0;
protected:
BBOX_2D m_bbox;
BBOX_2D m_bbox;
LIST_OBJECT2D m_objects;
private:
std::mutex m_lock;
std::mutex m_lock;
};
@@ -96,8 +90,7 @@ class CONTAINER_2D : public CONTAINER_2D_BASE
public:
CONTAINER_2D();
void GetIntersectingObjects( const BBOX_2D& aBBox,
CONST_LIST_OBJECT2D& aOutList ) const override;
void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const override;
bool IntersectAny( const RAYSEG2D& aSegRay ) const override;
};
@@ -119,28 +112,30 @@ public:
BVH_CONTAINER_2D();
~BVH_CONTAINER_2D();
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
// will only land us in trouble.
BVH_CONTAINER_2D( const BVH_CONTAINER_2D& ) = delete;
BVH_CONTAINER_2D& operator=( const BVH_CONTAINER_2D& ) = delete;
void BuildBVH();
void Clear() override;
void GetIntersectingObjects( const BBOX_2D& aBBox,
CONST_LIST_OBJECT2D& aOutList ) const override;
void GetIntersectingObjects( const BBOX_2D& aBBox, CONST_LIST_OBJECT2D& aOutList ) const override;
bool IntersectAny( const RAYSEG2D& aSegRay ) const override;
private:
void destroy();
void recursiveBuild_MIDDLE_SPLIT( BVH_CONTAINER_NODE_2D* aNodeParent );
void recursiveGetListObjectsIntersects( const BVH_CONTAINER_NODE_2D* aNode,
const BBOX_2D& aBBox,
void recursiveGetListObjectsIntersects( const BVH_CONTAINER_NODE_2D* aNode, const BBOX_2D& aBBox,
CONST_LIST_OBJECT2D& aOutList ) const;
bool recursiveIntersectAny( const BVH_CONTAINER_NODE_2D* aNode,
const RAYSEG2D& aSegRay ) const;
bool recursiveIntersectAny( const BVH_CONTAINER_NODE_2D* aNode, const RAYSEG2D& aSegRay ) const;
bool m_isInitialized;
private:
bool m_isInitialized;
std::list<BVH_CONTAINER_NODE_2D*> m_elementsToDelete;
BVH_CONTAINER_NODE_2D* m_tree;
BVH_CONTAINER_NODE_2D* m_tree;
};
#endif // _CONTAINER_2D_H_
@@ -23,12 +23,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file layer_item_2d.h
*/
#ifndef _LAYER_ITEM_2D_H_
#define _LAYER_ITEM_2D_H_
#pragma once
#include "object_2d.h"
#include <vector>
@@ -84,6 +79,11 @@ public:
~LAYER_ITEM_2D();
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
// will only land us in trouble.
LAYER_ITEM_2D( const LAYER_ITEM_2D& ) = delete;
LAYER_ITEM_2D& operator=( const LAYER_ITEM_2D& ) = delete;
// Imported from OBJECT_2D
bool Overlaps( const BBOX_2D& aBBox ) const override;
bool Intersects( const BBOX_2D& aBBox ) const override;
@@ -97,4 +97,3 @@ private:
const OBJECT_2D* m_objectC;
};
#endif // _LAYER_ITEM_2D_H_
+17 -13
View File
@@ -574,11 +574,25 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
{
applySettings( cfg );
if( !GetBoard()->GetProject() )
GetBoard()->SetProject( &Prj() );
m_boardAdapter.SetBoard( GetBoard() );
wxString legacyColorsPresetName = _( "legacy colors" );
if( LAYER_PRESET_3D* preset = cfg->FindPreset( legacyColorsPresetName ) )
{
// Something corrupts the legacy colours in 9.0, so just make sure that it always
// has the correct values.
*preset = { legacyColorsPresetName,
GetAdapter().GetDefaultVisibleLayers(),
GetAdapter().GetDefaultColors() };
}
else
{
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
GetAdapter().GetDefaultVisibleLayers(),
GetAdapter().GetDefaultColors() );
}
// When opening the 3D viewer, we use the OpenGL mode, never the ray tracing engine
// because the ray tracing is very time consuming, and can be seen as not working
// (freeze window) with large boards.
@@ -586,17 +600,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
if( cfg->m_CurrentPreset == LEGACY_PRESET_FLAG )
{
wxString legacyColorsPresetName = _( "legacy colors" );
cfg->m_UseStackupColors = false;
if( !cfg->FindPreset( legacyColorsPresetName ) )
{
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
GetAdapter().GetDefaultVisibleLayers(),
GetAdapter().GetDefaultColors() );
}
cfg->m_CurrentPreset = FOLLOW_PLOT_SETTINGS;
}
+29 -5
View File
@@ -236,7 +236,7 @@ APPEARANCE_CONTROLS_3D::~APPEARANCE_CONTROLS_3D()
wxSize APPEARANCE_CONTROLS_3D::GetBestSize() const
{
DPI_SCALING_COMMON dpi( nullptr, m_frame );
wxSize size( 220 * dpi.GetScaleFactor(), 480 * dpi.GetScaleFactor() );
wxSize size( 228 * dpi.GetScaleFactor(), 480 * dpi.GetScaleFactor() );
return size;
}
@@ -499,10 +499,27 @@ void APPEARANCE_CONTROLS_3D::onColorSwatchChanged( COLOR_SWATCH* aSwatch )
colors[ layer ] = newColor;
// The internals of the 3D viewer only supports a single color for copper, which must
// be applied to all copper layers.
COLOR_SWATCH* otherSwatch = nullptr;
if( layer == LAYER_3D_COPPER_TOP )
{
colors[ LAYER_3D_COPPER_BOTTOM ] = newColor;
otherSwatch = m_layerSettingsMap[LAYER_3D_COPPER_BOTTOM]->m_Ctl_color;
}
else if( layer == LAYER_3D_COPPER_BOTTOM )
{
colors[ LAYER_3D_COPPER_TOP ] = newColor;
otherSwatch = m_layerSettingsMap[LAYER_3D_COPPER_TOP]->m_Ctl_color;
}
if( otherSwatch )
{
// Don't send an event, because that will cause an event loop
otherSwatch->SetSwatchColor( newColor, false );
}
m_frame->GetAdapter().SetLayerColors( colors );
@@ -874,7 +891,8 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
if( cfg->m_CurrentPreset == name )
cfg->m_CurrentPreset = wxEmptyString;
m_presetMRU.Remove( name );
if( m_presetMRU.Index( name ) >= 0 )
m_presetMRU.Remove( name );
}
resetSelection();
@@ -957,7 +975,9 @@ void APPEARANCE_CONTROLS_3D::onViewportChanged( wxCommandEvent& aEvent )
if( !viewport->name.IsEmpty() )
{
m_viewportMRU.Remove( viewport->name );
if( m_viewportMRU.Index( viewport->name ) != wxNOT_FOUND )
m_viewportMRU.Remove( viewport->name );
m_viewportMRU.Insert( viewport->name, 0 );
}
}
@@ -993,7 +1013,9 @@ void APPEARANCE_CONTROLS_3D::onViewportChanged( wxCommandEvent& aEvent )
{
m_viewports[name].matrix = m_frame->GetCurrentCamera().GetViewMatrix();
index = m_cbViewports->FindString( name );
m_viewportMRU.Remove( name );
if( m_viewportMRU.Index( name ) != wxNOT_FOUND )
m_viewportMRU.Remove( name );
}
m_cbViewports->SetSelection( index );
@@ -1028,8 +1050,10 @@ void APPEARANCE_CONTROLS_3D::onViewportChanged( wxCommandEvent& aEvent )
{
m_viewports.erase( viewportName );
m_cbViewports->Delete( idx );
m_viewportMRU.Remove( viewportName );
}
if( m_viewportMRU.Index( viewportName ) != wxNOT_FOUND )
m_viewportMRU.Remove( viewportName );
}
if( m_lastSelectedViewport )
+6 -4
View File
@@ -18,8 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef APPEARANCE_CONTROLS_3D_H
#define APPEARANCE_CONTROLS_3D_H
#pragma once
#include <vector>
@@ -113,6 +112,11 @@ public:
APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent, wxWindow* aFocusOwner );
~APPEARANCE_CONTROLS_3D();
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
// will only land us in trouble.
APPEARANCE_CONTROLS_3D( const APPEARANCE_CONTROLS_3D& ) = delete;
APPEARANCE_CONTROLS_3D& operator=( const APPEARANCE_CONTROLS_3D& ) = delete;
wxSize GetBestSize() const;
void OnDarkModeToggle();
void OnLayerVisibilityChanged( int aLayer, bool isVisible );
@@ -189,5 +193,3 @@ private:
wxCheckBox* m_cbUseBoardStackupColors;
wxCheckBox* m_cbUseBoardEditorCopperColors;
};
#endif
+3 -2
View File
@@ -168,9 +168,9 @@
Thomas Gambier
Ashutosh Gangwar
Alessandro Gatti
Zenn Geeraerts
Alex Gellen
Robert Antoni Buj Gelonch
Robert Antoni Buj Genlonch
Hal Gentz
Lucas Gerads
Davide Gerhard
@@ -228,6 +228,7 @@
Mario Hros
Hubert Hu
Josue Huaroto
Eli Hughes
Huibean
Matt Huszagh
José Ignacio
@@ -621,7 +622,7 @@
欠陥電気
木 王
郝弘毅
Eli Hughes
See git repo on GitLab for contributors at
https://gitlab.com/kicad/code/kicad/-/graphs/master
+36
View File
@@ -189,6 +189,42 @@ message PadShapeAsPolygonResponse
repeated kiapi.common.types.PolygonWithHoles polygons = 2;
}
// Tests if the given set of items with padstacks (pads or vias) has content on the given set of layers.
// This is a dynamic call rather than a property of the padstack because pads and vias can be set to only include
// shapes on connected copper layers, and whether or not the pad is connected can't be determined in isolation.
// To optimize API call performance, multiple items and multiple layers to test may be passed in with this
// command message. The return will include the results for each valid item on each valid layer.
// Note that not all layers make sense for a given item (for example, testing against BL_UNDEFINED never makes
// sense). In general, the internal KiCad APIs will not return an error when testing non-sensical layers for a given
// item, and instead will return a default of "true" for any such layers.
message CheckPadstackPresenceOnLayers
{
kiapi.common.types.DocumentSpecifier board = 1;
repeated kiapi.common.types.KIID items = 2;
repeated kiapi.board.types.BoardLayer layers = 3;
}
enum PadstackPresence
{
PSP_UNKNOWN = 0;
PSP_PRESENT = 1; // The padstack has a shape on a given layer (is flashed)
PSP_NOT_PRESENT = 2; // The padstack has no shape on a given layer (is not flashed)
}
message PadstackPresenceEntry
{
kiapi.common.types.KIID item = 1;
kiapi.board.types.BoardLayer layer = 2;
PadstackPresence presence = 3;
}
message PadstackPresenceResponse
{
repeated PadstackPresenceEntry entries = 1;
}
// PCB editor commands
// returns BoardLayers
+6
View File
@@ -478,6 +478,9 @@ message Pad
// Copper-to-copper clearance override
kiapi.common.types.Distance copper_clearance_override = 8;
// Since: 9.0.4
kiapi.common.types.Distance pad_to_die_length = 9;
}
enum ZoneType
@@ -896,4 +899,7 @@ message FootprintInstance
FootprintAttributes attributes = 11;
FootprintDesignRuleOverrides overrides = 12;
// The sheet path to the associated symbol for this footprint instance, if one exists
kiapi.common.types.SheetPath symbol_path = 13;
}
+38 -1
View File
@@ -30,11 +30,15 @@
#include <common.h>
#include <math/util.h> // for KiROUND
#include <potracelib.h>
#include <vector>
#include <wx/arrstr.h>
#include <wx/clipbrd.h>
#include <wx/dnd.h>
#include <wx/rawbmp.h>
#include <wx/msgdlg.h>
#include <wx/dcclient.h>
#include <wx/log.h>
#include <wx/string.h>
#define DEFAULT_DPI 300 // the image DPI used in formats that do not define a DPI
@@ -58,8 +62,11 @@ BITMAP2CMP_PANEL::BITMAP2CMP_PANEL( BITMAP2CMP_FRAME* aParent ) :
m_buttonExportFile->Enable( false );
m_buttonExportClipboard->Enable( false );
}
m_InitialPicturePanel->SetDropTarget( new DROP_FILE( this ) );
m_GreyscalePicturePanel->SetDropTarget( new DROP_FILE( this ) );
m_BNPicturePanel->SetDropTarget( new DROP_FILE( this ) );
}
wxWindow* BITMAP2CMP_PANEL::GetCurrentPage()
{
@@ -562,3 +569,33 @@ void BITMAP2CMP_PANEL::OnFormatChange( wxCommandEvent& event )
m_layerLabel->Enable( m_rbFootprint->GetValue() );
m_layerCtrl->Enable( m_rbFootprint->GetValue() );
}
DROP_FILE::DROP_FILE( BITMAP2CMP_PANEL* panel ) :
m_panel( panel )
{
}
bool DROP_FILE::OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames )
{
m_panel->SetFocus();
// If a file is already loaded
if( m_panel->GetOutputSizeX().GetOriginalSizePixels() != 0 )
{
wxString cap = _( "Replace Loaded File?" );
wxString msg = _( "There is already a file loaded. Do you want to replace it?" );
wxMessageDialog acceptFileDlg( m_panel, msg, cap, wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
int replace = acceptFileDlg.ShowModal();
if( replace == wxID_NO )
return false;
}
std::vector<wxString> fNameVec;
fNameVec.insert( fNameVec.begin(), filenames.begin(), filenames.end() );
m_panel->OpenProjectFiles( fNameVec );
return true;
}
+15 -1
View File
@@ -25,7 +25,7 @@
#include <bitmap2cmp_panel_base.h>
#include <eda_units.h>
#include <wx/dnd.h>
class BITMAP2CMP_FRAME;
class BITMAP2CMP_SETTINGS;
@@ -134,4 +134,18 @@ private:
bool m_negative;
double m_aspectRatio;
};
class DROP_FILE : public wxFileDropTarget
{
public:
DROP_FILE( BITMAP2CMP_PANEL* panel );
DROP_FILE() = delete;
bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames ) override;
private:
BITMAP2CMP_PANEL* m_panel;
};
#endif// BITMAP2CMP_PANEL
+1 -1
View File
@@ -37,7 +37,7 @@
# KiCad.
#
# Note: This version string should follow the semantic versioning system
set( KICAD_SEMANTIC_VERSION "9.0.2" )
set( KICAD_SEMANTIC_VERSION "9.0.4" )
# Default the version to the semantic version.
# This is overridden by the git repository tag though (if using git)
+13
View File
@@ -128,6 +128,8 @@ static const wxChar NetInspectorBulkUpdateOptimisationThreshold[] =
wxT( "NetInspectorBulkUpdateOptimisationThreshold" );
static const wxChar ExcludeFromSimulationLineWidth[] = wxT( "ExcludeFromSimulationLineWidth" );
static const wxChar GitIconRefreshInterval[] = wxT( "GitIconRefreshInterval" );
static const wxChar MaxPastedTextLength[] = wxT( "MaxPastedTextLength" );
static const wxChar PNSProcessClusterTimeout[] = wxT( "PNSProcessClusterTimeout" );
} // namespace KEYS
@@ -311,6 +313,10 @@ ADVANCED_CFG::ADVANCED_CFG()
m_GitIconRefreshInterval = 10000;
m_MaxPastedTextLength = 100;
m_PNSProcessClusterTimeout = 100; // Default: 100 ms
loadFromConfigFile();
}
@@ -601,6 +607,13 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_GitIconRefreshInterval,
m_GitIconRefreshInterval, 0, 100000 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaxPastedTextLength,
&m_MaxPastedTextLength,
m_MaxPastedTextLength, 0, 100000 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::PNSProcessClusterTimeout,
&m_PNSProcessClusterTimeout, 100, 10, 10000 ) );
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks;
+1 -1
View File
@@ -178,7 +178,7 @@ HANDLER_RESULT<types::Box2> API_HANDLER_COMMON::handleGetTextExtents(
types::Box2 response;
BOX2I bbox = text.GetTextBox();
BOX2I bbox = text.GetTextBox( nullptr );
EDA_ANGLE angle = text.GetTextAngle();
if( !angle.IsZero() )
+9
View File
@@ -21,6 +21,7 @@
#include <magic_enum.hpp>
#include <api/api_utils.h>
#include <geometry/shape_poly_set.h>
#include <kiid.h>
#include <wx/log.h>
const wxChar* const traceApi = wxT( "KICAD_API" );
@@ -232,4 +233,12 @@ KICOMMON_API KIGFX::COLOR4D UnpackColor( const types::Color& aInput )
return KIGFX::COLOR4D( r, g, b, a );
}
KICOMMON_API void PackSheetPath( types::SheetPath& aOutput, const KIID_PATH& aInput )
{
aOutput.clear_path();
for( const KIID& entry : aInput )
aOutput.add_path()->set_value( entry.AsStdString() );
}
} // namespace kiapi::common
+28 -14
View File
@@ -31,6 +31,7 @@
#include <build_version.h>
#include <tuple>
#include <mutex>
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
@@ -51,6 +52,9 @@ extern std::string GetCurlLibVersion();
#include <kicad_build_version.h>
#undef INCLUDE_KICAD_VERSION
// Mutex for wxPlatformInfo
static std::recursive_mutex s_platformInfoMutex;
// Remember OpenGL info
static wxString s_glVendor;
static wxString s_glRenderer;
@@ -66,8 +70,10 @@ void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVer
wxString GetPlatformGetBitnessName()
{
wxPlatformInfo platform;
return platform.GetBitnessName();
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock(s_platformInfoMutex);
return wxPlatformInfo().GetBitnessName();
}
@@ -157,7 +163,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
#endif
<< " build";
wxPlatformInfo platform;
aMsg << "Application: " << aTitle;
aMsg << " " << wxGetCpuArchitectureName() << " on " << wxGetNativeCpuArchitectureName();
@@ -187,14 +192,19 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
// Linux uses the lsb-release program to get the description of the OS, if lsb-release
// isn't installed, then the string will be empty and we fallback to the method used on
// the other platforms (to at least get the kernel/uname info).
if( osDescription.empty() )
osDescription = wxGetOsDescription();
if( osDescription.empty() )
osDescription = wxGetOsDescription();
aMsg << "Platform: "
<< osDescription << ", "
<< GetPlatformGetBitnessName() << ", "
<< platform.GetEndiannessName() << ", "
<< platform.GetPortIdName();
{
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock( s_platformInfoMutex );
aMsg << "Platform: "
<< osDescription << ", "
<< GetPlatformGetBitnessName() << ", "
<< wxPlatformInfo().GetEndiannessName() << ", "
<< wxPlatformInfo().GetPortIdName();
}
#ifdef __WXGTK__
if( wxTheApp && wxTheApp->IsGUI() )
@@ -240,11 +250,15 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
// Get the GTK+ version where possible.
#ifdef __WXGTK__
int major, minor;
{
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock( s_platformInfoMutex );
int major, minor;
major = wxPlatformInfo().Get().GetToolkitMajorVersion();
minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
aMsg << " GTK+ " << major << "." << minor;
major = wxPlatformInfo().GetToolkitMajorVersion();
minor = wxPlatformInfo().GetToolkitMinorVersion();
aMsg << " GTK+ " << major << "." << minor;
}
#endif
aMsg << eol;
+20
View File
@@ -127,6 +127,26 @@ COMMIT& COMMIT::Stage( const PICKED_ITEMS_LIST &aItems, UNDO_REDO aModFlag, BASE
}
void COMMIT::Unstage( EDA_ITEM* aItem, BASE_SCREEN* aScreen )
{
std::erase_if( m_changes,
[&]( COMMIT_LINE& line )
{
if( line.m_item == aItem && line.m_screen == aScreen )
{
// Only new items which have never been committed can be unstaged
wxASSERT( line.m_item->IsNew() );
delete line.m_item;
delete line.m_copy;
return true;
}
return false;
} );
}
int COMMIT::GetStatus( EDA_ITEM* aItem, BASE_SCREEN *aScreen )
{
COMMIT_LINE* entry = findEntry( parentObject( aItem ), aScreen );
+7 -5
View File
@@ -71,9 +71,8 @@ wxString ExpandTextVars( const wxString& aSource, const PROJECT* aProject, int a
wxString ExpandTextVars( const wxString& aSource,
const std::function<bool( wxString* )>* aResolver, int aFlags )
{
static wxRegEx userDefinedWarningError( wxS( "^(ERC|DRC)_(WARNING|ERROR).*$" ) );
wxString newbuf;
size_t sourceLen = aSource.length();
wxString newbuf;
size_t sourceLen = aSource.length();
newbuf.Alloc( sourceLen ); // best guess (improves performance)
@@ -94,7 +93,10 @@ wxString ExpandTextVars( const wxString& aSource,
if( token.IsEmpty() )
continue;
if( ( aFlags & FOR_ERC_DRC ) == 0 && userDefinedWarningError.Matches( token ) )
if( ( aFlags & FOR_ERC_DRC ) == 0 && ( token.StartsWith( wxS( "ERC_WARNING" ) )
|| token.StartsWith( wxS( "ERC_ERROR" ) )
|| token.StartsWith( wxS( "DRC_WARNING" ) )
|| token.StartsWith( wxS( "DRC_ERROR" ) ) ) )
{
// Only show user-defined warnings/errors during ERC/DRC
}
@@ -433,7 +435,7 @@ wxString EnsureFileExtension( const wxString& aFilename, const wxString& aExtens
// extension, such as "Schematic_1.1".
if( newFilename.Lower().AfterLast( '.' ) != aExtension )
{
if( newFilename.Last() != '.' )
if( !newFilename.EndsWith( '.' ) )
newFilename.Append( '.' );
newFilename.Append( aExtension );
+1
View File
@@ -37,6 +37,7 @@
#include <utility>
#include <wx/tokenzr.h>
#include <kiface_base.h>
#include <locale_io.h>
DESIGN_BLOCK_INFO* DESIGN_BLOCK_LIST::GetDesignBlockInfo( const wxString& aLibNickname,
const wxString& aDesignBlockName )
+2 -1
View File
@@ -42,6 +42,7 @@ class DESIGN_BLOCK_LIST_IMPL;
class PROGRESS_REPORTER;
class wxTopLevelWindow;
class KIWAY;
class LOCALE_IO;
class wxTextFile;
@@ -113,7 +114,7 @@ protected:
}
/// lazily load stuff not filled in by constructor. This may throw IO_ERRORS.
virtual void load(){};
virtual void load( const LOCALE_IO* locale = nullptr ) {};
protected:
DESIGN_BLOCK_LIST* m_owner; ///< provides access to DESIGN_BLOCK_LIB_TABLE
+6 -9
View File
@@ -21,11 +21,9 @@
#include <design_block_info_impl.h>
#include <design_block.h>
#include <design_block_info.h>
#include <design_block_lib_table.h>
#include <kiway.h>
#include <locale_io.h>
#include <lib_id.h>
#include <progress_reporter.h>
#include <string_utils.h>
#include <thread_pool.h>
@@ -33,18 +31,18 @@
#include <kiplatform/io.h>
#include <wx/textfile.h>
#include <wx/txtstrm.h>
#include <wx/wfstream.h>
void DESIGN_BLOCK_INFO_IMPL::load()
void DESIGN_BLOCK_INFO_IMPL::load( const LOCALE_IO* locale )
{
DESIGN_BLOCK_LIB_TABLE* dbtable = m_owner->GetTable();
wxASSERT( dbtable );
const DESIGN_BLOCK* design_block = dbtable->GetEnumeratedDesignBlock( m_nickname, m_dbname );
std::unique_ptr<const DESIGN_BLOCK> design_block( dbtable->GetEnumeratedDesignBlock( m_nickname, m_dbname,
locale ) );
if( design_block )
{
@@ -128,7 +126,6 @@ bool DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles( DESIGN_BLOCK_LIB_TABLE* aTabl
m_queue.push( nickname );
}
if( m_progress_reporter )
{
m_progress_reporter->SetMaxProgress( (int) m_queue.size() );
@@ -167,7 +164,7 @@ void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
std::vector<std::future<size_t>> returns( num_elements );
auto db_thread =
[ this, &queue_parsed ]() -> size_t
[ this, &queue_parsed, &toggle_locale ]() -> size_t
{
wxString nickname;
@@ -179,7 +176,7 @@ void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
CatchErrors(
[&]()
{
m_lib_table->DesignBlockEnumerate( dbnames, nickname, false );
m_lib_table->DesignBlockEnumerate( dbnames, nickname, false, &toggle_locale );
} );
for( wxString dbname : dbnames )
@@ -187,7 +184,7 @@ void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
CatchErrors(
[&]()
{
auto* dbinfo = new DESIGN_BLOCK_INFO_IMPL( this, nickname, dbname );
auto* dbinfo = new DESIGN_BLOCK_INFO_IMPL( this, nickname, dbname, &toggle_locale );
queue_parsed.move_push( std::unique_ptr<DESIGN_BLOCK_INFO>( dbinfo ) );
} );
+3 -3
View File
@@ -36,7 +36,7 @@ class KICOMMON_API DESIGN_BLOCK_INFO_IMPL : public DESIGN_BLOCK_INFO
{
public:
DESIGN_BLOCK_INFO_IMPL( DESIGN_BLOCK_LIST* aOwner, const wxString& aNickname,
const wxString& aDesignBlockName )
const wxString& aDesignBlockName, const LOCALE_IO* aLocale )
{
m_nickname = aNickname;
m_dbname = aDesignBlockName;
@@ -44,7 +44,7 @@ public:
m_owner = aOwner;
m_loaded = false;
load();
load( aLocale );
}
// A constructor for cached items
@@ -73,7 +73,7 @@ public:
}
protected:
virtual void load() override;
virtual void load( const LOCALE_IO* aLocale = nullptr ) override;
};
+50 -19
View File
@@ -39,6 +39,7 @@
#include <wx/dir.h>
#include <wx/hash.h>
#include <locale_io.h>
#define OPT_SEP '|' ///< options separator character
@@ -315,13 +316,24 @@ long long DESIGN_BLOCK_LIB_TABLE::GenerateTimestamp( const wxString* aNickname )
}
void DESIGN_BLOCK_LIB_TABLE::DesignBlockEnumerate( wxArrayString& aDesignBlockNames,
const wxString& aNickname, bool aBestEfforts )
void DESIGN_BLOCK_LIB_TABLE::DesignBlockEnumerate( wxArrayString& aDesignBlockNames, const wxString& aNickname,
bool aBestEfforts, const LOCALE_IO* aLocale )
{
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
row->plugin->DesignBlockEnumerate( aDesignBlockNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
if( !aLocale )
{
LOCALE_IO toggle_locale;
row->plugin->DesignBlockEnumerate( aDesignBlockNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
}
else
{
row->plugin->DesignBlockEnumerate( aDesignBlockNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
}
}
@@ -372,19 +384,34 @@ static void setLibNickname( DESIGN_BLOCK* aModule, const wxString& aNickname,
const DESIGN_BLOCK*
DESIGN_BLOCK_LIB_TABLE::GetEnumeratedDesignBlock( const wxString& aNickname,
const wxString& aDesignBlockName )
const wxString& aDesignBlockName,
const LOCALE_IO* aLocale )
{
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
return row->plugin->GetEnumeratedDesignBlock( row->GetFullURI( true ), aDesignBlockName,
row->GetProperties() );
if( !aLocale )
{
LOCALE_IO toggle_locale;
return row->plugin->GetEnumeratedDesignBlock( row->GetFullURI( true ), aDesignBlockName,
row->GetProperties() );
}
else
{
return row->plugin->GetEnumeratedDesignBlock( row->GetFullURI( true ), aDesignBlockName,
row->GetProperties() );
}
}
bool DESIGN_BLOCK_LIB_TABLE::DesignBlockExists( const wxString& aNickname,
const wxString& aDesignBlockName )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
try
{
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
@@ -404,6 +431,10 @@ DESIGN_BLOCK* DESIGN_BLOCK_LIB_TABLE::DesignBlockLoad( const wxString& aNickname
const wxString& aDesignBlockName,
bool aKeepUUID )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
@@ -420,6 +451,10 @@ DESIGN_BLOCK_LIB_TABLE::SAVE_T
DESIGN_BLOCK_LIB_TABLE::DesignBlockSave( const wxString& aNickname,
const DESIGN_BLOCK* aDesignBlock, bool aOverwrite )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
@@ -433,7 +468,7 @@ DESIGN_BLOCK_LIB_TABLE::DesignBlockSave( const wxString& aNickname,
std::unique_ptr<DESIGN_BLOCK> design_block( row->plugin->DesignBlockLoad(
row->GetFullURI( true ), DesignBlockname, row->GetProperties() ) );
if( design_block.get() )
if( design_block )
return SAVE_SKIPPED;
}
@@ -537,13 +572,11 @@ public:
// consider a directory to be a lib if it's name ends with the design block lib dir
// extension it is under $KICADn_3RD_PARTY/design_blocks/<pkgid>/ i.e. has nested
// level of at least +3.
if( dirPath.EndsWith( wxString::Format( wxS( ".%s" ),
FILEEXT::KiCadDesignBlockLibPathExtension ) )
if( dirPath.EndsWith( wxString::Format( wxS( ".%s" ), FILEEXT::KiCadDesignBlockLibPathExtension ) )
&& dir.GetDirCount() >= m_prefix_dir_count + 3 )
{
wxString versionedPath;
versionedPath.Printf( wxS( "${%s}" ),
ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ) );
versionedPath.Printf( wxS( "${%s}" ), ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ) );
wxArrayString parts = dir.GetDirs();
parts.RemoveAt( 0, m_prefix_dir_count );
@@ -572,9 +605,9 @@ public:
} while( m_lib_table.HasLibrary( nickname ) );
}
m_lib_table.InsertRow( new DESIGN_BLOCK_LIB_TABLE_ROW(
nickname, libPath, wxT( "KiCad" ), wxEmptyString,
_( "Added by Plugin and Content Manager" ) ) );
m_lib_table.InsertRow( new DESIGN_BLOCK_LIB_TABLE_ROW( nickname, libPath, wxT( "KiCad" ),
wxEmptyString,
_( "Added by Plugin and Content Manager" ) ) );
}
}
@@ -611,8 +644,7 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
SystemDirsAppend( &ss );
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( envVars,
wxT( "TEMPLATE_DIR" ) );
std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( envVars, wxT( "TEMPLATE_DIR" ) );
if( v && !v->IsEmpty() )
ss.AddPaths( *v, 0 );
@@ -649,8 +681,7 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
if( d.DirExists() )
{
PCM_DESIGN_BLOCK_LIB_TRAVERSER traverser( packagesPath, aTable,
settings->m_PcmLibPrefix );
PCM_DESIGN_BLOCK_LIB_TRAVERSER traverser( packagesPath, aTable, settings->m_PcmLibPrefix );
wxDir dir( d.GetPath() );
dir.Traverse( traverser );
+65 -26
View File
@@ -60,7 +60,9 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
m_qmodal_loop( nullptr ),
m_qmodal_showing( false ),
m_qmodal_parent_disabler( nullptr ),
m_parentFrame( nullptr )
m_parentFrame( nullptr ),
m_userPositioned( false ),
m_userResized( false )
{
KIWAY_HOLDER* kiwayHolder = nullptr;
m_initialSize = size;
@@ -101,6 +103,8 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
Bind( wxEVT_CLOSE_WINDOW, &DIALOG_SHIM::OnCloseWindow, this );
Bind( wxEVT_BUTTON, &DIALOG_SHIM::OnButton, this );
Bind( wxEVT_SIZE, &DIALOG_SHIM::OnSize, this );
Bind( wxEVT_MOVE, &DIALOG_SHIM::OnMove, this );
#ifdef __WINDOWS__
// On Windows, the app top windows can be brought to the foreground (at least temporarily)
@@ -121,29 +125,32 @@ DIALOG_SHIM::~DIALOG_SHIM()
Unbind( wxEVT_CLOSE_WINDOW, &DIALOG_SHIM::OnCloseWindow, this );
Unbind( wxEVT_BUTTON, &DIALOG_SHIM::OnButton, this );
Unbind( wxEVT_PAINT, &DIALOG_SHIM::OnPaint, this );
Unbind( wxEVT_SIZE, &DIALOG_SHIM::OnSize, this );
Unbind( wxEVT_MOVE, &DIALOG_SHIM::OnMove, this );
std::function<void( wxWindowList& )> disconnectFocusHandlers = [&]( wxWindowList& children )
{
for( wxWindow* child : children )
{
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( child ) )
std::function<void( wxWindowList& )> disconnectFocusHandlers =
[&]( wxWindowList& children )
{
textCtrl->Disconnect( wxEVT_SET_FOCUS,
wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
}
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( child ) )
{
scintilla->Disconnect( wxEVT_SET_FOCUS,
wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
}
else
{
disconnectFocusHandlers( child->GetChildren() );
}
}
};
for( wxWindow* child : children )
{
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( child ) )
{
textCtrl->Disconnect( wxEVT_SET_FOCUS,
wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
}
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( child ) )
{
scintilla->Disconnect( wxEVT_SET_FOCUS,
wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
}
else
{
disconnectFocusHandlers( child->GetChildren() );
}
}
};
disconnectFocusHandlers( GetChildren() );
@@ -287,11 +294,24 @@ bool DIALOG_SHIM::Show( bool show )
// shown on another display)
if( wxDisplay::GetFromWindow( this ) == wxNOT_FOUND )
Centre();
m_userPositioned = false;
m_userResized = false;
}
else
{
// Save the dialog's position & size before hiding, using classname as key
class_map[ hash_key ] = wxRect( wxDialog::GetPosition(), wxDialog::GetSize() );
// Save the dialog's position & size before hiding, using classname as key.
// Be careful of rounding errors: only re-save if the user modified the value or
// it has not yet been saved.
wxRect rect = class_map[ hash_key ];
if( m_userPositioned || rect.GetPosition() == wxPoint() )
rect.SetPosition( wxDialog::GetPosition() );
if( m_userResized || rect.GetSize() == wxSize() )
rect.SetSize( wxDialog::GetSize() );
class_map[ hash_key ] = rect;
#ifdef __WXMAC__
if ( m_eventLoop )
@@ -333,6 +353,20 @@ void DIALOG_SHIM::resetSize()
}
void DIALOG_SHIM::OnSize( wxSizeEvent& aEvent )
{
m_userResized = true;
aEvent.Skip();
}
void DIALOG_SHIM::OnMove( wxMoveEvent& aEvent )
{
m_userPositioned = true;
aEvent.Skip();
}
bool DIALOG_SHIM::Enable( bool enable )
{
// so we can do logging of this state change:
@@ -565,8 +599,6 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
m_qmodal_loop->Exit( 0 );
else
m_qmodal_loop->ScheduleExit( 0 );
m_qmodal_loop = nullptr;
}
delete m_qmodal_parent_disabler;
@@ -660,6 +692,13 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( eventSource ) )
{
// If the text control is not multi-line, we want to close the dialog
if( !textCtrl->IsMultiLine() )
{
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
return;
}
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
wxString eol = "\r\n";
#else
@@ -255,6 +255,9 @@ void DIALOG_CONFIGURE_PATHS::OnGridCellChanging( wxGridEvent& event )
int col = event.GetCol();
wxString text = event.GetString();
text.Trim( true ).Trim( false ); // Trim from both sides
grid->SetCellValue( row, col, text ); // Update the grid with trimmed value
if( text.IsEmpty() )
{
if( grid == m_EnvVars )
@@ -60,11 +60,17 @@ void DIALOG_LOCKED_ITEMS_QUERY::onOverrideLocks( wxCommandEvent& event )
int DIALOG_LOCKED_ITEMS_QUERY::ShowModal()
{
static int doNotShowValue = wxID_ANY;
if( doNotShowValue != wxID_ANY && m_lockingOptions.m_sessionSkipPrompts )
return doNotShowValue;
int ret = DIALOG_SHIM::ShowModal();
// Has the user asked not to show the dialog again this session?
if( m_doNotShowBtn->IsChecked() && ret != wxID_CANCEL )
{
doNotShowValue = ret;
m_lockingOptions.m_sessionSkipPrompts = true;
}
+9 -16
View File
@@ -474,24 +474,17 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings()
wxString msg;
wxString fileName = GetWksFileName();
if( fileName != BASE_SCREEN::m_DrawingSheetFileName )
wxString fullFileName = m_filenameResolver->ResolvePath( fileName, m_projectPath, { m_embeddedFiles } );
BASE_SCREEN::m_DrawingSheetFileName = fileName;
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( fullFileName, &msg ) )
{
wxString fullFileName = m_filenameResolver->ResolvePath( fileName, m_projectPath,
{ m_embeddedFiles } );
BASE_SCREEN::m_DrawingSheetFileName = fileName;
if( !DS_DATA_MODEL::GetTheInstance().LoadDrawingSheet( fullFileName, &msg ) )
{
DisplayErrorMessage( this,
wxString::Format( _( "Error loading drawing sheet '%s'." ),
fullFileName ),
msg );
}
m_localPrjConfigChanged = true;
DisplayErrorMessage( this, wxString::Format( _( "Error loading drawing sheet '%s'." ), fullFileName ), msg );
}
m_localPrjConfigChanged = true;
int idx = std::max( m_paperSizeComboBox->GetSelection(), 0 );
const wxString paperType = m_pageFmt[idx];
@@ -823,7 +816,7 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
if( m_embeddedFiles && customize.GetEmbed() )
{
fn.Assign( fileName );
EMBEDDED_FILES::EMBEDDED_FILE* result = m_embeddedFiles->AddFile( fn, false );
EMBEDDED_FILES::EMBEDDED_FILE* result = m_embeddedFiles->AddFile( fn, true );
shortFileName = result->GetLink();
fileName = m_embeddedFiles->GetTemporaryFileName( result->name ).GetFullPath();
}
+1 -1
View File
@@ -17,7 +17,7 @@ PANEL_GIT_REPOS_BASE::PANEL_GIT_REPOS_BASE( wxWindow* parent, wxWindowID id, con
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
m_enableGit = new wxCheckBox( this, wxID_ANY, _("Enable Git Tracking"), wxDefaultPosition, wxDefaultSize, 0 );
m_enableGit = new wxCheckBox( this, wxID_ANY, _("Enable Git tracking"), wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_enableGit, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 13 );
m_gitSizer = new wxBoxSizer( wxVERTICAL );
@@ -103,7 +103,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Enable Git Tracking</property>
<property name="label">Enable Git tracking</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
+44 -37
View File
@@ -92,14 +92,18 @@ bool PANEL_COLOR_SETTINGS::Show( bool show )
if( show )
{
// In case changes have been made to the current theme in another panel:
int idx = m_cbTheme->GetSelection();
COLOR_SETTINGS* settings = static_cast<COLOR_SETTINGS*>( m_cbTheme->GetClientData( idx ) );
int themeSel = m_cbTheme->GetSelection();
if( settings )
*m_currentSettings = *settings;
if( themeSel >= 0 )
{
COLOR_SETTINGS* settings = static_cast<COLOR_SETTINGS*>( m_cbTheme->GetClientData( themeSel ) );
onNewThemeSelected();
updateSwatches();
if( settings )
*m_currentSettings = *settings;
onNewThemeSelected();
updateSwatches();
}
}
return PANEL_COLOR_SETTINGS_BASE::Show( show );
@@ -282,49 +286,52 @@ void PANEL_COLOR_SETTINGS::createSwatch( int aLayer, const wxString& aName )
void PANEL_COLOR_SETTINGS::ShowColorContextMenu( wxMouseEvent& aEvent, int aLayer )
{
auto selected =
static_cast<COLOR_SETTINGS*>( m_cbTheme->GetClientData( m_cbTheme->GetSelection() ) );
int themeSel = m_cbTheme->GetSelection();
wxCHECK_RET( selected, wxT( "Invalid color theme selected" ) );
if( themeSel >= 0 )
{
COLOR_SETTINGS* selected = static_cast<COLOR_SETTINGS*>( m_cbTheme->GetClientData( themeSel ) );
COLOR4D current = m_currentSettings->GetColor( aLayer );
COLOR4D saved = selected->GetColor( aLayer );
bool readOnly = m_currentSettings->IsReadOnly();
wxCHECK_RET( selected, wxT( "Invalid color theme selected" ) );
wxMenu menu;
COLOR4D current = m_currentSettings->GetColor( aLayer );
COLOR4D saved = selected->GetColor( aLayer );
bool readOnly = m_currentSettings->IsReadOnly();
KIUI::AddMenuItem( &menu, ID_COPY, _( "Copy color" ), KiBitmap( BITMAPS::copy ) );
wxMenu menu;
if( !readOnly && m_copied != COLOR4D::UNSPECIFIED )
KIUI::AddMenuItem( &menu, ID_PASTE, _( "Paste color" ), KiBitmap( BITMAPS::paste ) );
KIUI::AddMenuItem( &menu, ID_COPY, _( "Copy color" ), KiBitmap( BITMAPS::copy ) );
if( !readOnly && current != saved )
KIUI::AddMenuItem( &menu, ID_REVERT, _( "Revert to saved color" ),
KiBitmap( BITMAPS::undo ) );
if( !readOnly && m_copied != COLOR4D::UNSPECIFIED )
KIUI::AddMenuItem( &menu, ID_PASTE, _( "Paste color" ), KiBitmap( BITMAPS::paste ) );
menu.Bind( wxEVT_COMMAND_MENU_SELECTED,
[&]( wxCommandEvent& aCmd )
{
switch( aCmd.GetId() )
if( !readOnly && current != saved )
KIUI::AddMenuItem( &menu, ID_REVERT, _( "Revert to saved color" ), KiBitmap( BITMAPS::undo ) );
menu.Bind( wxEVT_COMMAND_MENU_SELECTED,
[&]( wxCommandEvent& aCmd )
{
case ID_COPY:
m_copied = current;
break;
switch( aCmd.GetId() )
{
case ID_COPY:
m_copied = current;
break;
case ID_PASTE:
updateColor( aLayer, m_copied );
break;
case ID_PASTE:
updateColor( aLayer, m_copied );
break;
case ID_REVERT:
updateColor( aLayer, saved );
break;
case ID_REVERT:
updateColor( aLayer, saved );
break;
default:
aCmd.Skip();
}
} );
default:
aCmd.Skip();
}
} );
PopupMenu( &menu );
PopupMenu( &menu );
}
}
+14 -17
View File
@@ -461,16 +461,15 @@ PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE( DIALOG_EDIT_LIBRARY_
}
else if( !desc.m_IsFile && !desc.m_ExtensionsInDir.empty() )
{
wxString midPart = wxString::Format( _( "folder with %s files" ),
joinExts( desc.m_ExtensionsInDir ) );
wxString midPart = wxString::Format( _( "folder with %s files" ), joinExts( desc.m_ExtensionsInDir ) );
entryStr << wxString::Format( wxS( " (%s)" ), midPart );
}
browseMenu->Append( type, entryStr );
browseMenu->Bind( wxEVT_COMMAND_MENU_SELECTED,
&PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler, this, type );
browseMenu->Bind( wxEVT_COMMAND_MENU_SELECTED, &PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler,
this, type );
}
Layout();
@@ -487,11 +486,11 @@ PANEL_DESIGN_BLOCK_LIB_TABLE::~PANEL_DESIGN_BLOCK_LIB_TABLE()
for( auto& [type, desc] : m_supportedDesignBlockFiles )
{
browseMenu->Unbind( wxEVT_COMMAND_MENU_SELECTED,
&PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler, this, type );
browseMenu->Unbind( wxEVT_COMMAND_MENU_SELECTED, &PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler,
this, type );
}
m_browseButton->Unbind( wxEVT_BUTTON, &PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler,
this );
m_browseButton->Unbind( wxEVT_BUTTON, &PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler, this );
// Delete the GRID_TRICKS.
// Any additional event handlers should be popped before the window is deleted.
@@ -550,9 +549,8 @@ bool PANEL_DESIGN_BLOCK_LIB_TABLE::verifyTables()
wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT );
badCellDlg.SetExtendedMessage( _( "Empty cells will result in all rows that are "
"invalid to be removed from the table." ) );
badCellDlg.SetYesNoLabels(
wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ),
wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) );
badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ),
wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) );
if( badCellDlg.ShowModal() == wxID_NO )
return false;
@@ -561,19 +559,19 @@ bool PANEL_DESIGN_BLOCK_LIB_TABLE::verifyTables()
// This also updates the UI which could be slow, but there should only be a few
// rows to delete, unless the user fell asleep on the Add Row
// button.
model->GetView()->ClearSelection();
model->DeleteRows( r, 1 );
}
else if( ( illegalCh = LIB_ID::FindIllegalLibraryNameChar( nick ) ) )
{
msg = wxString::Format( _( "Illegal character '%c' in nickname '%s'." ), illegalCh,
nick );
msg = wxString::Format( _( "Illegal character '%c' in nickname '%s'." ), illegalCh, nick );
// show the tabbed panel holding the grid we have flunked:
if( model != cur_model() )
m_notebook->SetSelection( model == global_model() ? 0 : 1 );
m_cur_grid->MakeCellVisible( r, 0 );
m_cur_grid->SetGridCursor( r, 1 );
model->GetView()->MakeCellVisible( r, 0 );
model->GetView()->SetGridCursor( r, 1 );
wxWindow* topLevelParent = wxGetTopLevelParent( this );
@@ -611,8 +609,7 @@ bool PANEL_DESIGN_BLOCK_LIB_TABLE::verifyTables()
if( nick1 == nick2 )
{
msg = wxString::Format( _( "Multiple libraries cannot share the same "
"nickname ('%s')." ),
msg = wxString::Format( _( "Multiple libraries cannot share the same nickname ('%s')." ),
nick1 );
// show the tabbed panel holding the grid we have flunked:
+3 -4
View File
@@ -31,12 +31,12 @@
#include <wx/clipbrd.h>
#include <wx/dirdlg.h>
#include <wx/ffile.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <wx/wfstream.h>
#include <wx/wupdlock.h>
/* ---------- GRID_TRICKS for embedded files grid ---------- */
@@ -209,7 +209,8 @@ bool PANEL_EMBEDDED_FILES::TransferDataFromWindow()
void PANEL_EMBEDDED_FILES::onFontEmbedClick( wxCommandEvent& event )
{
Freeze();
wxWindowUpdateLocker updateLock( this );
int row_pos = m_files_grid->GetGridCursorRow();
int col_pos = m_files_grid->GetGridCursorCol();
wxString row_name;
@@ -269,8 +270,6 @@ void PANEL_EMBEDDED_FILES::onFontEmbedClick( wxCommandEvent& event )
}
}
}
Thaw();
}
+3 -3
View File
@@ -25,7 +25,7 @@
#include <algorithm>
#include <limits>
#include <wx/wupdlock.h>
#include <pgm_base.h>
#include <eda_draw_frame.h>
#include <bitmaps.h>
@@ -116,7 +116,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_membershipPane->SetBorders( true, false, false, false );
// Prevent Size events from firing before we are ready
Freeze();
wxWindowUpdateLocker updateLock( this );
m_netclassGrid->BeginBatch();
m_netclassGrid->SetUseNativeColLabels();
m_assignmentGrid->BeginBatch();
@@ -243,7 +244,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_netclassGrid->EndBatch();
m_assignmentGrid->EndBatch();
Thaw();
Bind( wxEVT_IDLE,
[this]( wxIdleEvent& aEvent )
@@ -51,9 +51,6 @@ public:
void Parse( DS_DATA_MODEL* aLayout );
private:
int m_requiredVersion;
wxString m_generatorVersion;
/**
* Parse the data specified at the very beginning of the file, like version and the
* application used to create this file.
@@ -113,6 +110,10 @@ private:
void parseCoordinate( POINT_COORD& aCoord);
void readOption( DS_DATA_ITEM * aItem );
void readPngdata( DS_DATA_ITEM_BITMAP * aItem );
private:
int m_requiredVersion;
wxString m_generatorVersion;
};
+1 -1
View File
@@ -701,7 +701,7 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
dummy.SetVertJustify( m_Vjustify );
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
BOX2I rect = dummy.GetTextBox();
BOX2I rect = dummy.GetTextBox( nullptr );
VECTOR2D size;
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
+1 -1
View File
@@ -221,7 +221,7 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
const BOX2I DS_DRAW_ITEM_TEXT::GetBoundingBox() const
{
return EDA_TEXT::GetTextBox();
return EDA_TEXT::GetTextBox( nullptr );
}
+63 -48
View File
@@ -46,62 +46,70 @@ void DSNLEXER::init()
specctraMode = false;
space_in_quoted_tokens = false;
commentsAreTokens = false;
SetKnowsBar( true ); // default since version 20240706
curOffset = 0;
}
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
const KEYWORD_MAP* aKeywordMap,
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP* aKeywordMap,
FILE* aFile, const wxString& aFilename ) :
iOwnReaders( true ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
specctraMode( false ),
m_knowsBar( false ),
space_in_quoted_tokens( false ),
commentsAreTokens( false ),
keywords( aKeywordTable ),
keywordCount( aKeywordCount ),
keywordsLookup( aKeywordMap )
{
FILE_LINE_READER* fileReader = new FILE_LINE_READER( aFile, aFilename );
PushReader( fileReader );
PushReader( new FILE_LINE_READER( aFile, aFilename ) );
init();
}
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
const KEYWORD_MAP* aKeywordMap,
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP* aKeywordMap,
const std::string& aClipboardTxt, const wxString& aSource ) :
iOwnReaders( true ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
keywords( aKeywordTable ),
keywordCount( aKeywordCount ),
keywordsLookup( aKeywordMap )
iOwnReaders( true ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
specctraMode( false ),
m_knowsBar( false ),
space_in_quoted_tokens( false ),
commentsAreTokens( false ),
keywords( aKeywordTable ),
keywordCount( aKeywordCount ),
keywordsLookup( aKeywordMap )
{
STRING_LINE_READER* stringReader = new STRING_LINE_READER( aClipboardTxt, aSource.IsEmpty() ?
wxString( FMT_CLIPBOARD ) : aSource );
PushReader( stringReader );
PushReader( new STRING_LINE_READER( aClipboardTxt, aSource.IsEmpty() ? wxString( FMT_CLIPBOARD )
: aSource ) );
init();
}
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
const KEYWORD_MAP* aKeywordMap,
DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount, const KEYWORD_MAP* aKeywordMap,
LINE_READER* aLineReader ) :
iOwnReaders( false ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
keywords( aKeywordTable ),
keywordCount( aKeywordCount ),
keywordsLookup( aKeywordMap )
iOwnReaders( false ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
specctraMode( false ),
m_knowsBar( false ),
space_in_quoted_tokens( false ),
commentsAreTokens( false ),
keywords( aKeywordTable ),
keywordCount( aKeywordCount ),
keywordsLookup( aKeywordMap )
{
if( aLineReader )
PushReader( aLineReader );
init();
}
@@ -109,18 +117,21 @@ DSNLEXER::DSNLEXER( const KEYWORD* aKeywordTable, unsigned aKeywordCount,
static const KEYWORD empty_keywords[1] = {};
DSNLEXER::DSNLEXER( const std::string& aSExpression, const wxString& aSource ) :
iOwnReaders( true ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
keywords( empty_keywords ),
keywordCount( 0 ),
keywordsLookup( nullptr )
iOwnReaders( true ),
start( nullptr ),
next( nullptr ),
limit( nullptr ),
reader( nullptr ),
specctraMode( false ),
m_knowsBar( false ),
space_in_quoted_tokens( false ),
commentsAreTokens( false ),
keywords( empty_keywords ),
keywordCount( 0 ),
keywordsLookup( nullptr )
{
STRING_LINE_READER* stringReader = new STRING_LINE_READER( aSExpression, aSource.IsEmpty() ?
wxString( FMT_CLIPBOARD ) : aSource );
PushReader( stringReader );
PushReader( new STRING_LINE_READER( aSExpression, aSource.IsEmpty() ? wxString( FMT_CLIPBOARD )
: aSource ) );
init();
}
@@ -139,6 +150,7 @@ DSNLEXER::~DSNLEXER()
void DSNLEXER::SetSpecctraMode( bool aMode )
{
specctraMode = aMode;
if( aMode )
{
// specctra mode defaults, some of which can still be changed in this mode.
@@ -292,13 +304,9 @@ const char* DSNLEXER::GetTokenText( int aTok ) const
const char* ret;
if( aTok < 0 )
{
return Syntax( aTok );
}
else if( (unsigned) aTok < keywordCount )
{
ret = keywords[aTok].name;
}
else
ret = "token too big";
@@ -325,6 +333,12 @@ bool DSNLEXER::IsSymbol( int aTok )
}
bool DSNLEXER::IsNumber( int aTok )
{
return aTok == DSN_NUMBER;
}
void DSNLEXER::Expecting( int aTok ) const
{
wxString errText = wxString::Format(
@@ -368,6 +382,7 @@ void DSNLEXER::Unexpected( const char* text ) const
void DSNLEXER::NeedLEFT()
{
int tok = NextTok();
if( tok != DSN_LEFT )
Expecting( DSN_LEFT );
}
@@ -406,7 +421,7 @@ int DSNLEXER::NeedSYMBOLorNUMBER()
{
int tok = NextTok();
if( !IsSymbol( tok ) && tok!=DSN_NUMBER )
if( !IsSymbol( tok ) && !IsNumber( tok ) )
Expecting( "a symbol or number" );
return tok;
@@ -417,7 +432,7 @@ int DSNLEXER::NeedNUMBER( const char* aExpectation )
{
int tok = NextTok();
if( tok != DSN_NUMBER )
if( !IsNumber( tok ) )
{
wxString errText = wxString::Format( _( "need a number for '%s'" ),
wxString::FromUTF8( aExpectation ).GetData() );
@@ -462,9 +477,9 @@ inline bool isDigit( char cc )
/// @return true if @a cc is an s-expression separator character.
inline bool isSep( char cc )
inline bool DSNLEXER::isSep( char cc )
{
return isSpace( cc ) || cc == '(' || cc == ')' || cc == '|';
return isSpace( cc ) || cc == '(' || cc == ')' || ( m_knowsBar && cc == '|' );
}
@@ -609,7 +624,7 @@ L_read:
goto exit;
}
if( *cur == '|' )
if( m_knowsBar && *cur == '|' )
{
curText = *cur;
curTok = DSN_BAR;
+15
View File
@@ -619,18 +619,27 @@ void EDA_DRAW_FRAME::AddStandardSubMenus( TOOL_MENU& aToolMenu )
void EDA_DRAW_FRAME::DisplayToolMsg( const wxString& msg )
{
if( m_isClosing )
return;
SetStatusText( msg, 6 );
}
void EDA_DRAW_FRAME::DisplayConstraintsMsg( const wxString& msg )
{
if( m_isClosing )
return;
SetStatusText( msg, 7 );
}
void EDA_DRAW_FRAME::DisplayGridMsg()
{
if( m_isClosing )
return;
wxString msg;
GRID_SETTINGS& gridSettings = m_toolManager->GetSettings()->m_Window.grid;
@@ -645,6 +654,9 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
void EDA_DRAW_FRAME::DisplayUnitsMsg()
{
if( m_isClosing )
return;
wxString msg;
switch( GetUserUnits() )
@@ -712,6 +724,9 @@ void EDA_DRAW_FRAME::updateStatusBarWidths()
void EDA_DRAW_FRAME::UpdateStatusBar()
{
if( m_isClosing )
return;
SetStatusText( GetZoomLevelIndicator(), 1 );
// Absolute and relative cursor positions are handled by overloading this function and
View File
+36
View File
@@ -32,6 +32,7 @@
#include <wx/log.h>
#include <wx/fdrepdlg.h>
#include <wx/regex.h>
#include <eda_pattern_match.h>
EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType, bool isSCH_ITEM, bool isBOARD_ITEM ) :
@@ -182,6 +183,21 @@ bool EDA_ITEM::Matches( const wxString& aText, const EDA_SEARCH_DATA& aSearchDat
{
return text.Matches( searchText );
}
else if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::REGEX )
{
if( aSearchData.regex_string != searchText || !aSearchData.regex.IsValid() )
{
int flag = aSearchData.matchCase ? 0 : wxRE_ICASE;
wxLogNull noLogs;
if( !aSearchData.regex.Compile( searchText, flag ) )
return false;
aSearchData.regex_string = searchText;
}
return aSearchData.regex.Matches( text );
}
else
{
return text.Find( searchText ) != wxNOT_FOUND;
@@ -196,6 +212,26 @@ bool EDA_ITEM::Replace( const EDA_SEARCH_DATA& aSearchData, wxString& aText )
wxString result;
bool replaced = false;
if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::REGEX )
{
if( aSearchData.regex_string != searchText || !aSearchData.regex.IsValid() )
{
int flag = aSearchData.matchCase ? 0 : wxRE_ICASE;
wxLogNull noLogs;
if( !aSearchData.regex.Compile( searchText, flag ) )
return false;
aSearchData.regex_string = searchText;
}
if( !aSearchData.regex.Replace( &text, aSearchData.replaceString ) )
return false;
aText = text;
return true;
}
if( !aSearchData.matchCase )
{
text = text.Upper();
+22 -9
View File
@@ -303,7 +303,7 @@ bool EDA_SHAPE::Deserialize( const google::protobuf::Any &aContainer )
SetBezierC1( UnpackVector2( shape.bezier().control1() ) );
SetBezierC2( UnpackVector2( shape.bezier().control2() ) );
SetEnd( UnpackVector2( shape.bezier().end() ) );
RebuildBezierToSegmentsPointsList( ARC_HIGH_DEF );
RebuildBezierToSegmentsPointsList( getMaxError() );
}
return true;
@@ -435,7 +435,8 @@ void EDA_SHAPE::SetLength( const double& aLength )
switch( m_shape )
{
case SHAPE_T::SEGMENT:
m_segmentLength = aLength; break;
m_segmentLength = aLength;
break;
default:
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
@@ -622,7 +623,7 @@ void EDA_SHAPE::scale( double aScale )
scalePt( m_end );
scalePt( m_bezierC1 );
scalePt( m_bezierC2 );
RebuildBezierToSegmentsPointsList( m_stroke.GetWidth() / 2 );
RebuildBezierToSegmentsPointsList( getMaxError() );
break;
default:
@@ -726,7 +727,7 @@ void EDA_SHAPE::flip( const VECTOR2I& aCentre, FLIP_DIRECTION aFlipDirection )
MIRROR( m_bezierC1, aCentre, aFlipDirection );
MIRROR( m_bezierC2, aCentre, aFlipDirection );
RebuildBezierToSegmentsPointsList( m_stroke.GetWidth() / 2 );
RebuildBezierToSegmentsPointsList( getMaxError() );
break;
default:
@@ -855,8 +856,20 @@ int EDA_SHAPE::GetRadius() const
UNIMPLEMENTED_FOR( SHAPE_T_asString() );
}
// don't allow degenerate circles/arcs
return std::max( 1, KiROUND( radius ) );
// Calculate maximum safe radius to prevent overflow in coordinate operations
// We need to ensure that any coordinate ± radius doesn't exceed INT_MAX
int max_coord = std::max( { std::abs( m_start.x ), std::abs( m_start.y ),
std::abs( m_end.x ), std::abs( m_end.y ) } );
// Calculate maximum safe radius (with some margin)
double max_safe_radius = static_cast<double>( INT_MAX ) - max_coord - 1000;
if( radius > max_safe_radius )
radius = max_safe_radius;
int final_radius = KiROUND( radius );
return std::max( 1, final_radius );
}
@@ -1638,7 +1651,7 @@ std::vector<SHAPE*> EDA_SHAPE::makeEffectiveShapes( bool aEdgeOnly, bool aLineCh
case SHAPE_T::BEZIER:
{
std::vector<VECTOR2I> bezierPoints = buildBezierToSegmentsPointsList( width / 2 );
std::vector<VECTOR2I> bezierPoints = buildBezierToSegmentsPointsList( getMaxError() );
VECTOR2I start_pt = bezierPoints[0];
for( unsigned int jj = 1; jj < bezierPoints.size(); jj++ )
@@ -1741,7 +1754,7 @@ void EDA_SHAPE::beginEdit( const VECTOR2I& aPosition )
SetBezierC2( aPosition );
m_editState = 1;
RebuildBezierToSegmentsPointsList( GetWidth() / 2 );
RebuildBezierToSegmentsPointsList( getMaxError() );
break;
case SHAPE_T::POLY:
@@ -1823,7 +1836,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 3: SetBezierC2( aPosition ); break;
}
RebuildBezierToSegmentsPointsList( GetWidth() / 2 );
RebuildBezierToSegmentsPointsList( getMaxError() );
}
break;
+23 -23
View File
@@ -631,12 +631,17 @@ void EDA_TEXT::cacheShownText()
}
KIFONT::FONT* EDA_TEXT::getDrawFont() const
KIFONT::FONT* EDA_TEXT::GetDrawFont( const RENDER_SETTINGS* aSettings ) const
{
KIFONT::FONT* font = GetFont();
if( !font )
font = KIFONT::FONT::GetFont( wxEmptyString, IsBold(), IsItalic() );
{
if( aSettings )
font = KIFONT::FONT::GetFont( aSettings->GetDefaultFont(), IsBold(), IsItalic() );
else
font = KIFONT::FONT::GetFont( wxEmptyString, IsBold(), IsItalic() );
}
return font;
}
@@ -714,13 +719,13 @@ void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
}
int EDA_TEXT::GetInterline() const
int EDA_TEXT::GetInterline( const RENDER_SETTINGS* aSettings ) const
{
return KiROUND( getDrawFont()->GetInterline( GetTextHeight(), getFontMetrics() ) );
return KiROUND( GetDrawFont( aSettings )->GetInterline( GetTextHeight(), getFontMetrics() ) );
}
BOX2I EDA_TEXT::GetTextBox( int aLine ) const
BOX2I EDA_TEXT::GetTextBox( const RENDER_SETTINGS* aSettings, int aLine ) const
{
VECTOR2I drawPos = GetDrawPos();
@@ -748,12 +753,11 @@ BOX2I EDA_TEXT::GetTextBox( int aLine ) const
}
// calculate the H and V size
KIFONT::FONT* font = getDrawFont();
KIFONT::FONT* font = GetDrawFont( aSettings );
VECTOR2D fontSize( GetTextSize() );
bool bold = IsBold();
bool italic = IsItalic();
VECTOR2I extents = font->StringBoundaryLimits( text, fontSize, thickness, bold, italic,
getFontMetrics() );
VECTOR2I extents = font->StringBoundaryLimits( text, fontSize, thickness, bold, italic, getFontMetrics() );
int overbarOffset = 0;
// Creates bounding box (rectangle) for horizontal, left and top justified text. The
@@ -779,15 +783,13 @@ BOX2I EDA_TEXT::GetTextBox( int aLine ) const
for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
{
text = strings.Item( ii );
extents = font->StringBoundaryLimits( text, fontSize, thickness, bold, italic,
getFontMetrics() );
extents = font->StringBoundaryLimits( text, fontSize, thickness, bold, italic, getFontMetrics() );
textsize.x = std::max( textsize.x, extents.x );
}
// interline spacing is only *between* lines, so total height is the height of the first
// line plus the interline distance (with interline spacing) for all subsequent lines
textsize.y += KiROUND( ( strings.GetCount() - 1 )
* font->GetInterline( fontSize.y, getFontMetrics() ) );
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * font->GetInterline( fontSize.y, getFontMetrics() ) );
}
textsize.y += overbarOffset;
@@ -852,7 +854,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine ) const
bool EDA_TEXT::TextHitTest( const VECTOR2I& aPoint, int aAccuracy ) const
{
const BOX2I rect = GetTextBox().GetInflated( aAccuracy );
const BOX2I rect = GetTextBox( nullptr ).GetInflated( aAccuracy );
const VECTOR2I location = GetRotated( aPoint, GetDrawPos(), -GetDrawRotation() );
return rect.Contains( location );
}
@@ -863,9 +865,9 @@ bool EDA_TEXT::TextHitTest( const BOX2I& aRect, bool aContains, int aAccuracy )
const BOX2I rect = aRect.GetInflated( aAccuracy );
if( aContains )
return rect.Contains( GetTextBox() );
return rect.Contains( GetTextBox( nullptr ) );
return rect.Intersects( GetTextBox(), GetDrawRotation() );
return rect.Intersects( GetTextBox( nullptr ), GetDrawRotation() );
}
@@ -880,7 +882,7 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
positions.reserve( strings.Count() );
GetLinePositions( positions, (int) strings.Count() );
GetLinePositions( aSettings, positions, (int) strings.Count() );
for( unsigned ii = 0; ii < strings.Count(); ii++ )
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, strings[ii], positions[ii] );
@@ -893,14 +895,15 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
}
void EDA_TEXT::GetLinePositions( std::vector<VECTOR2I>& aPositions, int aLineCount ) const
void EDA_TEXT::GetLinePositions( const RENDER_SETTINGS* aSettings, std::vector<VECTOR2I>& aPositions,
int aLineCount ) const
{
VECTOR2I pos = GetDrawPos(); // Position of first line of the multiline text according
// to the center of the multiline text block
VECTOR2I offset; // Offset to next line.
offset.y = GetInterline();
offset.y = GetInterline( aSettings );
if( aLineCount > 1 )
{
@@ -952,10 +955,7 @@ void EDA_TEXT::printOneLineOfText( const RENDER_SETTINGS* aSettings, const VECTO
if( IsMirrored() )
size.x = -size.x;
KIFONT::FONT* font = GetFont();
if( !font )
font = KIFONT::FONT::GetFont( aSettings->GetDefaultFont(), IsBold(), IsItalic() );
KIFONT::FONT* font = GetDrawFont( aSettings );
GRPrintText( DC, aOffset + aPos, aColor, aText, GetDrawRotation(), size, GetHorizJustify(),
GetVertJustify(), penWidth, IsItalic(), IsBold(), font, getFontMetrics() );
@@ -1123,7 +1123,7 @@ std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( bool aTriangula
{
std::shared_ptr<SHAPE_COMPOUND> shape = std::make_shared<SHAPE_COMPOUND>();
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
KIFONT::FONT* font = getDrawFont();
KIFONT::FONT* font = GetDrawFont( nullptr );
int penWidth = GetEffectiveTextPenWidth();
wxString shownText( GetShownText( true ) );
VECTOR2I drawPos = GetDrawPos();
+11 -1
View File
@@ -391,7 +391,7 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
{
default:
case EDA_UNITS::UM: format = is_eeschema ? wxT( "%.0f" ) : wxT( "%.1f" ); break;
case EDA_UNITS::MM: format = is_eeschema ? wxT( "%.2f" ) : wxT( "%.4f" ); break;
case EDA_UNITS::MM: format = is_eeschema ? wxT( "%.3f" ) : wxT( "%.4f" ); break;
case EDA_UNITS::CM: format = is_eeschema ? wxT( "%.3f" ) : wxT( "%.5f" ); break;
case EDA_UNITS::MILS: format = is_eeschema ? wxT( "%.0f" ) : wxT( "%.2f" ); break;
case EDA_UNITS::INCH: format = is_eeschema ? wxT( "%.3f" ) : wxT( "%.4f" ); break;
@@ -401,6 +401,16 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
text.Printf( format, value );
// Trim to 2-1/2 digits after the decimal place for short-form mm
if( is_eeschema && aUnits == EDA_UNITS::MM )
{
struct lconv* lc = localeconv();
int length = (int) text.Length();
if( length > 4 && text[length - 4] == *lc->decimal_point && text[length - 1] == '0' )
text = text.Left( length - 1 );
}
if( aAddUnitsText )
text += EDA_UNIT_UTILS::GetText( aUnits, aType );
+14 -5
View File
@@ -328,6 +328,9 @@ EMBEDDED_FILES::RETURN_CODE EMBEDDED_FILES::DecompressAndDecode( EMBEDDED_FILE&
// Parsing method
void EMBEDDED_FILES_PARSER::ParseEmbedded( EMBEDDED_FILES* aFiles )
{
// embedded files are version 20240706 and uses also Bars as separator
SetKnowsBar( true );
if( !aFiles )
THROW_PARSE_ERROR( "No embedded files object provided", CurSource(), CurLine(),
CurLineNumber(), CurOffset() );
@@ -547,6 +550,7 @@ const std::vector<wxString>* EMBEDDED_FILES::UpdateFontFiles()
return &m_fontFiles;
}
// Move constructor
EMBEDDED_FILES::EMBEDDED_FILES( EMBEDDED_FILES&& other ) noexcept :
m_files( std::move( other.m_files ) ),
@@ -557,6 +561,7 @@ EMBEDDED_FILES::EMBEDDED_FILES( EMBEDDED_FILES&& other ) noexcept :
other.m_embedFonts = false;
}
// Move assignment operator
EMBEDDED_FILES& EMBEDDED_FILES::operator=(EMBEDDED_FILES&& other) noexcept
{
@@ -569,33 +574,37 @@ EMBEDDED_FILES& EMBEDDED_FILES::operator=(EMBEDDED_FILES&& other) noexcept
m_embedFonts = other.m_embedFonts;
other.m_embedFonts = false;
}
return *this;
}
// Copy constructor
EMBEDDED_FILES::EMBEDDED_FILES( const EMBEDDED_FILES& other ) : m_embedFonts( other.m_embedFonts )
EMBEDDED_FILES::EMBEDDED_FILES( const EMBEDDED_FILES& other ) :
m_embedFonts( other.m_embedFonts )
{
for( const auto& [name, file] : other.m_files )
{
m_files[name] = new EMBEDDED_FILE( *file );
}
m_fontFiles = other.m_fontFiles;
m_fileAddedCallback = other.m_fileAddedCallback;
}
// Copy assignment operator
EMBEDDED_FILES& EMBEDDED_FILES::operator=( const EMBEDDED_FILES& other )
{
if( this != &other )
{
ClearEmbeddedFiles();
for( const auto& [name, file] : other.m_files )
{
m_files[name] = new EMBEDDED_FILE( *file );
}
m_fontFiles = other.m_fontFiles;
m_fileAddedCallback = other.m_fileAddedCallback;
m_embedFonts = other.m_embedFonts;
}
return *this;
}
-6
View File
@@ -47,14 +47,8 @@ static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = {
};
const wxRegEx versionedEnvVarRegex( wxS( "KICAD[0-9]+_[A-Z0-9_]+(_DIR)?" ) );
bool ENV_VAR::IsEnvVarImmutable( const wxString& aEnvVar )
{
if( versionedEnvVarRegex.Matches( aEnvVar ) )
return true;
for( const wxString& s : predefinedEnvVars )
{
if( s == aEnvVar )
+5
View File
@@ -257,6 +257,11 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName, const wxStri
// first attempt to use the name as specified:
wxString tname = aFileName;
// Swap separators for non-Windows, in case a Windows path is being passed
#ifndef __WIN32__
tname.Replace( "\\", "/" );
#endif
// Note: variable expansion must preferably be performed via a threadsafe wrapper for the
// getenv() system call. If we allow the wxFileName::Normalize() routine to perform expansion
// then we will have a race condition since wxWidgets does not assure a threadsafe wrapper
+1
View File
@@ -39,6 +39,7 @@
#include <utility>
#include <wx/tokenzr.h>
#include <kiface_base.h>
#include <locale_io.h>
FOOTPRINT_INFO* FOOTPRINT_LIST::GetFootprintInfo( const wxString& aLibNickname,
const wxString& aFootprintName )
+46 -6
View File
@@ -40,6 +40,7 @@
#include <wx/dir.h>
#include <wx/hash.h>
#include <locale_io.h>
#define OPT_SEP '|' ///< options separator character
@@ -156,6 +157,7 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
case T_uri:
if( sawUri )
in->Duplicate( tok );
sawUri = true;
in->NeedSYMBOLorNUMBER();
row->SetFullURI( in->FromUTF8() );
@@ -164,6 +166,7 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
case T_type:
if( sawType )
in->Duplicate( tok );
sawType = true;
in->NeedSYMBOLorNUMBER();
row->SetType( in->FromUTF8() );
@@ -172,6 +175,7 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
case T_options:
if( sawOpts )
in->Duplicate( tok );
sawOpts = true;
in->NeedSYMBOLorNUMBER();
row->SetOptions( in->FromUTF8() );
@@ -180,6 +184,7 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
case T_descr:
if( sawDesc )
in->Duplicate( tok );
sawDesc = true;
in->NeedSYMBOLorNUMBER();
row->SetDescr( in->FromUTF8() );
@@ -188,6 +193,7 @@ void FP_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
case T_disabled:
if( sawDisabled )
in->Duplicate( tok );
sawDisabled = true;
row->SetEnabled( false );
break;
@@ -307,12 +313,23 @@ long long FP_LIB_TABLE::GenerateTimestamp( const wxString* aNickname )
void FP_LIB_TABLE::FootprintEnumerate( wxArrayString& aFootprintNames, const wxString& aNickname,
bool aBestEfforts )
bool aBestEfforts, const LOCALE_IO* aLocale )
{
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
row->plugin->FootprintEnumerate( aFootprintNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
if( !aLocale )
{
LOCALE_IO toggle_locale;
row->plugin->FootprintEnumerate( aFootprintNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
}
else
{
row->plugin->FootprintEnumerate( aFootprintNames, row->GetFullURI( true ), aBestEfforts,
row->GetProperties() );
}
}
@@ -362,18 +379,33 @@ static void setLibNickname( FOOTPRINT* aModule, const wxString& aNickname,
const FOOTPRINT* FP_LIB_TABLE::GetEnumeratedFootprint( const wxString& aNickname,
const wxString& aFootprintName )
const wxString& aFootprintName,
const LOCALE_IO* aLocale )
{
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
return row->plugin->GetEnumeratedFootprint( row->GetFullURI( true ), aFootprintName,
row->GetProperties() );
if( !aLocale )
{
LOCALE_IO toggle_locale;
return row->plugin->GetEnumeratedFootprint( row->GetFullURI( true ), aFootprintName,
row->GetProperties() );
}
else
{
return row->plugin->GetEnumeratedFootprint( row->GetFullURI( true ), aFootprintName,
row->GetProperties() );
}
}
bool FP_LIB_TABLE::FootprintExists( const wxString& aNickname, const wxString& aFootprintName )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
try
{
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
@@ -392,6 +424,10 @@ bool FP_LIB_TABLE::FootprintExists( const wxString& aNickname, const wxString& a
FOOTPRINT* FP_LIB_TABLE::FootprintLoad( const wxString& aNickname,
const wxString& aFootprintName, bool aKeepUUID )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
@@ -407,6 +443,10 @@ FOOTPRINT* FP_LIB_TABLE::FootprintLoad( const wxString& aNickname,
FP_LIB_TABLE::SAVE_T FP_LIB_TABLE::FootprintSave( const wxString& aNickname,
const FOOTPRINT* aFootprint, bool aOverwrite )
{
// NOT THREAD-SAFE! LOCALE_IO is global!
LOCALE_IO toggle_locale;
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
+8 -4
View File
@@ -1210,7 +1210,8 @@ void CAIRO_GAL_BASE::blitCursor( wxMemoryDC& clientDC )
void CAIRO_GAL_BASE::drawPoly( const std::deque<VECTOR2D>& aPointList )
{
wxCHECK( aPointList.size() > 1, /* void */ );
if( aPointList.size() <= 1 )
return;
// Iterate over the point list and draw the segments
std::deque<VECTOR2D>::const_iterator it = aPointList.begin();
@@ -1235,7 +1236,8 @@ void CAIRO_GAL_BASE::drawPoly( const std::deque<VECTOR2D>& aPointList )
void CAIRO_GAL_BASE::drawPoly( const std::vector<VECTOR2D>& aPointList )
{
wxCHECK( aPointList.size() > 1, /* void */ );
if( aPointList.size() <= 1 )
return;
// Iterate over the point list and draw the segments
std::vector<VECTOR2D>::const_iterator it = aPointList.begin();
@@ -1260,7 +1262,8 @@ void CAIRO_GAL_BASE::drawPoly( const std::vector<VECTOR2D>& aPointList )
void CAIRO_GAL_BASE::drawPoly( const VECTOR2D aPointList[], int aListSize )
{
wxCHECK( aListSize > 1, /* void */ );
if( aListSize <= 1 )
return;
// Iterate over the point list and draw the segments
const VECTOR2D* ptr = aPointList;
@@ -1284,7 +1287,8 @@ void CAIRO_GAL_BASE::drawPoly( const VECTOR2D aPointList[], int aListSize )
void CAIRO_GAL_BASE::drawPoly( const SHAPE_LINE_CHAIN& aLineChain )
{
wxCHECK( aLineChain.PointCount() > 1, /* void */ );
if( aLineChain.PointCount() <= 1 )
return;
syncLineWidth();
+2 -1
View File
@@ -95,7 +95,8 @@ CAIRO_PRINT_CTX::CAIRO_PRINT_CTX( wxDC* aDC ) :
m_hdc = g->GetHDC();
m_surface = cairo_win32_printing_surface_create( static_cast<HDC>( m_hdc ) );
m_ctx = cairo_create( m_surface );
m_dpi = GetDeviceCaps( static_cast<HDC>( m_hdc ), LOGPIXELSX );
wxASSERT( aDC->GetPPI().x == aDC->GetPPI().y );
m_dpi = aDC->GetPPI().x;
#endif /* __WXMSW__ */
#ifdef __WXMAC__
+14 -13
View File
@@ -848,15 +848,16 @@ void OPENGL_GAL::drawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP
VECTOR2D startEndVector = aEndPoint - aStartPoint;
double lineLength = startEndVector.EuclideanNorm();
float startx = aStartPoint.x;
float starty = aStartPoint.y;
float endx = aStartPoint.x + lineLength;
float endy = aStartPoint.y + lineLength;
// Be careful about floating point rounding. As we draw segments in larger and larger
// coordinates, the shader (which uses floats) will lose precision and stop drawing small
// segments. In this case, we need to draw a circle for the minimal segment.
if( startx == endx || starty == endy )
// Check if the coordinate differences can be accurately represented as floats
float startX = static_cast<float>( aStartPoint.x );
float startY = static_cast<float>( aStartPoint.y );
float endX = static_cast<float>( aEndPoint.x );
float endY = static_cast<float>( aEndPoint.y );
if( startX == endX && startY == endY )
{
drawCircle( aStartPoint, aWidth / 2, aReserve );
return;
@@ -1465,7 +1466,8 @@ void OPENGL_GAL::DrawPolygon( const SHAPE_POLY_SET& aPolySet, bool aStrokeTriang
void OPENGL_GAL::DrawPolygon( const SHAPE_LINE_CHAIN& aPolygon )
{
wxCHECK( aPolygon.PointCount() >= 2, /* void */ );
if( aPolygon.PointCount() < 2 )
return;
const int pointCount = aPolygon.SegmentCount() + 1;
std::unique_ptr<GLdouble[]> points( new GLdouble[3 * pointCount] );
@@ -2407,18 +2409,17 @@ void OPENGL_GAL::drawSegmentChain( const std::function<VECTOR2D( int )>& aPointG
auto start = aPointGetter( i - 1 );
auto end = aPointGetter( i );
VECTOR2D startEndVector = end - start;
double lineLength = startEndVector.EuclideanNorm();
float startx = start.x;
float starty = start.y;
float endx = start.x + lineLength;
float endy = start.y + lineLength;
float endx = end.x;
float endy = end.y;
// Be careful about floating point rounding. As we draw segments in larger and larger
// coordinates, the shader (which uses floats) will lose precision and stop drawing small
// segments. In this case, we need to draw a circle for the minimal segment.
if( startx == endx || starty == endy )
// Check if the coordinate differences can be accurately represented as floats
if( startx == endx && starty == endy )
{
vertices += 3; // One circle
continue;
+1 -4
View File
@@ -89,10 +89,7 @@ bool VERTEX_MANAGER::Reserve( unsigned int aSize )
{
if( show_err_reserve )
{
DisplayError(
nullptr,
wxT( "VERTEX_MANAGER::Reserve: Did not use all previous vertices allocated" ) );
DisplayError( nullptr, wxT( "VERTEX_MANAGER::Reserve: Did not use all previous vertices allocated" ) );
show_err_reserve = false;
}
}
+3 -1
View File
@@ -508,7 +508,9 @@ void GRID_TRICKS::onCharHook( wxKeyEvent& ev )
stripped.Replace( COL_SEP, " " );
// Write to the CellEditControl if we can
if( wxTextEntry* te = dynamic_cast<wxTextEntry*>( ev.GetEventObject() ) )
wxTextEntry* te = dynamic_cast<wxTextEntry*>( ev.GetEventObject() );
if( te && te->IsEditable() )
te->WriteText( stripped );
else
paste_text( stripped );
+1 -1
View File
@@ -351,7 +351,7 @@ size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags )
break;
default:
wxASSERT_MSG( false, "Unhandled type in function hash_fp_item() (exporter_gencad.cpp)" );
UNIMPLEMENTED_FOR( aItem->GetClass() );
}
return ret;
+8 -8
View File
@@ -484,7 +484,7 @@ void CADSTAR_ARCHIVE_PARSER::VERTEX::Parse( XNODE* aNode, PARSER_CONTEXT* aConte
void CADSTAR_ARCHIVE_PARSER::VERTEX::AppendToChain( SHAPE_LINE_CHAIN* aChainToAppendTo,
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
double aAccuracy ) const
int aAccuracy ) const
{
if( Type == VERTEX_TYPE::POINT )
{
@@ -598,7 +598,7 @@ void CADSTAR_ARCHIVE_PARSER::SHAPE::Parse( XNODE* aNode, PARSER_CONTEXT* aContex
SHAPE_LINE_CHAIN CADSTAR_ARCHIVE_PARSER::SHAPE::OutlineAsChain(
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
double aAccuracy ) const
int aMaxError ) const
{
SHAPE_LINE_CHAIN outline;
@@ -606,7 +606,7 @@ SHAPE_LINE_CHAIN CADSTAR_ARCHIVE_PARSER::SHAPE::OutlineAsChain(
return outline;
for( const auto& vertex : Vertices )
vertex.AppendToChain( &outline, aCadstarToKicadPointCallback, aAccuracy );
vertex.AppendToChain( &outline, aCadstarToKicadPointCallback, aMaxError );
if( Type != SHAPE_TYPE::OPENSHAPE )
{
@@ -622,14 +622,14 @@ SHAPE_LINE_CHAIN CADSTAR_ARCHIVE_PARSER::SHAPE::OutlineAsChain(
SHAPE_POLY_SET CADSTAR_ARCHIVE_PARSER::SHAPE::ConvertToPolySet(
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
double aAccuracy ) const
int aMaxError ) const
{
SHAPE_POLY_SET polyset;
// We shouldn't convert openshapes to polyset!
wxCHECK( Type != SHAPE_TYPE::OPENSHAPE, polyset );
polyset.AddOutline( OutlineAsChain( aCadstarToKicadPointCallback, aAccuracy ) );
polyset.AddOutline( OutlineAsChain( aCadstarToKicadPointCallback, aMaxError ) );
for( const auto& cutout : Cutouts )
{
@@ -639,12 +639,12 @@ SHAPE_POLY_SET CADSTAR_ARCHIVE_PARSER::SHAPE::ConvertToPolySet(
continue;
for( const auto& cutoutVertex : cutout.Vertices )
cutoutVertex.AppendToChain( &hole, aCadstarToKicadPointCallback, aAccuracy );
cutoutVertex.AppendToChain( &hole, aCadstarToKicadPointCallback, aMaxError );
hole.SetClosed( true );
// Append after closing, to ensre first and last point remain the same
cutout.Vertices.at( 0 ).AppendToChain( &hole, aCadstarToKicadPointCallback, aAccuracy );
cutout.Vertices.at( 0 ).AppendToChain( &hole, aCadstarToKicadPointCallback, aMaxError );
polyset.AddHole( hole );
}
@@ -2785,7 +2785,7 @@ void CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment( EDA_TEXT* aKiCadTextIte
{
if( !aKiCadTextItem->GetText().IsEmpty() )
{
VECTOR2I positionOffset( 0, aKiCadTextItem->GetInterline() );
VECTOR2I positionOffset( 0, aKiCadTextItem->GetInterline( nullptr ) );
RotatePoint( positionOffset, aKiCadTextItem->GetTextAngle() );
//Count num of additional lines
+11 -13
View File
@@ -442,9 +442,10 @@ public:
*/
struct VERTEX : PARSER
{
VERTEX( VERTEX_TYPE aType = VERTEX_TYPE::POINT, POINT aEnd = POINT(),
POINT aCenter = POINT() ) :
Type( aType ), End( aEnd ), Center( aCenter )
VERTEX( VERTEX_TYPE aType = VERTEX_TYPE::POINT, POINT aEnd = POINT(), POINT aCenter = POINT() ) :
Type( aType ),
End( aEnd ),
Center( aCenter )
{}
VERTEX_TYPE Type;
@@ -455,12 +456,11 @@ public:
void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
void AppendToChain( SHAPE_LINE_CHAIN* aChainToAppendTo,
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
double aAccuracy ) const;
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
int aAccuracy ) const;
SHAPE_ARC BuildArc( const VECTOR2I& aPrevPoint,
const std::function<VECTOR2I( const VECTOR2I& )>
aCadstarToKicadPointCallback ) const;
const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback ) const;
};
/**
@@ -493,13 +493,11 @@ public:
static bool IsShape( XNODE* aNode );
void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
SHAPE_LINE_CHAIN OutlineAsChain( const std::function<VECTOR2I( const VECTOR2I& )>
aCadstarToKicadPointCallback,
double aAccuracy ) const;
SHAPE_LINE_CHAIN OutlineAsChain( const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
int aAccuracy ) const;
SHAPE_POLY_SET ConvertToPolySet( const std::function<VECTOR2I( const VECTOR2I& )>
aCadstarToKicadPointCallback,
double aAccuracy ) const;
SHAPE_POLY_SET ConvertToPolySet( const std::function<VECTOR2I( const VECTOR2I& )> aCadstarToKicadPointCallback,
int aAccuracy ) const;
};
+7 -7
View File
@@ -1917,11 +1917,13 @@ ESHEET::ESHEET( wxXmlNode* aSheet, IO_BASE* aIo ) :
/*
* <!ELEMENT sheet (description?, plain?, moduleinsts?, instances?, busses?, nets?)>
*/
description = parseOptionalAttribute<wxString>( aSheet, "description" );
for( wxXmlNode* child = aSheet->GetChildren(); child; child = child->GetNext() )
{
if( child->GetName() == "plain" )
if( child->GetName() == "description" )
{
description = std::make_optional<EDESCRIPTION>( child, aIo );
}
else if( child->GetName() == "plain" )
{
plain = std::make_unique<EPLAIN>( child, aIo );
}
@@ -1932,8 +1934,7 @@ ESHEET::ESHEET( wxXmlNode* aSheet, IO_BASE* aIo ) :
{
if( moduleinst->GetName() == "moduleinst" )
{
std::unique_ptr<EMODULEINST> inst = std::make_unique<EMODULEINST>( moduleinst,
aIo );
std::unique_ptr<EMODULEINST> inst = std::make_unique<EMODULEINST>( moduleinst, aIo );
moduleinsts[ inst->name ] = std::move( inst );
}
}
@@ -1942,8 +1943,7 @@ ESHEET::ESHEET( wxXmlNode* aSheet, IO_BASE* aIo ) :
}
else if( child->GetName() == "instances" )
{
for( wxXmlNode* instance = child->GetChildren(); instance;
instance = instance->GetNext() )
for( wxXmlNode* instance = child->GetChildren(); instance; instance = instance->GetNext() )
{
if( instance->GetName() == "instance" )
instances.emplace_back( std::make_unique<EINSTANCE>( instance, aIo ) );
+2 -3
View File
@@ -1898,7 +1898,7 @@ struct ESHEET : public EAGLE_BASE
* <!ELEMENT sheet (description?, plain?, moduleinsts?, instances?, busses?, nets?)>
*/
opt_wxString description;
std::optional<EDESCRIPTION> description;
std::unique_ptr<EPLAIN> plain;
std::map<wxString, std::unique_ptr<EMODULEINST>> moduleinsts;
std::vector<std::unique_ptr<EINSTANCE>> instances;
@@ -1925,8 +1925,7 @@ struct EMODULE : public EAGLE_BASE
ECOORD dx;
ECOORD dy;
std::optional<EDESCRIPTION> description;
std::optional<EDESCRIPTION> description;
std::map<wxString, std::unique_ptr<EPORT>> ports;
std::map<wxString, std::unique_ptr<EVARIANTDEF>> variantdefs;
std::map<wxString, std::unique_ptr<ESCHEMATIC_GROUP>> groups;
+47 -29
View File
@@ -108,7 +108,7 @@ void EASYEDA_PARSER_BASE::TransformTextToBaseline( EDA_TEXT* textItem,
std::vector<SHAPE_LINE_CHAIN>
EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, bool aForceClosed )
EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aMaxError, bool aForceClosed )
{
std::vector<SHAPE_LINE_CHAIN> result;
@@ -211,41 +211,59 @@ EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, b
}
else if( sym == 'A' )
{
wxString radX, radY, unknown, farFlag, cwFlag, endX, endY;
// Arc command can have multiple consecutive arc parameter sets
while( true )
{
if( pos >= data.size() )
break;
readNumber( radX );
readNumber( radY );
readNumber( unknown );
readNumber( farFlag );
readNumber( cwFlag );
readNumber( endX );
readNumber( endY );
wxUniChar ch = data[pos];
bool isFar = farFlag == wxS( "1" );
bool cw = cwFlag == wxS( "1" );
VECTOR2D rad( Convert( radX ), Convert( radY ) );
VECTOR2D end( Convert( endX ), Convert( endY ) );
while( ch == ' ' || ch == ',' )
{
if( ++pos >= data.size() )
break;
VECTOR2D start = prevPt;
VECTOR2D delta = end - start;
ch = data[pos];
}
double d = delta.EuclideanNorm();
double h = sqrt( std::max( 0.0, rad.x * rad.x - d * d / 4 ) );
if( !isdigit( ch ) && ch != '-' )
break;
//( !far && cw ) => h
//( far && cw ) => -h
//( !far && !cw ) => -h
//( far && !cw ) => h
VECTOR2D arcCenter =
start + delta / 2 + delta.Perpendicular().Resize( ( isFar ^ cw ) ? h : -h );
wxString radX, radY, unknown, farFlag, cwFlag, endX, endY;
SHAPE_ARC arc;
arc.ConstructFromStartEndCenter( RelPos( start ), RelPos( end ), RelPos( arcCenter ),
!cw );
readNumber( radX );
readNumber( radY );
readNumber( unknown );
readNumber( farFlag );
readNumber( cwFlag );
readNumber( endX );
readNumber( endY );
chain.Append( arc, aArcMinSegLen );
bool isFar = farFlag == wxS( "1" );
bool cw = cwFlag == wxS( "1" );
VECTOR2D rad( Convert( radX ), Convert( radY ) );
VECTOR2D end( Convert( endX ), Convert( endY ) );
prevPt = end;
VECTOR2D start = prevPt;
VECTOR2D delta = end - start;
double d = delta.EuclideanNorm();
double h = sqrt( std::max( 0.0, rad.x * rad.x - d * d / 4 ) );
//( !far && cw ) => h
//( far && cw ) => -h
//( !far && !cw ) => -h
//( far && !cw ) => h
VECTOR2D arcCenter = start + delta / 2 + delta.Perpendicular().Resize( ( isFar ^ cw ) ? h : -h );
SHAPE_ARC arc;
arc.ConstructFromStartEndCenter( RelPos( start ), RelPos( end ), RelPos( arcCenter ), !cw );
chain.Append( arc, aMaxError );
prevPt = end;
}
}
else if( sym == 'C' )
{
@@ -266,7 +284,7 @@ EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, b
BEZIER_POLY converter( ctrlPoints );
std::vector<VECTOR2I> bezierPoints;
converter.GetPoly( bezierPoints, aArcMinSegLen );
converter.GetPoly( bezierPoints, aMaxError );
chain.Append( bezierPoints );
+1 -2
View File
@@ -62,8 +62,7 @@ public:
void TransformTextToBaseline( EDA_TEXT* textItem, const wxString& baselineAlign );
std::vector<SHAPE_LINE_CHAIN> ParseLineChains( const wxString& aData, int aArcMinSegLen,
bool aForceClosed );
std::vector<SHAPE_LINE_CHAIN> ParseLineChains( const wxString& aData, int aMaxError, bool aForceClosed );
protected:
VECTOR2D m_relOrigin;
+5
View File
@@ -185,6 +185,11 @@ public:
virtual ~JOB();
// We own at least one list of raw pointers. Don't let the compiler fill in copy c'tors that
// will only land us in trouble.
JOB( const JOB& ) = delete;
JOB& operator=( const JOB& ) = delete;
const std::string& GetType() const { return m_type; };
const std::map<wxString, wxString>& GetVarOverrides() const { return m_varOverrides; }
+3 -5
View File
@@ -42,22 +42,20 @@ void JOB_DISPATCHER::Register( const std::string& aJobTypeName,
}
int JOB_DISPATCHER::RunJob( JOB* job, REPORTER* aReporter )
int JOB_DISPATCHER::RunJob( JOB* job, REPORTER* aReporter, PROGRESS_REPORTER* aProgressReporter )
{
int result = CLI::EXIT_CODES::ERR_UNKNOWN;
REPORTER* existingReporter = m_reporter;
if( aReporter )
{
m_reporter = aReporter;
}
m_progressReporter = aProgressReporter;
job->ClearExistingOutputs();
if( m_jobHandlers.count( job->GetType() ) )
{
result = m_jobHandlers[job->GetType()]( job );
}
m_reporter = existingReporter;
+1 -1
View File
@@ -39,7 +39,7 @@ public:
JOB_DISPATCHER( KIWAY* aKiway );
void Register( const std::string& aJobTypeName, std::function<int( JOB* job )> aHandler,
std::function<bool( JOB* job, wxWindow* aParent )> aConfigHandler );
int RunJob( JOB* aJob, REPORTER* aReporter );
int RunJob( JOB* aJob, REPORTER* aReporter, PROGRESS_REPORTER* aProgressReporter );
bool HandleJobConfig( JOB* aJob, wxWindow* aParent );
void SetReporter( REPORTER* aReporter );
void SetProgressReporter( PROGRESS_REPORTER* aReporter );
+9 -12
View File
@@ -82,8 +82,8 @@ JOB_EXPORT_PCB_3D::JOB_EXPORT_PCB_3D() :
m_vrmlModelDir( wxEmptyString ),
m_vrmlRelativePaths( false )
{
m_params.emplace_back(
new JOB_PARAM<bool>( "overwrite", &m_3dparams.m_Overwrite, m_3dparams.m_Overwrite ) );
m_params.emplace_back( new JOB_PARAM<bool>( "overwrite", &m_3dparams.m_Overwrite,
m_3dparams.m_Overwrite ) );
m_params.emplace_back( new JOB_PARAM<bool>( "use_grid_origin", &m_3dparams.m_UseGridOrigin,
m_3dparams.m_UseGridOrigin ) );
m_params.emplace_back( new JOB_PARAM<bool>( "use_drill_origin", &m_3dparams.m_UseDrillOrigin,
@@ -92,10 +92,9 @@ JOB_EXPORT_PCB_3D::JOB_EXPORT_PCB_3D() :
m_3dparams.m_UseDefinedOrigin ) );
m_params.emplace_back( new JOB_PARAM<bool>( "use_pcb_center_origin", &m_3dparams.m_UsePcbCenterOrigin,
m_3dparams.m_UsePcbCenterOrigin ) );
m_params.emplace_back(
new JOB_PARAM<bool>( "board_only", &m_3dparams.m_BoardOnly, m_3dparams.m_BoardOnly ) );
m_params.emplace_back( new JOB_PARAM<bool>( "include_unspecified",
&m_3dparams.m_IncludeUnspecified,
m_params.emplace_back( new JOB_PARAM<bool>( "board_only", &m_3dparams.m_BoardOnly,
m_3dparams.m_BoardOnly ) );
m_params.emplace_back( new JOB_PARAM<bool>( "include_unspecified", &m_3dparams.m_IncludeUnspecified,
m_3dparams.m_IncludeUnspecified ) );
m_params.emplace_back( new JOB_PARAM<bool>( "include_dnp", &m_3dparams.m_IncludeDNP,
m_3dparams.m_IncludeDNP ) );
@@ -122,8 +121,7 @@ JOB_EXPORT_PCB_3D::JOB_EXPORT_PCB_3D() :
m_3dparams.m_ExportPads ) );
m_params.emplace_back( new JOB_PARAM<bool>( "export_zones", &m_3dparams.m_ExportZones,
m_3dparams.m_ExportZones ) );
m_params.emplace_back( new JOB_PARAM<bool>( "export_inner_copper",
&m_3dparams.m_ExportInnerCopper,
m_params.emplace_back( new JOB_PARAM<bool>( "export_inner_copper", &m_3dparams.m_ExportInnerCopper,
m_3dparams.m_ExportInnerCopper ) );
m_params.emplace_back( new JOB_PARAM<bool>( "export_silkscreen", &m_3dparams.m_ExportSilkscreen,
m_3dparams.m_ExportInnerCopper ) );
@@ -136,10 +134,9 @@ JOB_EXPORT_PCB_3D::JOB_EXPORT_PCB_3D() :
m_params.emplace_back( new JOB_PARAM<wxString>( "vrml_model_dir", &m_vrmlModelDir, m_vrmlModelDir ) );
m_params.emplace_back( new JOB_PARAM<bool>( "vrml_relative_paths", &m_vrmlRelativePaths,
m_vrmlRelativePaths ) );
m_params.emplace_back(
new JOB_PARAM<JOB_EXPORT_PCB_3D::FORMAT>( "format", &m_format, m_format ) );
m_params.emplace_back( new JOB_PARAM<EXPORTER_STEP_PARAMS::FORMAT>(
"occt_format", &m_3dparams.m_Format, m_3dparams.m_Format ) );
m_params.emplace_back( new JOB_PARAM<JOB_EXPORT_PCB_3D::FORMAT>( "format", &m_format, m_format ) );
m_params.emplace_back( new JOB_PARAM<EXPORTER_STEP_PARAMS::FORMAT>( "occt_format", &m_3dparams.m_Format,
m_3dparams.m_Format ) );
}
+4
View File
@@ -84,6 +84,7 @@ JOB_PCB_RENDER::JOB_PCB_RENDER() :
JOB( "render", false ), m_filename()
{
m_params.emplace_back( new JOB_PARAM<FORMAT>( "format", &m_format, m_format ) );
m_params.emplace_back( new JOB_PARAM<std::string>( "preset", &m_appearancePreset, m_appearancePreset ) );
m_params.emplace_back( new JOB_PARAM<QUALITY>( "quality", &m_quality, m_quality ) );
m_params.emplace_back( new JOB_PARAM<BG_STYLE>( "bg_style", &m_bgStyle, m_bgStyle ) );
m_params.emplace_back( new JOB_PARAM<SIDE>( "side", &m_side, m_side ) );
@@ -91,6 +92,9 @@ JOB_PCB_RENDER::JOB_PCB_RENDER() :
m_params.emplace_back( new JOB_PARAM<double>( "zoom", &m_zoom, m_zoom ) );
m_params.emplace_back( new JOB_PARAM<bool>( "perspective", &m_perspective, m_perspective ) );
m_params.emplace_back( new JOB_PARAM<bool>( "floor", &m_floor, m_floor ) );
m_params.emplace_back( new JOB_PARAM<bool>( "anti_alias", &m_antiAlias, m_antiAlias ) );
m_params.emplace_back( new JOB_PARAM<bool>( "post_process", &m_postProcess, m_postProcess ) );
m_params.emplace_back( new JOB_PARAM<bool>( "procedural_textures", &m_proceduralTextures, m_proceduralTextures ) );
m_params.emplace_back( new JOB_PARAM<int>( "width", &m_width, m_width ) );
m_params.emplace_back( new JOB_PARAM<int>( "height", &m_height, m_height ) );
+6 -2
View File
@@ -60,7 +60,8 @@ public:
{
BASIC,
HIGH,
USER
USER,
JOB_SETTINGS
};
enum class BG_STYLE
@@ -85,14 +86,17 @@ public:
BG_STYLE m_bgStyle = BG_STYLE::DEFAULT;
int m_width = 0;
int m_height = 0;
std::string m_colorPreset;
std::string m_appearancePreset;
SIDE m_side = SIDE::TOP;
double m_zoom = 1.0;
bool m_perspective = false;
VECTOR3D m_rotation;
VECTOR3D m_pan;
VECTOR3D m_pivot;
bool m_proceduralTextures = false;
bool m_floor = false;
bool m_antiAlias = true;
bool m_postProcess = false;
VECTOR3D m_lightTopIntensity;
VECTOR3D m_lightBottomIntensity;
VECTOR3D m_lightCameraIntensity;
+2
View File
@@ -24,6 +24,8 @@
#include <wx/string.h>
#include <jobs/job.h>
#define OUTPUT_WORK_PATH_VAR_NAME wxT( "JOBSET_OUTPUT_WORK_PATH" )
class KICOMMON_API JOB_SPECIAL_EXECUTE : public JOB
{
public:
+20 -20
View File
@@ -32,11 +32,12 @@
#include <reporter.h>
#include <algorithm>
#include <memory>
const int jobsFileSchemaVersion = 1;
KICOMMON_API std::map<JOBSET_DESTINATION_T, JOBSET_DESTINATION_T_INFO> JobsetDestinationTypeInfos =
KICOMMON_API std::map<JOBSET_DESTINATION_T, JOBSET_DESTINATION_T_INFO> JobsetDestinationTypeInfos =
{
{ JOBSET_DESTINATION_T::FOLDER,
{ _HKI( "Folder" ), BITMAPS::small_folder, true, "" } },
@@ -134,24 +135,15 @@ JOBSET_DESTINATION::JOBSET_DESTINATION( const wxString& id, JOBSET_DESTINATION_T
}
JOBSET_DESTINATION::~JOBSET_DESTINATION()
{
for( auto& [name, reporter] : m_lastRunReporters )
delete reporter;
m_lastRunReporters.clear();
}
void JOBSET_DESTINATION::InitOutputHandler()
{
if( m_type == JOBSET_DESTINATION_T::FOLDER )
{
m_outputHandler = new JOBS_OUTPUT_FOLDER();
m_outputHandler = std::make_shared<JOBS_OUTPUT_FOLDER>( );
}
else if( m_type == JOBSET_DESTINATION_T::ARCHIVE )
{
m_outputHandler = new JOBS_OUTPUT_ARCHIVE();
m_outputHandler = std::make_shared<JOBS_OUTPUT_ARCHIVE>( );
}
}
@@ -280,16 +272,24 @@ bool JOBSET::SaveToFile( const wxString& aDirectory, bool aForce )
}
JOBSET_DESTINATION* JOBSET::GetDestination( wxString& aDestination )
JOBSET_DESTINATION* JOBSET::FindDestination( wxString& aDestinationStr )
{
auto it = std::find_if( m_destinations.begin(), m_destinations.end(),
[&]( const JOBSET_DESTINATION& destination )
{
if( destination.m_id == aDestination )
return true;
auto is_matching_dest = [&]( const JOBSET_DESTINATION& destination )
{
if( destination.m_id == aDestinationStr || destination.m_description == aDestinationStr )
return true;
return false;
} );
return false;
};
auto count = std::count_if( m_destinations.begin(), m_destinations.end(), is_matching_dest );
// we want to intentionally fail if more than one matching dest exists
// as theres no good way to handle it
if( count != 1 )
return nullptr;
auto it = std::find_if( m_destinations.begin(), m_destinations.end(), is_matching_dest );
if( it != m_destinations.end() )
return &(*it);
+55 -16
View File
@@ -21,15 +21,52 @@
#ifndef JOBS_FILE_H
#define JOBS_FILE_H
#include <reporter.h>
#include <bitmaps/bitmaps_list.h>
#include <jobs/job.h>
#include <jobs/jobs_output.h>
#include <settings/json_settings.h>
#include <settings/parameters.h>
#include <widgets/wx_progress_reporters.h>
#include <ctime>
#include <memory>
class REPORTER;
class JOBSET_OUTPUT_REPORTER : public WX_STRING_REPORTER
{
public:
JOBSET_OUTPUT_REPORTER( const wxString& aTempDirPath, PROGRESS_REPORTER* aProgressReporter ) :
m_tempDirPath( aTempDirPath ),
m_progressReporter( aProgressReporter )
{
}
REPORTER& Report( const wxString& aText, SEVERITY aSeverity ) override
{
wxString text( aText );
if( aSeverity == RPT_SEVERITY_DEBUG && !m_includeDebug )
return *this;
if( aSeverity == RPT_SEVERITY_ACTION )
text.Replace( m_tempDirPath, wxEmptyString );
if( m_progressReporter )
{
m_progressReporter->Report( text );
m_progressReporter->KeepRefreshing();
}
return WX_STRING_REPORTER::Report( text, aSeverity );
}
private:
wxString m_tempDirPath;
bool m_includeDebug;
PROGRESS_REPORTER* m_progressReporter;
};
struct KICOMMON_API JOBSET_JOB
{
@@ -79,26 +116,24 @@ struct KICOMMON_API JOBSET_DESTINATION
JOBSET_DESTINATION( const wxString& id, JOBSET_DESTINATION_T type );
~JOBSET_DESTINATION();
void InitOutputHandler();
wxString m_id;
JOBSET_DESTINATION_T m_type;
wxString m_description;
JOBS_OUTPUT_HANDLER* m_outputHandler;
std::vector<wxString> m_only;
void InitOutputHandler();
wxString GetDescription() const;
void SetDescription( const wxString& aDescription );
///< Transient property, not stored for now
std::optional<bool> m_lastRunSuccess;
std::unordered_map<wxString, std::optional<bool>> m_lastRunSuccessMap;
std::unordered_map<wxString, REPORTER*> m_lastRunReporters;
bool operator==( const JOBSET_DESTINATION& rhs ) const;
public:
wxString m_id;
JOBSET_DESTINATION_T m_type;
wxString m_description;
std::shared_ptr<JOBS_OUTPUT_HANDLER> m_outputHandler;
std::vector<wxString> m_only;
///< Transient property, not stored for now
std::optional<bool> m_lastRunSuccess;
std::unordered_map<wxString, std::optional<bool>> m_lastRunSuccessMap;
std::unordered_map<wxString, std::shared_ptr<JOBSET_OUTPUT_REPORTER>> m_lastRunReporters;
};
@@ -118,7 +153,11 @@ public:
std::vector<JOBSET_DESTINATION>& GetDestinations() { return m_destinations; }
JOBSET_DESTINATION* GetDestination( wxString& aDestination );
/**
* Attempts to find a destination based on the given string
* Both the uuid of the destination and description name are used
*/
JOBSET_DESTINATION* FindDestination( wxString& aDestinationStr );
bool SaveToFile( const wxString& aDirectory = "", bool aForce = false ) override;
+2 -3
View File
@@ -28,11 +28,12 @@
#include <kicad_curl/kicad_curl.h>
#include <mutex>
#include <atomic>
#include <ki_exception.h> // THROW_IO_ERROR
static std::shared_mutex s_curlMutex;
static bool s_curlShuttingDown = false;
static std::atomic<bool> s_curlShuttingDown = false;
void KICAD_CURL::Init()
@@ -40,9 +41,7 @@ void KICAD_CURL::Init()
s_curlShuttingDown = false;
if( curl_global_init( CURL_GLOBAL_ALL ) != CURLE_OK )
{
THROW_IO_ERROR( "curl_global_init() failed." );
}
}
+6 -9
View File
@@ -84,6 +84,7 @@ static size_t stream_write_callback( void* aContents, size_t aSize, size_t aNmem
return realsize;
}
#if LIBCURL_VERSION_NUM >= 0x072000 // 7.32.0
static int xferinfo( void* aProgress, curl_off_t aDLtotal, curl_off_t aDLnow, curl_off_t aULtotal,
@@ -163,11 +164,9 @@ KICAD_CURL_EASY::KICAD_CURL_EASY() :
curl_easy_setopt( m_CURL, CURLOPT_VERBOSE, 1L );
}
wxPlatformInfo platformInfo;
wxString application( wxS( "KiCad" ) );
wxString version( GetBuildVersion() );
wxString platform = wxS( "(" ) + wxGetOsDescription() + wxS( ";" ) +
GetPlatformGetBitnessName();
wxString platform = wxS( "(" ) + wxGetOsDescription() + wxS( ";" ) + GetPlatformGetBitnessName();
#if defined( KICAD_BUILD_ARCH_X64 )
platform << wxS( ";64-bit" );
@@ -181,8 +180,7 @@ KICAD_CURL_EASY::KICAD_CURL_EASY() :
platform << wxS( ")" );
wxString user_agent = wxS( "KiCad/" ) + version + wxS( " " ) + platform + wxS( " " ) +
application;
wxString user_agent = wxS( "KiCad/" ) + version + wxS( " " ) + platform + wxS( " " ) + application;
user_agent << wxS( "/" ) << GetBuildDate();
setOption<const char*>( CURLOPT_USERAGENT, user_agent.ToStdString().c_str() );
@@ -240,8 +238,7 @@ bool KICAD_CURL_EASY::SetUserAgent( const std::string& aAgent )
}
bool KICAD_CURL_EASY::SetPostFields(
const std::vector<std::pair<std::string, std::string>>& aFields )
bool KICAD_CURL_EASY::SetPostFields( const std::vector<std::pair<std::string, std::string>>& aFields )
{
std::string postfields;
@@ -325,8 +322,8 @@ std::string KICAD_CURL_EASY::Escape( const std::string& aUrl )
bool KICAD_CURL_EASY::SetTransferCallback( const TRANSFER_CALLBACK& aCallback, size_t aInterval )
{
progress = std::make_unique<CURL_PROGRESS>( this, aCallback,
static_cast<curl_off_t>( aInterval ) );
progress = std::make_unique<CURL_PROGRESS>( this, aCallback, static_cast<curl_off_t>( aInterval ) );
#if LIBCURL_VERSION_NUM >= 0x072000 // 7.32.0
setOption( CURLOPT_XFERINFOFUNCTION, xferinfo );
setOption( CURLOPT_XFERINFODATA, progress.get() );
+4 -3
View File
@@ -452,8 +452,9 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow
m_ctl // questionable need, these same flags
// were passed to KIFACE::OnKifaceStart()
);
if( frame )
m_playerFrameId[aFrameType].store( frame->GetId() );
m_playerFrameId[aFrameType].store( frame->GetId() );
return frame;
}
catch( ... )
@@ -708,11 +709,11 @@ bool KIWAY::ProcessEvent( wxEvent& aEvent )
}
int KIWAY::ProcessJob( KIWAY::FACE_T aFace, JOB* job, REPORTER* aReporter )
int KIWAY::ProcessJob( KIWAY::FACE_T aFace, JOB* job, REPORTER* aReporter, PROGRESS_REPORTER* aProgressReporter )
{
KIFACE* kiface = KiFACE( aFace );
return kiface->HandleJob( job, aReporter );
return kiface->HandleJob( job, aReporter, aProgressReporter );
}
+15 -17
View File
@@ -217,17 +217,14 @@ const wxString LIB_TABLE::GetDescription( const wxString& aNickname )
bool LIB_TABLE::HasLibrary( const wxString& aNickname, bool aCheckEnabled ) const
{
const LIB_TABLE_ROW* row = findRow( aNickname, aCheckEnabled );
if( row == nullptr )
return false;
return true;
return findRow( aNickname, aCheckEnabled ) != nullptr;
}
bool LIB_TABLE::HasLibraryWithPath( const wxString& aPath ) const
{
std::shared_lock<std::shared_mutex> lock( m_mutex );
for( const LIB_TABLE_ROW& row : m_rows )
{
if( row.GetFullURI() == aPath )
@@ -253,12 +250,12 @@ wxString LIB_TABLE::GetFullURI( const wxString& aNickname, bool aExpandEnvVars )
LIB_TABLE_ROW* LIB_TABLE::findRow( const wxString& aNickName, bool aCheckIfEnabled ) const
{
LIB_TABLE_ROW* row = nullptr;
LIB_TABLE* cur = (LIB_TABLE*) this;
const LIB_TABLE* cur = this;
do
{
std::shared_lock<std::shared_mutex> lock( cur->m_mutex );
LIB_TABLE_ROW* row = nullptr;
if( cur->m_rowsMap.count( aNickName ) )
row = &*cur->m_rowsMap.at( aNickName );
@@ -296,16 +293,18 @@ LIB_TABLE_ROW* LIB_TABLE::findRow( const wxString& aNickName, bool aCheckIfEnabl
const LIB_TABLE_ROW* LIB_TABLE::FindRowByURI( const wxString& aURI )
{
LIB_TABLE* cur = this;
const LIB_TABLE* cur = this;
do
{
for( unsigned i = 0; i < cur->m_rows.size(); i++ )
std::shared_lock<std::shared_mutex> lock( cur->m_mutex );
for( const LIB_TABLE_ROW& row : cur->m_rows)
{
const wxString tmp = cur->m_rows[i].GetFullURI( true );
const wxString tmp = row.GetFullURI( true );
if( m_io->UrisAreEquivalent( tmp, aURI ) )
return &cur->m_rows[i];
return &row;
}
// not found, search fall back table(s), if any
@@ -326,6 +325,8 @@ std::vector<wxString> LIB_TABLE::GetLogicalLibs()
do
{
std::shared_lock<std::shared_mutex> lock( cur->m_mutex );
for( const LIB_TABLE_ROW& row : cur->m_rows )
{
if( row.GetIsEnabled() )
@@ -337,8 +338,8 @@ std::vector<wxString> LIB_TABLE::GetLogicalLibs()
ret.reserve( unique.size() );
// return a sorted, unique set of nicknames in a std::vector<wxString> to caller
for( std::set< wxString >::const_iterator it = unique.begin(); it!=unique.end(); ++it )
ret.push_back( *it );
for( const wxString& nickname : unique )
ret.push_back( nickname );
// We want to allow case-sensitive duplicates but sort by case-insensitive ordering
std::sort( ret.begin(), ret.end(),
@@ -356,7 +357,6 @@ bool LIB_TABLE::InsertRow( LIB_TABLE_ROW* aRow, bool doReplace )
std::lock_guard<std::shared_mutex> lock( m_mutex );
doInsertRow( aRow, doReplace );
reindex();
return true;
}
@@ -540,9 +540,7 @@ void LIB_TABLE::Save( const wxString& aFileName ) const
std::unique_ptr<OUTPUTFORMATTER> sf = m_io->GetWriter( aFileName );
if( !sf )
{
THROW_IO_ERROR( wxString::Format( _( "Failed to get writer for %s" ), aFileName ) );
}
// Force the lib table version to 7 before saving
m_version = 7;
+29 -30
View File
@@ -30,15 +30,6 @@
void LIB_TREE_NODE::ResetScore()
{
for( std::unique_ptr<LIB_TREE_NODE>& child: m_Children )
child->ResetScore();
m_Score = 0;
}
void LIB_TREE_NODE::AssignIntrinsicRanks( bool presorted )
{
std::vector<LIB_TREE_NODE*> sort_buf;
@@ -174,17 +165,14 @@ LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT( LIB_TREE_NODE* aParent, LIB_TREE_ITEM* a
void LIB_TREE_NODE_UNIT::UpdateScore( const std::vector<std::unique_ptr<EDA_COMBINED_MATCHER>>& aMatchers,
std::function<bool( LIB_TREE_NODE& aNode )>* aFilter )
{
m_Score = 1;
// aMatchers test results are inherited from parent
if( !aMatchers.empty() )
m_Score = m_Parent->m_Score;
// aFilter test is subtractive
if( aFilter && !(*aFilter)(*this) )
m_Score = 0;
// show all nodes if no search/filter/etc. criteria are given
if( aMatchers.empty() && ( !aFilter || (*aFilter)(*this) ) )
m_Score = 1;
}
@@ -246,19 +234,24 @@ void LIB_TREE_NODE_ITEM::Update( LIB_TREE_ITEM* aItem )
void LIB_TREE_NODE_ITEM::UpdateScore( const std::vector<std::unique_ptr<EDA_COMBINED_MATCHER>>& aMatchers,
std::function<bool( LIB_TREE_NODE& aNode )>* aFilter )
{
m_Score = 0;
m_Score = 1;
for( const std::unique_ptr<EDA_COMBINED_MATCHER>& matcher : aMatchers )
m_Score += matcher->ScoreTerms( m_SearchTerms );
{
int score = matcher->ScoreTerms( m_SearchTerms );
if( score == 0 )
{
m_Score = 0;
break;
}
m_Score += score;
}
// aFilter test is subtractive
if( aFilter && !(*aFilter)(*this) )
m_Score = 0;
// show all nodes if no search/filter/etc. criteria are given
if( aMatchers.empty() && ( !aFilter || (*aFilter)(*this) ) )
m_Score = 1;
for( std::unique_ptr<LIB_TREE_NODE>& child: m_Children )
child->UpdateScore( aMatchers, aFilter );
}
@@ -290,25 +283,31 @@ void LIB_TREE_NODE_LIBRARY::UpdateScore( const std::vector<std::unique_ptr<EDA_C
{
if( m_Children.empty() )
{
m_Score = 1;
for( const std::unique_ptr<EDA_COMBINED_MATCHER>& matcher : aMatchers )
m_Score += matcher->ScoreTerms( m_SearchTerms );
{
int score = matcher->ScoreTerms( m_SearchTerms );
if( score == 0 )
{
m_Score = 0;
break;
}
m_Score += score;
}
}
else
{
int maxChildScore = 0;
m_Score = 0;
for( std::unique_ptr<LIB_TREE_NODE>& child: m_Children )
{
child->UpdateScore( aMatchers, aFilter );
maxChildScore = std::max( maxChildScore, child->m_Score );
m_Score = std::max( m_Score, child->m_Score );
}
m_Score = std::max( m_Score, maxChildScore );
}
// show all nodes if no search/filter/etc. criteria are given
if( m_Children.empty() && aMatchers.empty() && ( !aFilter || (*aFilter)(*this) ) )
m_Score = 1;
}
-2
View File
@@ -286,8 +286,6 @@ void LIB_TREE_MODEL_ADAPTER::UpdateSearchString( const wxString& aSearch, bool a
Freeze();
BeforeReset();
m_tree.ResetScore();
// Don't cause KiCad to hang if someone accidentally pastes the PCB or schematic into
// the search box.
constexpr int MAX_TERMS = 100;
+71 -49
View File
@@ -60,7 +60,7 @@ namespace LIBEVAL
TREE_NODE* newNode( LIBEVAL::COMPILER* compiler, int op, const T_TOKEN_VALUE& value )
{
auto t2 = new TREE_NODE();
TREE_NODE* t2 = new TREE_NODE();
t2->valid = true;
t2->value.str = value.str ? new wxString( *value.str ) : nullptr;
@@ -88,16 +88,25 @@ static const wxString formatOpName( int op )
{
static const struct
{
int op;
int op;
wxString mnemonic;
}
simpleOps[] =
{
{ TR_OP_MUL, "MUL" }, { TR_OP_DIV, "DIV" }, { TR_OP_ADD, "ADD" },
{ TR_OP_SUB, "SUB" }, { TR_OP_LESS, "LESS" }, { TR_OP_GREATER, "GREATER" },
{ TR_OP_LESS_EQUAL, "LESS_EQUAL" }, { TR_OP_GREATER_EQUAL, "GREATER_EQUAL" },
{ TR_OP_EQUAL, "EQUAL" }, { TR_OP_NOT_EQUAL, "NEQUAL" }, { TR_OP_BOOL_AND, "AND" },
{ TR_OP_BOOL_OR, "OR" }, { TR_OP_BOOL_NOT, "NOT" }, { -1, "" }
{ TR_OP_MUL, "MUL" },
{ TR_OP_DIV, "DIV" },
{ TR_OP_ADD, "ADD" },
{ TR_OP_SUB, "SUB" },
{ TR_OP_LESS, "LESS" },
{ TR_OP_GREATER, "GREATER" },
{ TR_OP_LESS_EQUAL, "LESS_EQUAL" },
{ TR_OP_GREATER_EQUAL, "GREATER_EQUAL" },
{ TR_OP_EQUAL, "EQUAL" },
{ TR_OP_NOT_EQUAL, "NEQUAL" },
{ TR_OP_BOOL_AND, "AND" },
{ TR_OP_BOOL_OR, "OR" },
{ TR_OP_BOOL_NOT, "NOT" },
{ -1, "" }
};
for( int i = 0; simpleOps[i].op >= 0; i++ )
@@ -154,14 +163,12 @@ wxString UOP::Format() const
break;
case TR_UOP_PUSH_VALUE:
{
if( !m_value )
str = wxString::Format( "PUSH nullptr" );
else if( m_value->GetType() == VT_NUMERIC )
str = wxString::Format( "PUSH NUM [%.10f]", m_value->AsDouble() );
else
str = wxString::Format( "PUSH STR [%ls]", m_value->AsString() );
}
break;
case TR_OP_METHOD_CALL:
@@ -183,10 +190,8 @@ wxString UOP::Format() const
UCODE::~UCODE()
{
for ( auto op : m_ucode )
{
for( UOP* op : m_ucode )
delete op;
}
}
@@ -194,7 +199,7 @@ wxString UCODE::Dump() const
{
wxString rv;
for( auto op : m_ucode )
for( UOP* op : m_ucode )
{
rv += op->Format();
rv += "\n";
@@ -253,7 +258,7 @@ bool TOKENIZER::MatchAhead( const wxString& match,
COMPILER::COMPILER() :
m_lexerState( COMPILER::LS_DEFAULT )
m_lexerState( COMPILER::LS_DEFAULT )
{
m_localeDecimalSeparator = '.';
m_sourcePos = 0;
@@ -295,10 +300,10 @@ void COMPILER::Clear()
m_tree = nullptr;
for( auto tok : m_gcItems )
for( TREE_NODE* tok : m_gcItems )
delete tok;
for( auto tok: m_gcStrings )
for( wxString* tok: m_gcStrings )
delete tok;
m_gcItems.clear();
@@ -393,6 +398,7 @@ T_TOKEN COMPILER::getToken()
case LS_DEFAULT:
done = lexDefault( rv );
break;
case LS_STRING:
done = lexString( rv );
break;
@@ -419,7 +425,11 @@ int COMPILER::resolveUnits()
for( const wxString& unitName : m_unitResolver->GetSupportedUnits() )
{
if( m_tokenizer.MatchAhead( unitName, []( int c ) -> bool { return !isalnum( c ); } ) )
if( m_tokenizer.MatchAhead( unitName,
[]( int c ) -> bool
{
return !isalnum( c );
} ) )
{
libeval_dbg(10, "Match unit '%s'\n", unitName.c_str() );
m_tokenizer.NextChar( unitName.length() );
@@ -486,7 +496,6 @@ bool COMPILER::lexDefault( T_TOKEN& aToken )
}
};
int ch;
// Start processing of first/next token: Remove whitespace
@@ -586,8 +595,7 @@ bool COMPILER::lexDefault( T_TOKEN& aToken )
case ',': retval.token = G_COMMA; break;
default:
reportError( CST_PARSE, wxString::Format( _( "Unrecognized character '%c'" ),
(char) ch ) );
reportError( CST_PARSE, wxString::Format( _( "Unrecognized character '%c'" ), (char) ch ) );
break;
}
@@ -778,9 +786,7 @@ static std::vector<TREE_NODE*> squashParamList( TREE_NODE* root )
std::vector<TREE_NODE*> args;
if( !root )
{
return args;
}
if( root->op != TR_ARG_LIST && root->op != TR_NULL )
{
@@ -798,9 +804,7 @@ static std::vector<TREE_NODE*> squashParamList( TREE_NODE* root )
} while ( n && n->op == TR_ARG_LIST );
if( n )
{
args.push_back( n );
}
}
std::reverse( args.begin(), args.end() );
@@ -816,6 +820,9 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
{
std::vector<TREE_NODE*> stack;
wxString msg;
int numericValueCount = 0;
wxString missingUnitsMsg;
int missingUnitsSrcPos = 0;
if( !m_tree )
{
@@ -838,8 +845,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
{
TREE_NODE* node = stack.back();
libeval_dbg( 4, "process node %p [op %d] [stack %lu]\n",
node, node->op, (unsigned long)stack.size() );
libeval_dbg( 4, "process node %p [op %d] [stack %lu]\n", node, node->op, (unsigned long)stack.size() );
// process terminal nodes first
switch( node->op )
@@ -847,10 +853,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
case TR_OP_FUNC_CALL:
// Function call's uop was generated inside TR_STRUCT_REF
if( !node->uop )
{
reportError( CST_CODEGEN, _( "Unknown parent of function parameters" ),
node->srcPos );
}
reportError( CST_CODEGEN, _( "Unknown parent of function parameters" ), node->srcPos );
node->isTerminal = true;
break;
@@ -891,14 +894,12 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
if( !vref )
{
msg.Printf( _( "Unrecognized item '%s'" ), itemName );
reportError( CST_CODEGEN, msg,
node->leaf[0]->srcPos - (int) itemName.length() );
reportError( CST_CODEGEN, msg, node->leaf[0]->srcPos - (int) itemName.length() );
}
else if( vref->GetType() == VT_PARSE_ERROR )
{
msg.Printf( _( "Unrecognized property '%s'" ), propName );
reportError( CST_CODEGEN, msg,
node->leaf[1]->srcPos - (int) propName.length() );
reportError( CST_CODEGEN, msg, node->leaf[1]->srcPos - (int) propName.length() );
}
node->leaf[0]->isVisited = true;
@@ -921,8 +922,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
if( !vref )
{
msg.Printf( _( "Unrecognized item '%s'" ), itemName );
reportError( CST_CODEGEN, msg,
node->leaf[0]->srcPos - (int) itemName.length() );
reportError( CST_CODEGEN, msg, node->leaf[0]->srcPos - (int) itemName.length() );
}
wxString functionName = formatNode( node->leaf[1]->leaf[0] );
@@ -995,8 +995,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
if( !vref )
{
msg.Printf( _( "Unrecognized item '%s'" ), itemName );
reportError( CST_CODEGEN, msg,
node->leaf[0]->srcPos - (int) itemName.length() );
reportError( CST_CODEGEN, msg, node->leaf[0]->srcPos - (int) itemName.length() );
}
msg.Printf( _( "Unrecognized property '%s'" ), propName );
@@ -1038,10 +1037,10 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
{
if( !m_unitResolver->GetSupportedUnitsMessage().empty() )
{
msg.Printf( _( "Missing units for '%s'| (%s)" ),
formatNode( node ),
m_unitResolver->GetSupportedUnitsMessage() );
reportError( CST_CODEGEN, msg, node->srcPos );
missingUnitsMsg.Printf( _( "Missing units for '%s'| (%s)" ),
formatNode( node ),
m_unitResolver->GetSupportedUnitsMessage() );
missingUnitsSrcPos = node->srcPos;
}
value = EDA_UNIT_UTILS::UI::DoubleValueFromString( formatNode( node ) );
@@ -1049,6 +1048,7 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
node->SetUop( TR_UOP_PUSH_VALUE, value );
node->isTerminal = true;
numericValueCount++;
break;
}
@@ -1111,6 +1111,17 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
stack.pop_back();
}
// Report the common error condition of a single numeric value with no units (which will result in
// nanometers, and rarely leads to anything useful).
// Reporting missing units with multiple numeric values is far more complicated as we have to
// separate comparison operators from multiplicative operators from additive operators. Consider:
// 2 * 1.5mm
// 2mm + 105um
// 2mm > 20um
// (2mm + 1.5mm) * 3
if( !missingUnitsMsg.IsEmpty() && numericValueCount == 1 )
reportError( CST_CODEGEN, missingUnitsMsg, missingUnitsSrcPos );
libeval_dbg(2,"dump: \n%s\n", aCode->Dump().c_str() );
return true;
@@ -1131,8 +1142,8 @@ void UOP::Exec( CONTEXT* ctx )
value = ctx->AllocValue();
ctx->Push( value );
}
break;
}
case TR_UOP_PUSH_VALUE:
ctx->Push( m_value.get() );
@@ -1175,27 +1186,34 @@ void UOP::Exec( CONTEXT* ctx )
case TR_OP_ADD:
result = AS_DOUBLE( arg1 ) + AS_DOUBLE( arg2 );
break;
case TR_OP_SUB:
result = AS_DOUBLE( arg1 ) - AS_DOUBLE( arg2 );
break;
case TR_OP_MUL:
result = AS_DOUBLE( arg1 ) * AS_DOUBLE( arg2 );
break;
case TR_OP_DIV:
result = AS_DOUBLE( arg1 ) / AS_DOUBLE( arg2 );
break;
case TR_OP_LESS_EQUAL:
result = AS_DOUBLE( arg1 ) <= AS_DOUBLE( arg2 ) ? 1 : 0;
break;
case TR_OP_GREATER_EQUAL:
result = AS_DOUBLE( arg1 ) >= AS_DOUBLE( arg2 ) ? 1 : 0;
break;
case TR_OP_LESS:
result = AS_DOUBLE( arg1 ) < AS_DOUBLE( arg2 ) ? 1 : 0;
break;
case TR_OP_GREATER:
result = AS_DOUBLE( arg1 ) > AS_DOUBLE( arg2 ) ? 1 : 0;
break;
case TR_OP_EQUAL:
if( !arg1 || !arg2 )
result = arg1 == arg2 ? 1 : 0;
@@ -1204,6 +1222,7 @@ void UOP::Exec( CONTEXT* ctx )
else
result = arg1->EqualTo( ctx, arg2 ) ? 1 : 0;
break;
case TR_OP_NOT_EQUAL:
if( !arg1 || !arg2 )
result = arg1 != arg2 ? 1 : 0;
@@ -1212,18 +1231,21 @@ void UOP::Exec( CONTEXT* ctx )
else
result = arg1->NotEqualTo( ctx, arg2 ) ? 1 : 0;
break;
case TR_OP_BOOL_AND:
result = AS_DOUBLE( arg1 ) != 0.0 && AS_DOUBLE( arg2 ) != 0.0 ? 1 : 0;
break;
case TR_OP_BOOL_OR:
result = AS_DOUBLE( arg1 ) != 0.0 || AS_DOUBLE( arg2 ) != 0.0 ? 1 : 0;
break;
default:
result = 0.0;
break;
}
auto rp = ctx->AllocValue();
VALUE* rp = ctx->AllocValue();
rp->Set( result );
ctx->Push( rp );
return;
@@ -1244,7 +1266,7 @@ void UOP::Exec( CONTEXT* ctx )
break;
}
auto rp = ctx->AllocValue();
VALUE* rp = ctx->AllocValue();
rp->Set( result );
ctx->Push( rp );
return;
@@ -1254,8 +1276,6 @@ void UOP::Exec( CONTEXT* ctx )
VALUE* UCODE::Run( CONTEXT* ctx )
{
static VALUE g_false( 0 );
try
{
for( UOP* op : m_ucode )
@@ -1264,7 +1284,8 @@ VALUE* UCODE::Run( CONTEXT* ctx )
catch(...)
{
// rules which fail outright should not be fired
return &g_false;
std::unique_ptr<VALUE> temp_false = std::make_unique<VALUE>( 0 );
return ctx->StoreValue( temp_false.get() );
}
if( ctx->SP() == 1 )
@@ -1280,7 +1301,8 @@ VALUE* UCODE::Run( CONTEXT* ctx )
wxASSERT( ctx->SP() == 1 );
// non-well-formed rules should not be fired on a release build
return &g_false;
std::unique_ptr<VALUE> temp_false = std::make_unique<VALUE>( 0 );
return ctx->StoreValue( temp_false.get() );
}
}
+15 -18
View File
@@ -223,9 +223,10 @@ wxString LSET::Name( PCB_LAYER_ID aLayerId )
case Rescue: txt = wxT( "Rescue" ); break;
default:
if( aLayerId < 0 )
{
txt = wxT( "UNDEFINED" );
}
else if( static_cast<int>( aLayerId ) & 1 )
{
int offset = ( aLayerId - Rescue ) / 2;
@@ -236,8 +237,6 @@ wxString LSET::Name( PCB_LAYER_ID aLayerId )
int offset = ( aLayerId - B_Cu ) / 2;
txt = wxString::Format( wxT( "In%d.Cu" ), offset );
}
}
return txt;
@@ -561,10 +560,10 @@ const LSET& LSET::BackAssembly()
const LSET& LSET::InternalCuMask()
{
static LSET saved( { In1_Cu, In2_Cu, In3_Cu, In4_Cu, In5_Cu, In6_Cu,
In7_Cu, In8_Cu, In9_Cu, In10_Cu, In11_Cu, In12_Cu,
In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu,
In19_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu,
In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In30_Cu } );
In7_Cu, In8_Cu, In9_Cu, In10_Cu, In11_Cu, In12_Cu,
In13_Cu, In14_Cu, In15_Cu, In16_Cu, In17_Cu, In18_Cu,
In19_Cu, In20_Cu, In21_Cu, In22_Cu, In23_Cu, In24_Cu,
In25_Cu, In26_Cu, In27_Cu, In28_Cu, In29_Cu, In30_Cu } );
return saved;
}
@@ -582,20 +581,18 @@ LSET allCuMask( int aCuLayerCount )
LSET LSET::AllCuMask( int aCuLayerCount )
{
static LSET savedMax = allCuMask( MAX_CU_LAYERS );
static LSET cache;
static int cacheCuLayerCount = -1;
if( aCuLayerCount == MAX_CU_LAYERS )
return savedMax;
return AllCuMask();
if( aCuLayerCount != cacheCuLayerCount )
{
cache = allCuMask( aCuLayerCount );
cacheCuLayerCount = aCuLayerCount;
}
return allCuMask( aCuLayerCount );
}
return cache;
LSET LSET::AllCuMask()
{
static LSET s_savedMax = allCuMask( MAX_CU_LAYERS );
return s_savedMax;
}
+12 -6
View File
@@ -278,7 +278,7 @@ bool NETCLASS::ContainsNetclassWithName( const wxString& netclass ) const
return std::any_of( m_constituents.begin(), m_constituents.end(),
[&netclass]( const NETCLASS* nc )
{
return nc->GetName() == netclass;
return nc && nc->GetName() == netclass;
} );
}
@@ -294,17 +294,23 @@ const wxString NETCLASS::GetHumanReadableName() const
if( m_constituents.size() == 2 )
{
name.Printf( _( "%s and %s" ), m_constituents[0]->GetName(), m_constituents[1]->GetName() );
name.Printf( _( "%s and %s" ),
m_constituents[0]->GetName(),
m_constituents[1]->GetName() );
}
else if( m_constituents.size() == 3 )
{
name.Printf( _( "%s, %s and %s" ), m_constituents[0]->GetName(),
m_constituents[1]->GetName(), m_constituents[2]->GetName() );
name.Printf( _( "%s, %s and %s" ),
m_constituents[0]->GetName(),
m_constituents[1]->GetName(),
m_constituents[2]->GetName() );
}
else if( m_constituents.size() > 3 )
{
name.Printf( _( "%s, %s and %d more" ), m_constituents[0]->GetName(),
m_constituents[1]->GetName(), static_cast<int>( m_constituents.size() - 2 ) );
name.Printf( _( "%s, %s and %d more" ),
m_constituents[0]->GetName(),
m_constituents[1]->GetName(),
static_cast<int>( m_constituents.size() - 2 ) );
}
return name;
+1 -1
View File
@@ -136,7 +136,7 @@ wxString PATHS::GetDefault3rdPartyPath()
tmp.AppendDir( wxT( "3rdparty" ) );
return tmp.GetPath();
return tmp.GetAbsolutePath();
}
+2
View File
@@ -111,6 +111,8 @@ static const char* getDXFLineType( LINE_STYLE aType )
return "DOTTED";
case LINE_STYLE::DASHDOT:
return "DASHDOT";
case LINE_STYLE::DASHDOTDOT:
return "DIVIDE";
default:
wxFAIL_MSG( "Unhandled LINE_STYLE" );
return "CONTINUOUS";
+1 -1
View File
@@ -211,7 +211,7 @@ static double dpoint_dist( const VECTOR2D& a, const VECTOR2D& b );
// PM 2; ends the polygon definition and closes it if not closed
// FP; fills the polygon
// EP; draws the polygon outline. It usually gives a better look to the filled polygon
static const char hpgl_end_polygon_cmd[] = "PM 2; FP; EP;\n";
static const char hpgl_end_polygon_cmd[] = "PM 2; EP; FP;\n";
// HPGL scale factor (1 Plotter Logical Unit = 1/40mm = 25 micrometers)
+1 -2
View File
@@ -1658,9 +1658,8 @@ void PDF_PLOTTER::Text( const VECTOR2I& aPos,
wxStringTokenizer str_tok( aText, " ", wxTOKEN_RET_DELIMS );
// If aFont is not specilied (== nullptr), use the default kicad stroke font
if( !aFont )
aFont = KIFONT::FONT::GetFont();
aFont = KIFONT::FONT::GetFont( m_renderSettings->GetDefaultFont() );
VECTOR2I full_box( aFont->StringBoundaryLimits( aText, t_size, aWidth, aBold, aItalic,
aFontMetrics ) );
+2 -8
View File
@@ -136,15 +136,9 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
case WSG_TEXT_T:
{
DS_DRAW_ITEM_TEXT* text = (DS_DRAW_ITEM_TEXT*) item;
KIFONT::FONT* font = text->GetFont();
KIFONT::FONT* font = text->GetDrawFont( settings );
COLOR4D color = plotColor;
if( !font )
{
font = KIFONT::FONT::GetFont( settings->GetDefaultFont(), text->IsBold(),
text->IsItalic() );
}
if( plotter->GetColorMode() && text->GetTextColor() != COLOR4D::UNSPECIFIED )
color = text->GetTextColor();
@@ -154,8 +148,8 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
text->GetTextAngle(), text->GetTextSize(), text->GetHorizJustify(),
text->GetVertJustify(), penWidth, text->IsItalic(), text->IsBold(),
text->IsMultilineAllowed(), font, text->GetFontMetrics() );
}
break;
}
case WSG_POLY_T:
{
+3 -3
View File
@@ -688,7 +688,7 @@ void PLOTTER::PlotPoly( const SHAPE_LINE_CHAIN& aCornerList, FILL_T aFill, int a
}
void PLOTTER::Text( const VECTOR2I& aPos,
void PLOTTER::Text( const VECTOR2I& aPos,
const COLOR4D& aColor,
const wxString& aText,
const EDA_ANGLE& aOrient,
@@ -745,7 +745,7 @@ void PLOTTER::Text( const VECTOR2I& aPos,
}
if( !aFont )
aFont = KIFONT::FONT::GetFont();
aFont = KIFONT::FONT::GetFont( m_renderSettings->GetDefaultFont() );
aFont->Draw( &callback_gal, aText, aPos, attributes, aFontMetrics );
}
@@ -790,7 +790,7 @@ void PLOTTER::PlotText( const VECTOR2I& aPos,
} );
if( !aFont )
aFont = KIFONT::FONT::GetFont();
aFont = KIFONT::FONT::GetFont( m_renderSettings->GetDefaultFont() );
aFont->Draw( &callback_gal, aText, aPos, attributes, aFontMetrics );
}
@@ -107,7 +107,8 @@ bool POLYGON_GEOM_MANAGER::IsSelfIntersecting( bool aIncludeLeaderPts ) const
void POLYGON_GEOM_MANAGER::SetCursorPosition( const VECTOR2I& aPos )
{
updateTemporaryLines( aPos );
if( m_lockedPoints.PointCount() > 0 )
updateTemporaryLines( aPos );
}
+9 -9
View File
@@ -338,14 +338,15 @@ void RULER_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
DrawTextNextToCursor( aView, end, -rulerVec, cursorStrings, drawingDropShadows );
// basic tick size
const double minorTickLen = 5.0 / gal->GetWorldScale();
const double majorTickLen = minorTickLen * majorTickLengthFactor;
double minorTickLen = 5.0 / gal->GetWorldScale();
double majorTickLen = minorTickLen * majorTickLengthFactor;
minorTickLen = std::min( minorTickLen, (double) INT_MAX / 2.0 );
majorTickLen = std::min( majorTickLen, (double) INT_MAX / 2.0 );
if( m_showTicks )
{
drawTicksAlongLine( aView, origin, rulerVec, minorTickLen, m_iuScale, m_userUnits,
drawingDropShadows );
drawTicksAlongLine( aView, origin, rulerVec, minorTickLen, m_iuScale, m_userUnits, drawingDropShadows );
drawBacksideTicks( aView, origin, rulerVec, majorTickLen, 2, drawingDropShadows );
}
@@ -388,11 +389,10 @@ wxArrayString RULER_ITEM::GetDimensionStrings() const
cursorStrings.push_back( DimensionLabel( "x", temp.x, m_iuScale, m_userUnits ) );
cursorStrings.push_back( DimensionLabel( "y", temp.y, m_iuScale, m_userUnits ) );
cursorStrings.push_back(
DimensionLabel( "r", rulerVec.EuclideanNorm(), m_iuScale, m_userUnits ) );
cursorStrings.push_back( DimensionLabel( "r", rulerVec.EuclideanNorm(), m_iuScale, m_userUnits ) );
EDA_ANGLE angle = -EDA_ANGLE( rulerVec );
cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), angle.AsDegrees(),
m_iuScale, EDA_UNITS::DEGREES ) );
cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), angle.AsDegrees(), m_iuScale,
EDA_UNITS::DEGREES ) );
return cursorStrings;
}
+3 -6
View File
@@ -558,15 +558,12 @@ bool NET_SETTINGS::HasNetclassLabelAssignment( const wxString& netName ) const
void NET_SETTINGS::SetNetclassPatternAssignment( const wxString& pattern, const wxString& netclass )
{
// Replace existing assignment if we have one
// Avoid exact duplicates - these shouldn't cause problems, due to later de-duplication
// but they are unnecessary.
for( auto& assignment : m_netClassPatternAssignments )
{
if( assignment.first->GetPattern() == pattern )
{
assignment.second = netclass;
ClearAllCaches();
if( assignment.first->GetPattern() == pattern && assignment.second == netclass )
return;
}
}
// No assignment, add a new one
+2 -2
View File
@@ -83,7 +83,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
{
if( !aVal.is_array() || aVal.empty() )
{
m_VisibleItems = GAL_SET::DefaultVisible();
m_VisibleItems |= UserVisbilityLayers();
return;
}
@@ -439,7 +439,7 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
if( Contains( ptr ) )
{
if( At( ptr ).is_array() )
if( At( ptr ).is_array() && !At( ptr ).empty() )
At( ptr ).push_back( LAYER_FILLED_SHAPES - GAL_LAYER_ID_START );
else
At( "board" ).erase( "visible_items" );
+10 -1
View File
@@ -406,6 +406,9 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
wxDataViewItem const& aItem,
unsigned int aCol ) const
{
if( !aItem.IsOk() || m_view->IsFrozen() )
return;
const RC_TREE_NODE* node = ToNode( aItem );
const std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
MARKER_BASE* marker = rcItem->GetParent();
@@ -478,8 +481,10 @@ bool RC_TREE_MODEL::GetAttr( wxDataViewItem const& aItem,
unsigned int aCol,
wxDataViewItemAttr& aAttr ) const
{
if( !aItem.IsOk() || m_view->IsFrozen() )
return false;
const RC_TREE_NODE* node = ToNode( aItem );
wxASSERT( node );
bool ret = false;
bool heading = node->m_Type == RC_TREE_NODE::MARKER;
@@ -737,6 +742,8 @@ void RC_TREE_MODEL::NextMarker()
void RC_TREE_MODEL::SelectMarker( const MARKER_BASE* aMarker )
{
wxCHECK( !m_view->IsFrozen(), /* void */ );
for( RC_TREE_NODE* candidate : m_tree )
{
if( candidate->m_RcItem->GetParent() == aMarker )
@@ -750,6 +757,8 @@ void RC_TREE_MODEL::SelectMarker( const MARKER_BASE* aMarker )
void RC_TREE_MODEL::CenterMarker( const MARKER_BASE* aMarker )
{
wxCHECK( !m_view->IsFrozen(), /* void */ );
for( RC_TREE_NODE* candidate : m_tree )
{
if( candidate->m_RcItem->GetParent() == aMarker )
+4
View File
@@ -130,6 +130,10 @@ REPORTER& CLI_REPORTER::Report( const wxString& aMsg, SEVERITY aSeverity )
else
wxFprintf( target, aMsg + wxS( "\n" ) );
// Needed after wxPrintf (or printf) to be sure the message is immediately printed
// (i.e. not stored in some i/o buffer)
fflush( target );
return *this;
}
+6
View File
@@ -95,6 +95,12 @@ std::string StrPrintf( const char* format, ... )
wxString SafeReadFile( const wxString& aFilePath, const wxString& aReadType )
{
// Check the path exists as a file first
// the IsOpened check would be logical, but on linux you can fopen (in read mode) a directory
// And then everything else in here will barf
if( !wxFileExists( aFilePath ) )
THROW_IO_ERROR( wxString::Format( _( "File '%s' does not exist." ), aFilePath ) );
wxString contents;
wxFFile ff( aFilePath );
+10
View File
@@ -201,6 +201,16 @@ void SCINTILLA_TRICKS::onModified( wxStyledTextEvent& aEvent )
} );
}
}
if( m_singleLine || m_te->GetCurrentLine() == 0 )
{
// If the font is larger than the height of a single-line text box we can get issues
// with the text disappearing every other character due to dodgy scrolling behaviour.
CallAfter( [this]()
{
m_te->ScrollToStart();
} );
}
}
+68 -6
View File
@@ -29,6 +29,7 @@
#include <settings/common_settings.h>
#include <settings/grid_settings.h>
#include <settings/parameters.h>
#include <zoom_defines.h>
APP_SETTINGS_BASE::APP_SETTINGS_BASE( const std::string& aFilename, int aSchemaVersion ) :
@@ -349,7 +350,8 @@ bool APP_SETTINGS_BASE::migrateWindowConfig( wxConfigBase* aCfg, const std::stri
}
void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std::string& aJsonPath )
void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std::string& aJsonPath,
int aDefaultWidth, int aDefaultHeight )
{
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".maximized",
&aWindow->state.maximized, false ) );
@@ -357,9 +359,9 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".mru_path",
&aWindow->mru_path, wxS( "" ) ) );
m_params.emplace_back( new PARAM<int>( aJsonPath + ".size_x", &aWindow->state.size_x, 0 ) );
m_params.emplace_back( new PARAM<int>( aJsonPath + ".size_x", &aWindow->state.size_x, aDefaultWidth ) );
m_params.emplace_back( new PARAM<int>( aJsonPath + ".size_y", &aWindow->state.size_y, 0 ) );
m_params.emplace_back( new PARAM<int>( aJsonPath + ".size_y", &aWindow->state.size_y, aDefaultHeight ) );
m_params.emplace_back( new PARAM<wxString>( aJsonPath + ".perspective",
&aWindow->perspective, wxS( "" ) ) );
@@ -369,10 +371,10 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
m_params.emplace_back( new PARAM<int>( aJsonPath + ".pos_y", &aWindow->state.pos_y, 0 ) );
m_params.emplace_back( new PARAM<unsigned int>( aJsonPath + ".display",
&aWindow->state.display, 0 ) );
&aWindow->state.display, 0 ) );
m_params.emplace_back( new PARAM_LIST<double>( aJsonPath + ".zoom_factors",
&aWindow->zoom_factors, {} ) );
&aWindow->zoom_factors, DefaultZoomList(), true /* resetIfEmpty */ ) );
m_params.emplace_back( new PARAM<bool>( aJsonPath + ".grid.axes_enabled",
&aWindow->grid.axes_enabled, false ) );
@@ -393,7 +395,7 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
}
m_params.emplace_back( new PARAM_LIST<GRID>( aJsonPath + ".grid.sizes", &aWindow->grid.grids,
DefaultGridSizeList() ) );
DefaultGridSizeList(), true /* resetIfEmpty */ ) );
m_params.emplace_back( new PARAM<int>( aJsonPath + ".grid.last_size",
&aWindow->grid.last_size_idx, defaultGridIdx ) );
@@ -487,6 +489,30 @@ void APP_SETTINGS_BASE::addParamsForWindow( WINDOW_SETTINGS* aWindow, const std:
}
const std::vector<double> APP_SETTINGS_BASE::DefaultZoomList() const
{
if( m_filename == wxS( "eeschema" ) || m_filename == wxS( "symbol_editor" ) )
{
return { ZOOM_LIST_EESCHEMA };
}
else if( m_filename == wxS( "pl_editor" ) )
{
return { ZOOM_LIST_PL_EDITOR };
}
else if( m_filename == wxS( "gerbview" ) )
{
return { ZOOM_LIST_GERBVIEW };
}
else
{
if( ADVANCED_CFG::GetCfg().m_HyperZoom )
return { ZOOM_LIST_PCBNEW_HYPER };
else
return { ZOOM_LIST_PCBNEW };
}
}
const std::vector<GRID> APP_SETTINGS_BASE::DefaultGridSizeList() const
{
if( m_filename == wxS( "eeschema" ) || m_filename == wxS( "symbol_editor" ) )
@@ -496,6 +522,42 @@ const std::vector<GRID> APP_SETTINGS_BASE::DefaultGridSizeList() const
GRID{ wxEmptyString, wxS( "25 mil" ), wxS( "25 mil" ) },
GRID{ wxEmptyString, wxS( "10 mil" ), wxS( "10 mil" ) } };
}
else if( m_filename == wxS( "pl_editor" ) )
{
return { GRID{ wxEmptyString, wxS( "5.00 mm" ), wxS( "5.00 mm" ) },
GRID{ wxEmptyString, wxS( "2.50 mm" ), wxS( "2.50 mm" ) },
GRID{ wxEmptyString, wxS( "2.00 mm" ), wxS( "2.00 mm" ) },
GRID{ wxEmptyString, wxS( "1.00 mm" ), wxS( "1.00 mm" ) },
GRID{ wxEmptyString, wxS( "0.50 mm" ), wxS( "0.50 mm" ) },
GRID{ wxEmptyString, wxS( "0.25 mm" ), wxS( "0.25 mm" ) },
GRID{ wxEmptyString, wxS( "0.20 mm" ), wxS( "0.20 mm" ) },
GRID{ wxEmptyString, wxS( "0.10 mm" ), wxS( "0.10 mm" ) } };
}
else if( m_filename == wxS( "gerbview" ) )
{
return { GRID{ wxEmptyString, wxS( "100 mil" ), wxS( "100 mil" ) },
GRID{ wxEmptyString, wxS( "50 mil" ), wxS( "50 mil" ) },
GRID{ wxEmptyString, wxS( "25 mil" ), wxS( "25 mil" ) },
GRID{ wxEmptyString, wxS( "20 mil" ), wxS( "20 mil" ) },
GRID{ wxEmptyString, wxS( "10 mil" ), wxS( "10 mil" ) },
GRID{ wxEmptyString, wxS( "5 mil" ), wxS( "5 mil" ) },
GRID{ wxEmptyString, wxS( "2.5 mil" ), wxS( "2.5 mil" ) },
GRID{ wxEmptyString, wxS( "2 mil" ), wxS( "2 mil" ) },
GRID{ wxEmptyString, wxS( "1 mil" ), wxS( "1 mil" ) },
GRID{ wxEmptyString, wxS( "0.5 mil" ), wxS( "0.5 mil" ) },
GRID{ wxEmptyString, wxS( "0.2 mil" ), wxS( "0.2 mil" ) },
GRID{ wxEmptyString, wxS( "0.1 mil" ), wxS( "0.1 mil" ) },
GRID{ wxEmptyString, wxS( "5.0 mm" ), wxS( "5.0 mm" ) },
GRID{ wxEmptyString, wxS( "1.5 mm" ), wxS( "2.5 mm" ) },
GRID{ wxEmptyString, wxS( "1.0 mm" ), wxS( "1.0 mm" ) },
GRID{ wxEmptyString, wxS( "0.5 mm" ), wxS( "0.5 mm" ) },
GRID{ wxEmptyString, wxS( "0.25 mm" ), wxS( "0.25 mm" ) },
GRID{ wxEmptyString, wxS( "0.2 mm" ), wxS( "0.2 mm" ) },
GRID{ wxEmptyString, wxS( "0.1 mm" ), wxS( "0.1 mm" ) },
GRID{ wxEmptyString, wxS( "0.05 mm" ), wxS( "0.0 mm" ) },
GRID{ wxEmptyString, wxS( "0.025 mm" ), wxS( "0.0 mm" ) },
GRID{ wxEmptyString, wxS( "0.01 mm" ), wxS( "0.0 mm" ) } };
}
else
{
return { GRID{ wxEmptyString, wxS( "1000 mil" ), wxS( "1000 mil" ) },
+5 -3
View File
@@ -142,6 +142,8 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
wxString value = var.GetValue();
value.Trim( true ).Trim( false ); // Trim from both sides
// Vars that existed in JSON are persisted, but if they were overridden
// externally, we persist the old value (i.e. the one that was loaded from JSON)
if( var.GetDefinedExternally() )
@@ -168,7 +170,7 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
wxS( "COMMON_SETTINGS: Saving env var %s = %s" ),
var.GetKey(), value);
std::string key( var.GetKey().ToUTF8() );
std::string key( var.GetKey().Trim( true ).Trim( false ).ToUTF8() );
ret[ std::move( key ) ] = value;
}
@@ -181,8 +183,8 @@ COMMON_SETTINGS::COMMON_SETTINGS() :
for( const auto& entry : aJson.items() )
{
wxString key = wxString( entry.key().c_str(), wxConvUTF8 );
wxString val = entry.value().get<wxString>();
wxString key = wxString( entry.key().c_str(), wxConvUTF8 ).Trim( true ).Trim( false );
wxString val = entry.value().get<wxString>().Trim( true ).Trim( false );
if( m_Env.vars.count( key ) )
{
+3 -3
View File
@@ -51,10 +51,10 @@ CVPCB_SETTINGS::CVPCB_SETTINGS() :
addParamsForWindow( &m_FootprintViewer, "footprint_viewer" );
m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom", &m_FootprintViewerZoom,
1.0 ) );
m_params.emplace_back( new PARAM<double>( "footprint_viewer.zoom",
&m_FootprintViewerZoom, 1.0 ) );
m_params.emplace_back( new PARAM<bool>( "footprint_viewer.autozoom",
&m_FootprintViewerAutoZoomOnSelect, true ) );
&m_FootprintViewerAutoZoomOnSelect, true ) );
m_params.emplace_back( new PARAM<bool>( "footprint_viewer.use_45_limit",
&m_ViewersDisplay.m_Use45Limit, true ) );
+4
View File
@@ -446,7 +446,11 @@ bool JSON_SETTINGS::SaveToFile( const wxString& aDirectory, bool aForce )
bool modified = false;
for( NESTED_SETTINGS* settings : m_nested_settings )
{
wxCHECK2( settings, continue );
modified |= settings->SaveToFile();
}
modified |= Store();

Some files were not shown because too many files have changed in this diff Show More