Compare commits

...

1283 Commits

Author SHA1 Message Date
Wayne Stambaugh 8a3464bdf1 Tag stable version 9.0.6. 2025-10-30 08:41:59 -04:00
Alex Shvartzkop 51646e6605 Update translations 2025-10-30 04:51:46 +03:00
Vic e962686afb Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 97.9% (9891 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-10-30 02:50:56 +01:00
2tama3 9211d60d7b Translated using Weblate (Japanese)
Currently translated at 100.0% (10096 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-30 02:50:56 +01:00
Marco Ciampa 632c03a874 Translated using Weblate (Italian)
Currently translated at 98.6% (9958 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/it/
2025-10-30 02:50:56 +01:00
Vic 24d2eded07 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 97.9% (9891 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-10-30 02:50:56 +01:00
தமிழ்நேரம் d3a5bf20db Translated using Weblate (Tamil)
Currently translated at 99.9% (10094 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-10-30 02:50:56 +01:00
Pferd O 099e0d1312 Translated using Weblate (German)
Currently translated at 99.9% (10093 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-30 02:50:56 +01:00
Frank Sonnenberg 3c1bc31456 Translated using Weblate (German)
Currently translated at 99.9% (10093 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-30 02:50:56 +01:00
Vic 2fffc9780b Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 97.8% (9874 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-10-30 02:50:56 +01:00
தமிழ்நேரம் 68bfa2001e Translated using Weblate (Tamil)
Currently translated at 99.8% (10078 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-10-30 02:50:56 +01:00
Sárkány Lőrinc ebdf4c7719 Translated using Weblate (Hungarian)
Currently translated at 39.7% (4012 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-10-30 02:50:55 +01:00
Toni Laiho f944b662b6 Translated using Weblate (Finnish)
Currently translated at 97.6% (9854 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/fi/
2025-10-30 02:50:55 +01:00
Frank Sonnenberg 3ac9bace21 Translated using Weblate (German)
Currently translated at 99.9% (10093 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-30 02:50:55 +01:00
Vic 98141d0143 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 97.7% (9871 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-10-30 02:50:55 +01:00
தமிழ்நேரம் d90d86775b Translated using Weblate (Tamil)
Currently translated at 99.7% (10067 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-10-30 02:50:55 +01:00
dsa-t 578d0a5a4a Translated using Weblate (Russian)
Currently translated at 100.0% (10096 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-10-30 02:50:55 +01:00
2tama3 53075ee9f3 Translated using Weblate (Japanese)
Currently translated at 100.0% (10096 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-30 02:50:55 +01:00
Frank Sonnenberg 7f19d051ed Translated using Weblate (German)
Currently translated at 99.9% (10094 of 10096 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-30 02:50:55 +01:00
Seth Hillbrand 364cf0808f Ensure snaps override grid points 2025-10-29 15:22:52 -07:00
Seth Hillbrand d3cce1e35c Remove H/V/45 limits in router completely
Lots of complaints, little benefit

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

(cherry picked from commit ab0e0abe67)
2025-10-28 17:00:55 -07:00
jean-pierre charras 1b20a932ad Fix Unroute Selected when footprint is select and filter selection pad OFF
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22138

(cherry picked from commit 8ba749bf49)
2025-10-28 18:40:01 +01:00
Jeff Young 3b0dac9491 Fix typo. 2025-10-27 15:35:39 +00:00
Wayne Stambaugh 4433da15b1 Tag stable version 9.0.6 release candidate 2. 2025-10-22 18:40:21 -04:00
Alex Shvartzkop e4af447855 Update translations 2025-10-23 00:59:39 +03:00
தமிழ்நேரம் ecd4326533 Translated using Weblate (Tamil)
Currently translated at 99.5% (10050 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ta/
2025-10-23 00:57:45 +03:00
Sárkány Lőrinc 73854bc9f1 Translated using Weblate (Hungarian)
Currently translated at 39.7% (4009 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-10-23 00:57:30 +03:00
CloverGit 544c035298 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10082 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-10-23 00:57:18 +03:00
aris-kimi c8da489b1f Translated using Weblate (Greek)
Currently translated at 85.6% (8649 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/el/
2025-10-23 00:57:18 +03:00
2tama3 da6f97b24f Translated using Weblate (Japanese)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-23 00:57:08 +03:00
Tokita, Hiroshi 464d248b8c Translated using Weblate (Japanese)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-23 00:57:08 +03:00
CloverGit b790b46c76 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10081 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-10-23 00:56:54 +03:00
Frank Sonnenberg b4a5422e54 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-23 00:56:43 +03:00
Mark Hämmerling 565d54a184 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-23 00:56:43 +03:00
Pferd O ebcf96dcd6 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-23 00:56:43 +03:00
Pferd O e067a8ddc8 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-23 00:56:43 +03:00
Temuri Doghonadze 4d8feb94bd Translated using Weblate (Georgian)
Currently translated at 27.6% (2790 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-23 00:56:27 +03:00
Seth Hillbrand 2374e5e542 Propagate lib_fields changes
Partial cherry-pick of 702f774a1f and
fef84a2c6a
2025-10-22 13:10:04 -07:00
Seth Hillbrand a3e4a001bb Fix HV45 toggle during move
Action handled externally, so trigger internal updates on flag

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22025
2025-10-21 16:44:12 -07:00
Seth Hillbrand edc25f8ba0 Fix axis locking when keypresses are specific
If you immediately pressed left/right it would not unlock unless there
was a mouse movement between
2025-10-21 16:25:49 -07:00
Seth Hillbrand 10a03972d4 Re-enable axis locking on cursor key
This is an accidental feature previously but now make it explicit.
Pressing left or right keys will lock the movement to the horizontal
axis until you press the opposite key.  Same for up/down

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21981
2025-10-21 15:30:26 -07:00
Wayne Stambaugh 5a3c210b7c Revert "Tag stable version 9.0.6 release candidate 2."
This reverts commit 239eb5a1ff.
2025-10-21 16:48:53 -04:00
Wayne Stambaugh 239eb5a1ff Tag stable version 9.0.6 release candidate 2. 2025-10-21 16:39:16 -04:00
Seth Hillbrand c1a1bbc96b Strongly prefer snap points over snap lines
When moving toward an intersection of snap lines that is also a snap
point, when the grid is off, the snap will always be closer to one snap
line or the other before the snap point.  This is problematic for
snapping to a center point, e.g.

Instead, if you are within the snap range of a snap point, that should
be your preference.  Zooming in will allow snapping to the snap physical
point on a line and avoiding the snap point snapping

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22045
2025-10-21 12:07:27 -07:00
Seth Hillbrand c16076a5c3 Remove Local Power from v9 2025-10-21 12:04:57 -07:00
Seth Hillbrand 77ab6c29bf Ensure ERC Exclusions are maintained
After we load/resolve the exclusions, we want to ensure that the
resolved ones are re-recorded into the project file so that it always
remains consistent with the state of the system.  This way, if pcbnew
closes first and re-saves the project, our exclusions are not lost until
the schematic closes

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

(cherry picked from commit 5442e5050e)
2025-10-21 06:27:40 -07:00
Seth Hillbrand 9366902052 Clear the keyboard movement flag on mouse move
We detect mouse movement by checking if the screen position is not the
keyboard position and if not, we clear the
m_lastKeyboardCursorPositionValid that is used for detemining keyboard
movement in snaps

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

(cherry picked from commit 120c788ef0)
2025-10-20 16:34:11 -07:00
Jeff Young 86b687bdaf Minimal cherry-pick of ba73ce78e6. 2025-10-20 14:08:30 +01:00
Wayne Stambaugh 1da4895619 Sync shared symbol instance field values in symbol fields table dialog.
Change data store key from wxString to KIID_PATH to make it easier to look
up shared symbol instances by KIID.
2025-10-16 17:56:18 -04:00
Seth Hillbrand fbf9a45a00 Fix MSVC compile 2025-10-15 17:27:45 -07:00
Seth Hillbrand c6c2d6468d Keep movement snaps aligned with start
Prevents jumping elements when we start to move

(cherry picked from commit d4265ebff8)
2025-10-15 16:51:40 -07:00
Seth Hillbrand b349140112 Snap construction lines to grid if enabled
Nearest grid line intersection is a snap point on construction lines

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

(cherry picked from commit ce305990e8)
2025-10-15 16:49:00 -07:00
Seth Hillbrand 5dafadb12c Prioritize anchor snapping over snapline/grid
We have a number of potential snap points and we would prefer to snap to
identified snap points on objects in the view over ethereal points
created by intersections

(cherry picked from commit ce49e9d69c)
2025-10-15 15:25:55 -07:00
Seth Hillbrand da1f71684c Use full path to match symbols in table/BOM
In the symbol fields table, we can't rely on the UUID being unique
across sheets.  So, we need to keep the full path as our key to unique
symbols

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

N.B. This is similar to but not a direct cherry pick from 8cf33049be
since the branches have diverged
2025-10-15 15:14:50 -07:00
Seth Hillbrand 563a2d20b7 SCH_ITEMs will not always have a schematic pointer
Especially if we are updating a symbol, the pointer is removed, so we
need to be able to handle this case

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21995
2025-10-15 10:01:39 -07:00
Seth Hillbrand f31450018d Add missing acknowlegement for ur-3dmodels library
(cherry picked from commit fcc25071b7)
2025-10-15 06:57:00 -07:00
Seth Hillbrand c329ba2b4c Add link to original GitHub 3D repo
(cherry picked from commit 61f33a2fef)
2025-10-15 06:57:00 -07:00
Seth Hillbrand fe42b1fd6b Fix link to Maui's GitHub
(cherry picked from commit 9067338e37)
2025-10-15 06:57:00 -07:00
Jon Evans 66628a3501 API: Do not attempt to unpack invalid layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21743
2025-10-14 17:55:30 -04:00
Tomasz Wlostowski e21ebbff76 router: improved multidrag segment side/corner determination
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21972
2025-10-14 19:16:42 +03:00
Seth Hillbrand 7df0a80eed Don't write invalid countour data in ODB++
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21974

(cherry picked from commit df76a54db1)
2025-10-13 16:20:11 -07:00
Jeff Young 790dee114b Use the fully-qualified name in the library too.
(Otherwise when we save another symbol with
a different fully-qualified name, but same
elem.text, we'll delete the first instance
which we still have cached.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21947
2025-10-12 20:30:33 +01:00
Seth Hillbrand 3f17abba60 Properly handle choices mapped
If the choice is an integer, we need to be able to handle it directly
because we can't get the wxAny to a wxString if the underlying type
doesn't map

(cherry picked from commit 42a76dd4bd)
2025-10-11 22:55:46 -07:00
Wayne Stambaugh dbca140d17 Tag stable version 9.0.6 release candidate 1. 2025-10-11 13:02:53 -04:00
Alex Shvartzkop d563588b28 Update translations 2025-10-11 04:08:44 +03:00
2tama3 4503abdf80 Translated using Weblate (Japanese)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-11 03:08:00 +02:00
Sárkány Lőrinc d670be0007 Translated using Weblate (Hungarian)
Currently translated at 39.6% (4007 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-10-11 03:08:00 +02:00
Pferd O f55873fc3d Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-11 03:08:00 +02:00
Temuri Doghonadze 330437ee8d Translated using Weblate (Georgian)
Currently translated at 26.4% (2669 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-11 03:08:00 +02:00
Sárkány Lőrinc 61648be38a Translated using Weblate (Hungarian)
Currently translated at 39.5% (3998 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-10-11 03:08:00 +02:00
Frank Sonnenberg 58584cb227 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-11 03:08:00 +02:00
Pferd O 4cab605fb6 Translated using Weblate (German)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-11 03:07:59 +02:00
Henrik Kauhanen 57f6d1c015 Translated using Weblate (Swedish)
Currently translated at 99.7% (10070 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-10-11 03:07:59 +02:00
Seth Hillbrand 57df0435bf Fix double-delete crash
9.0 uses boost to auto-manage the lifetime
2025-10-10 17:23:53 -07:00
Seth Hillbrand 46312674c6 Re-work of 5514396c for v9
All links are processed in the same order

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21913
2025-10-10 17:12:00 -07:00
Quentin Freimanis 32781c3992 altium pcbs: import pad to die length
(cherry picked from commit ad07c85cea)
2025-10-10 15:35:59 -07:00
Seth Hillbrand 48b3408f9a Fix alignment QA
We actually offset by 25, so the check was wrong
2025-10-10 15:19:24 -07:00
Seth Hillbrand e892783109 Move HV45 to suggestions when moving
Snap lines shown when snapped
2025-10-10 14:44:00 -07:00
Seth Hillbrand 5865431759 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping

(cherry picked from commit 29eee9f126)
2025-10-10 13:39:02 -07:00
Seth Hillbrand d75d0ef686 Allow multi-row deleting in 3d models
Removes all selected rows when hitting the trash can

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

(cherry picked from commit 7ebf5f084b)
2025-10-10 10:01:15 -07:00
Seth Hillbrand baf4843a45 Avoid minor overlaps
Some geometry creates 1-2nm overlaps.  These are not actually overlaps
because our collinear test can't correctly determine their
directionality, so we limit the overlap to at least 25 units (arbitrary)
to skip these chunks

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

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

(cherry picked from commit 063430e488)
2025-10-09 17:57:44 -07:00
Alex Shvartzkop 57309d4a62 Update translations 2025-10-08 13:56:58 +03:00
ZbeeGin a9ad99f513 Translated using Weblate (Polish)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-10-08 12:56:21 +02:00
Temuri Doghonadze 5a459ce982 Translated using Weblate (Georgian)
Currently translated at 25.4% (2572 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-08 12:56:21 +02:00
2tama3 32626dfa1d Translated using Weblate (Japanese)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-08 12:56:21 +02:00
Temuri Doghonadze 3406f20a5c Translated using Weblate (Georgian)
Currently translated at 25.4% (2571 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-08 12:56:20 +02:00
2tama3 2fedbaac2e Translated using Weblate (Japanese)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-08 12:56:20 +02:00
Pferd O b3f7e2e827 Translated using Weblate (German)
Currently translated at 99.8% (10083 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-08 12:56:20 +02:00
Frank Sonnenberg 6430bd6c61 Translated using Weblate (German)
Currently translated at 99.8% (10083 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-08 12:56:20 +02:00
Michal Kundrát cb51d324b7 Translated using Weblate (Czech)
Currently translated at 77.9% (7871 of 10097 strings)

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

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-10-08 12:56:20 +02:00
dsa-t fb8716f16a Translated using Weblate (Russian)
Currently translated at 100.0% (10097 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-10-08 12:56:19 +02:00
Temuri Doghonadze 1bdeebf13d Translated using Weblate (Georgian)
Currently translated at 19.2% (1943 of 10097 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-08 12:56:19 +02:00
Jeff Young 3688a9ca61 Support translation of property grid enums.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21859

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

(cherry picked from commit 44f932e9ec)
2025-10-07 13:49:14 +01:00
Jeff Young 94370cc6d8 Support translation in tool context menus that are long-lived.
(The specialized ones are OK as they're created
for each use.)

Also, enum maps must be untranslated.

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

(cherry picked from commit 2fe7219474)
2025-10-07 13:46:54 +01:00
Jeff Young 186839b245 Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21840

(cherry picked from commit e00bb21afd)
2025-10-07 13:44:26 +01:00
Jeff Young c70653c9dc Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21841

(cherry picked from commit 0edae828df)
2025-10-07 13:38:25 +01:00
Jeff Young ed59993fc3 Fix build error. 2025-10-07 13:32:09 +01:00
Jeff Young fec37a0f79 Make sure exclusion hotkey works when dialog has focus.
(Potentially only required on MSW.  Not required
on MacOS, unknown on GTK.)

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

(cherry picked from commit 7003c0639e)
2025-10-07 13:28:41 +01:00
Jeff Young 7a4ab8971c Auto-convert numeric values in fields when referencing them in expressions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21723

(cherry picked from commit 2c102a62e0)
2025-10-07 13:24:21 +01:00
Jeff Young 76cff2e7aa Fix build error. 2025-10-07 13:23:14 +01:00
Jeff Young e95aab5df6 Implement netclass compare for sorting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21345

(cherry picked from commit 3bb1aafdf3)
2025-10-07 12:41:33 +01:00
Seth Hillbrand 0b1fee9f7f Properly account for keyboard movement
We need to snap the position to the grid at the start of movement with
the keyboard because it will snap to the movement point of the item when
we are moving, so the difference between mouse position and grid
position will end up being some fractional value that appears random

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

(cherry picked from commit 4a090ca353)
2025-10-05 21:35:53 -07:00
Seth Hillbrand 8a5c51d37f Properly name Altium subsheets
Instead of using Altium extensions, we need to use KiCad extensions
otherwise, we'll never load them

Fixes https://gitlab.com/kicad/code/kicad/issues/21173
2025-10-05 14:03:15 -07:00
Seth Hillbrand d288dce1d0 Fix Altium subsheet names 2025-10-05 13:57:57 -07:00
Seth Hillbrand 89b92fe3f5 One follow-on to fix additional windows paths
We need to set the format earlier and handle internal filenames

Fixes https://gitlab.com/kicad/code/kicad/issues/20161
2025-10-05 13:53:57 -07:00
Seth Hillbrand cb7385bf0c Update Altium subfolder import
Altium projects save relative sub folder paths in the windows path
format.  To import these correctly, we need to turn off the escape
character handling in wx's config file processing otherwise
SUBFOLDER\PROJECT.SchDoc ends up looking like SUBFOLDERROJECT.SchDoc

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

(cherry picked from commit 4ae76d56c6)
2025-10-05 13:29:29 -07:00
Seth Hillbrand ec6af273bb One more fix for compiling 2025-10-05 06:58:59 -07:00
Seth Hillbrand 0dd4d0e46c Fix cherry-pick error 2025-10-05 06:57:43 -07:00
Seth Hillbrand 2d0c5dc8bd Only constrain points based on settings
There was a false fall-through that caught all points for polygons.
Now, constraint is applied only based on the user keys and settings

Fixes https://gitlab.com/kicad/code/kicad/issues/21897
2025-10-05 06:53:41 -07:00
Alex Shvartzkop 95418742e9 Fix build error. 2025-10-05 16:09:59 +03:00
Seth Hillbrand 53d0d60f33 Force clearing rtree when rebuilding
Avoid leaving stale triangle references

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

(cherry picked from commit b4f396bb2d)
2025-10-05 16:09:59 +03:00
Alex Shvartzkop bf1dbde3c3 Update translations 2025-10-05 16:04:44 +03:00
Temuri Doghonadze 2b1b1b4fcb Translated using Weblate (Georgian)
Currently translated at 17.7% (1786 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-05 15:03:47 +02:00
Sárkány Lőrinc a1066bac65 Translated using Weblate (Hungarian)
Currently translated at 39.4% (3972 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-10-05 15:03:47 +02:00
Temuri Doghonadze a30498a572 Translated using Weblate (Georgian)
Currently translated at 15.0% (1520 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ka/
2025-10-05 15:03:47 +02:00
YÜKSEL AÇIKGÖZ 5403990121 Translated using Weblate (Turkish)
Currently translated at 99.4% (10029 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/tr/
2025-10-05 15:03:47 +02:00
2tama3 2deacd59ef Translated using Weblate (Japanese)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-10-05 15:03:46 +02:00
William Lin 7d67775f45 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 97.9% (9870 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hant/
2025-10-05 15:03:46 +02:00
Henrik Kauhanen c5ef10cf2c Translated using Weblate (Swedish)
Currently translated at 99.8% (10062 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-10-05 15:03:46 +02:00
Frank Sonnenberg 04d0719269 Translated using Weblate (German)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-10-05 15:03:46 +02:00
Seth Hillbrand f143ce563f Protect polygon build
If we don't have corners, then we cannot add any points or lines

(cherry picked from commit f33fd675d2)
2025-10-05 05:58:14 -07:00
Seth Hillbrand 5792a02825 Adjust the project name when importing
Ensures that the proper project is referenced after saving imported
project

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

(cherry picked from commit d0f1920ab6)
2025-10-05 04:58:46 -07:00
Seth Hillbrand 0dc0061d30 When using git, show all files
Git tracks the status of files in the repository, so we shouldn't hide
the non-root schematics

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

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

(cherry picked from commit d5e03741b7)
2025-10-05 04:54:13 -07:00
Seth Hillbrand 2116e272b5 Maintain units even when opening standalone
The unit data is maintained in the instances so we need a temporary
instance setting if we do not have the parent sheet

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

(cherry picked from commit 39ed3c538f)
2025-10-05 04:53:37 -07:00
Seth Hillbrand 25c14ae7cb Ensure new symbols obey the observed sheet number
Internal numerology will not make sense when annotating, so use the
observed sheet number and let the algo ensure that numbers are not
duplicated

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

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

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

(cherry picked from commit 4fcc2ac7e2)
2025-10-05 04:53:16 -07:00
Seth Hillbrand 3a8fc4dd82 Fully separate command and parameters
Ensures proper execution on all platforms

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

(cherry picked from commit 25e9464d2c)
2025-10-05 04:51:17 -07:00
Seth Hillbrand 5558dce259 Handle custom fields from netlist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21648

(cherry picked from commit 2677cae840)
2025-10-05 04:50:53 -07:00
Seth Hillbrand 8fe891a475 Prevent H/V locking when dragging
This avoids the track position locking into arbitrary 90° points.

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

(cherry picked from commit a5090c908d)
2025-10-05 04:50:36 -07:00
Seth Hillbrand 501b63028b Prevent crash in changing units
SCH_ITEM unit is set as a wxString

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

(cherry picked from commit 5b0db05ad2)
2025-10-05 04:50:36 -07:00
Seth Hillbrand b7d7403e6f Dedupe ODB++ symbol names
If we have duplicate symbol names (can happen from plugins), suffix a
number

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

(cherry picked from commit 8cfac03444)
2025-10-05 04:50:36 -07:00
Seth Hillbrand c0648c4728 We need to clamp the index to max - 1
What did we think this was?  Pascal?

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

(cherry picked from commit 9c0727f28e)
2025-10-05 04:50:36 -07:00
Seth Hillbrand a33003cf62 Clean up third axis
Ensure that there are better displays and detects potential power
signals

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

(cherry picked from commit c00e818688)
2025-10-05 04:33:02 -07:00
Seth Hillbrand 1d577cf917 Lazy load git credentials when needed
Prevents querying SecretStore on boot

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

(cherry picked from commit 4ed56d87a4)
2025-10-05 04:32:21 -07:00
Seth Hillbrand d189c6ddbf Enforce spice-valid netnames when parsing
Avoids prematurely trimming netnames containing numbers

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

(cherry picked from commit d6d476e39e)
2025-10-05 04:31:10 -07:00
Seth Hillbrand f781ec82c9 Avoid OtherSideView in 2581B
This was introduced in 2581C, so if we are exporting 2581B, emit the
silk elements as board-level instead of tied to a footprint

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

(cherry picked from commit 1dceb5825d)
2025-10-05 04:15:25 -07:00
Seth Hillbrand 3a33a5b506 Ensure table directories are created
Use static routines to create needed directories before copying files

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

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

(cherry picked from commit 3eeb2a1ad7)
2025-10-05 04:12:22 -07:00
Seth Hillbrand 4436d93446 When copying global tables, ensure writable
Copying read-only files into the user directory, the files will need to
be read/write in order to work correctly

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

(cherry picked from commit ab7c30a2a1)
2025-10-05 04:10:59 -07:00
JamesJCode 238612d2c2 Use hasExactNetclass() function for all implicit net class DRC rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21819

(cherry picked from commit 7c8dd9bf92)
2025-10-04 10:42:00 +01:00
Seth Hillbrand f787c01b47 Clean up lib table cherry-pick and hide
For now, we place this behind the advanced config flag for v9 testing
2025-10-03 17:24:26 -07:00
Seth Hillbrand f8e60b11c9 Fix lib_fields column attributes
Need to properly display footprint selector and datasheet globe

(cherry picked from commit 05d04e665a)
2025-10-03 16:07:22 -07:00
Seth Hillbrand 0f07c4ef78 Prompt for unsaved changes in the lib fields table editor
(cherry picked from commit 344fab5741)
2025-10-03 16:07:22 -07:00
John Beard 6fcfcd28ca Symbol editor: allow to inject the symbol list into DIALOG_LIB_FIELDS
This will permit editing fields for subsets (e.g. only symbols in
a certain inheritance hierarchy)

(cherry picked from commit 9b14434fc3)
2025-10-03 16:06:08 -07:00
Seth Hillbrand 1773eb2b1c ADDED: Library Table Editor
Edits all symbols in a library at once.  Supports copy/paste, multiple
field assignment and selective coloration based on existing data

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

(cherry picked from commit 9cba910d53)
2025-10-03 16:05:52 -07:00
Seth Hillbrand 45bdde41b3 JP's patch to fix crash in routing empty board
(cherry picked from commit 8592b2ee70)
2025-10-03 08:46:36 -07:00
Seth Hillbrand 292faaa48d Protect against invalid line access
When placing, we may have failed to generate a tail, in which case, we
will have no line to split, so just return

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21883
2025-10-03 08:42:56 -07:00
Wayne Stambaugh 44c473c1b3 Only use front/back layer notation "F&B" for zone definitions.
This prevents false positive DRC footprint parity errors caused by commit
088e0e80a1.

(cherry picked from commit 8b525671b1)
2025-10-01 16:01:11 -04:00
Wayne Stambaugh 85474345d6 Begin version 9.0.6 development. 2025-10-01 15:09:57 -04:00
Wayne Stambaugh fda292bd08 Tag stable version 9.0.5. 2025-10-01 15:09:57 -04:00
Alex Shvartzkop c666bf8626 STEP export: paint board body in soldermask color if soldermask export is off
Was broken in 54e9a97b26

Fixes (part of) https://gitlab.com/kicad/code/kicad/-/issues/21865
2025-10-01 21:56:34 +03:00
Alex Shvartzkop 96f20d102b Update translations 2025-09-30 15:10:36 +03:00
Henrik Kauhanen f57cdb52dd Translated using Weblate (Swedish)
Currently translated at 99.8% (10061 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-09-30 14:06:53 +02:00
Frank Sonnenberg a5d2294ec3 Translated using Weblate (German)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:53 +02:00
Frank Sonnenberg 72fdb41b73 Translated using Weblate (German)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:53 +02:00
Pferd O 2ca04123d4 Translated using Weblate (German)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:53 +02:00
2tama3 07a4710363 Translated using Weblate (Japanese)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-30 14:06:52 +02:00
Sárkány Lőrinc c01e37304f Translated using Weblate (Hungarian)
Currently translated at 39.2% (3960 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-30 14:06:52 +02:00
Stefan Bjornelund the Gnome 52b57b1145 Translated using Weblate (Swedish)
Currently translated at 99.8% (10060 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-09-30 14:06:52 +02:00
2tama3 7b4e444f6c Translated using Weblate (Japanese)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-30 14:06:52 +02:00
Sárkány Lőrinc a9f4f85746 Translated using Weblate (Hungarian)
Currently translated at 39.2% (3955 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-30 14:06:52 +02:00
Pferd O bc7ece44eb Translated using Weblate (German)
Currently translated at 99.9% (10070 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:52 +02:00
Sárkány Lőrinc 51cc22a4f2 Translated using Weblate (Hungarian)
Currently translated at 39.1% (3951 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-30 14:06:52 +02:00
Frank Sonnenberg 38f2541a3f Translated using Weblate (German)
Currently translated at 99.9% (10070 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:52 +02:00
Ivan Chuba a05e3de852 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-09-30 14:06:52 +02:00
co8 j 908e7205e7 Translated using Weblate (Japanese)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-30 14:06:52 +02:00
Sárkány Lőrinc a80e410683 Translated using Weblate (Hungarian)
Currently translated at 39.1% (3947 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-30 14:06:52 +02:00
Frank Sonnenberg fa234e4b58 Translated using Weblate (German)
Currently translated at 99.9% (10070 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:52 +02:00
Pferd O fb82e722e1 Translated using Weblate (German)
Currently translated at 99.9% (10070 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:52 +02:00
Максим Горпиніч b45f9e7392 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-09-30 14:06:52 +02:00
dsa-t d496b281ef Translated using Weblate (Russian)
Currently translated at 100.0% (10080 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-09-30 14:06:51 +02:00
Sárkány Lőrinc 2a46ff370a Translated using Weblate (Hungarian)
Currently translated at 39.1% (3942 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-30 14:06:51 +02:00
Pferd O 44d0b27544 Translated using Weblate (German)
Currently translated at 99.8% (10064 of 10080 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-30 14:06:51 +02:00
Jeff Young 7d76868c5c Fix latent bug in UpdatePins().
(It was failing to update the unit and bodystyle.)

(cherry picked from commit 3f1999795c)
2025-09-29 17:30:49 +01:00
Jeff Young e4d9d1829f Honour alternate pin definitions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21618

(cherry picked from commit 19133bc6bd)
2025-09-27 13:36:42 +01:00
Jeff Young e585948861 Formatting.
(cherry picked from commit d140261ab1)
2025-09-27 13:15:02 +01:00
Jeff Young e31b177335 Static cast safety.
(cherry picked from commit 48c9145177)
2025-09-27 13:09:29 +01:00
jean-pierre charras 4624d57bc2 FRAME_FOOTPRINT_CHOOSER and FRAME_FOOTPRINT_VIEWER: fix incorrect save settings
They were saved in cvpcb.json instead of pcbnew.json, and especially for
FRAME_FOOTPRINT_CHOOSER, some settings were incorrectly retrieved because
not actually updated.

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

(cherry picked from commit 8f8edf8d69)
2025-09-26 12:40:21 +02:00
jean-pierre charras 4f2d1ec5a1 French translation update 2025-09-24 08:36:57 +02:00
Alex Shvartzkop 5bcb3edae1 Update translations 2025-09-23 13:55:59 +03:00
Sárkány Lőrinc 30fbfd53c1 Translated using Weblate (Hungarian)
Currently translated at 39.0% (3931 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-23 12:53:01 +02:00
Sárkány Lőrinc dc979be459 Translated using Weblate (Hungarian)
Currently translated at 36.5% (3679 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-23 12:53:01 +02:00
Frank Sonnenberg 450c4517b5 Translated using Weblate (German)
Currently translated at 100.0% (10069 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:01 +02:00
Sárkány Lőrinc 47cd4d6b7a Translated using Weblate (Hungarian)
Currently translated at 36.2% (3648 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-23 12:53:01 +02:00
Pferd O 8842c575c3 Translated using Weblate (German)
Currently translated at 100.0% (10069 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:01 +02:00
CloverGit 858c23f731 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10063 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-23 12:53:01 +02:00
Toni Laiho 1d879d51c5 Translated using Weblate (Finnish)
Currently translated at 97.7% (9842 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/fi/
2025-09-23 12:53:00 +02:00
Pferd O 6e0df489eb Translated using Weblate (German)
Currently translated at 99.9% (10060 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
Henrik Kauhanen a9be5c5759 Translated using Weblate (Swedish)
Currently translated at 99.8% (10057 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-09-23 12:53:00 +02:00
Stefan De Raedemaeker 258e2fd46f Translated using Weblate (Dutch)
Currently translated at 90.6% (9127 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/nl/
2025-09-23 12:53:00 +02:00
Pferd O f5852f0869 Translated using Weblate (German)
Currently translated at 99.9% (10059 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
Henrik Kauhanen 1d0adbc5d6 Translated using Weblate (Swedish)
Currently translated at 99.8% (10056 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-09-23 12:53:00 +02:00
Pferd O 34834fd963 Translated using Weblate (German)
Currently translated at 99.8% (10058 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
Frank Sonnenberg 2f095aeafb Translated using Weblate (German)
Currently translated at 99.8% (10058 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
CloverGit 47bb72179f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10063 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-23 12:53:00 +02:00
Pferd O 9f7af4a3a7 Translated using Weblate (German)
Currently translated at 99.9% (10060 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
Frank Sonnenberg dda127ceec Translated using Weblate (German)
Currently translated at 99.9% (10060 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
Максим Горпиніч 68e6e0a742 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10069 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-09-23 12:53:00 +02:00
2tama3 a844ba713a Translated using Weblate (Japanese)
Currently translated at 100.0% (10069 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-23 12:53:00 +02:00
Frank Sonnenberg 5d75bd0f0a Translated using Weblate (German)
Currently translated at 99.9% (10060 of 10069 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-23 12:53:00 +02:00
jean-pierre charras c492565ee8 DIALOG_LIB_SYMBOL_PROPERTIES: fix incorrect handling of vertical pos. of fields
The Y pos was negated twice when saving the field position.
Note also this is a fast fix. A better fix should be removing these Y pos sign
change in dialog because they are now not needed, but it will wait 9.0.6.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21781
2025-09-21 16:43:20 +02:00
Wayne Stambaugh 879d2bef4b Tag stable version 9.0.5 release candidate 1. 2025-09-20 15:52:28 -04:00
Olliver Schinagl 05376a39ac export_vrml: Skip missing 3D models with warning
(cherry picked from commit 98d77db5ae)
2025-09-20 11:43:55 -04:00
oskarwires 9c01c2aeb8 Fix pin length change and push
(cherry picked from commit abba11031a)
2025-09-20 11:36:25 -04:00
Alex Shvartzkop 72db7bfedc Fix some warnings. 2025-09-19 17:07:47 +03:00
Alex Shvartzkop 95cfe2cc2e STEP export: don't return non-zero error code on non-fatal errors. 2025-09-19 17:06:38 +03:00
Mark Roszko c6f5daf87f Make ERC/DRC jobs default to fail on violation count
(cherry picked from commit 94856f1ffa)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-19 12:01:51 +00:00
Seth Hillbrand b1711d692a Do not hang onto previous elements
When using multi-label input or repeat commands, the previous element
should be deselected so that we can properly transform the current
element

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

(cherry picked from commit 5ed46b823b)
2025-09-18 12:28:55 -07:00
Seth Hillbrand d538182f1f Fix Windows Builds 2025-09-18 11:15:52 -07:00
Wayne Stambaugh b4b87b5c38 Prevent crash dereferencing null pointer when creating schematic table. 2025-09-18 14:05:05 -04:00
Seth Hillbrand eed95e612d Skip exterior segments when splitting
We need to avoid fracture points when choosing how to split exterior
segments

(cherry picked from commit 50274352b1)
2025-09-18 10:30:43 -07:00
Seth Hillbrand 68d3c7f5c2 Force type in wxString 2025-09-17 21:05:39 -07:00
Seth Hillbrand 848d5484d8 Fix mocks 2025-09-17 13:42:22 -07:00
Alexander Boehm d3b84f219c generate rule areas dialog: vertical scroll bars
With many entries the dialog could not be resized by dragging
nor were scroll bars displayed (at least under Linux).

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

(cherry picked from commit 4111140f93)
2025-09-17 11:38:04 -07:00
Seth Hillbrand 58ccf62d2f Unify sheet name validators and apply to properties
Properties panel and properties dialog now share a validator with shared
strings

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

(cherry picked from commit 733a379ca3)
2025-09-17 11:36:53 -07:00
Seth Hillbrand 021229647f Prevent lines from drawing on netclass layer
Only wires and busses get netclasses

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

(cherry picked from commit 5fdfff2b9c)
2025-09-17 11:19:58 -07:00
Seth Hillbrand 9a812bc63c Remove noise from orthographic projection raytracing
We generally add some jitter to the raytracing lines in order to smooth
out over multiple iterations some of the imperfections.  However, when
we do this to an orthographic projection (where all lines are parallel
to start, we don't average and just introduce noticeable noise in the
render

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

(cherry picked from commit abf3438ed6)
2025-09-17 11:18:47 -07:00
Seth Hillbrand 8a9201b79c Update properties to show units
The function duplicated our built-in funcitonality and did not properly
handly outputs

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

(cherry picked from commit 3f8abe3744)
2025-09-17 11:06:25 -07:00
Jeff Young f8e9b3402f Comboboxes for units and body styles.
Also for pin-types in pad properties.

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

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

(cherry picked from commit ec155c00f3)
2025-09-17 11:05:57 -07:00
Seth Hillbrand 808c645933 Don't convert URI slashes on Windows
We auto-convert paths for windows boxes but this should not happen for
uri schemes that have the form <URI>://<path>

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

(cherry picked from commit e85a8056f5)
2025-09-17 10:46:41 -07:00
Adrián García ea467c1bac Fix crash in LIB_SYMBOL::SetUnitCount when reducing unit count
When decreasing the number of units in a symbol, the previous code erased
items directly from m_drawings using a single iterator. Because m_drawings
is a MULTIVECTOR, this could invalidate iterators and attempt to erase
from the wrong bucket, leading to segmentation faults.

This patch iterates bucket by bucket and erases items belonging to units
greater than the requested count. This ensures iterator safety and avoids
accessing invalid memory.

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

(cherry picked from commit fb558eee3c)
2025-09-17 10:46:14 -07:00
Seth Hillbrand c51b6a0cd2 Prevent GTK from providing stale position
When the library name and symbol/footprint name both match the filter,
we try to display both but ensure visible can move things to the wrong
place.  We need to ensure the filtered list is up to date prior to
moving by ensureVisible

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

(cherry picked from commit dc7e0665c3)
2025-09-17 10:45:40 -07:00
Seth Hillbrand 10f16ed82e Prevent modifying teardrops on lock/unlock
This action doesn't affect geometry, so don't dirty the teardrops

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

(cherry picked from commit ad80113f47)
2025-09-17 10:45:17 -07:00
Seth Hillbrand ab9cf326e8 Consider visibility when colliding in DRC
Most places we check this but we should also check it in physical
clearance

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

(cherry picked from commit d9741fd46a)
2025-09-17 10:44:53 -07:00
Seth Hillbrand 4e6087c183 Prevent main KiCad window from expanding based on DPI events
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21602

(cherry picked from commit f5904cf2ac)
2025-09-17 10:44:32 -07:00
Seth Hillbrand e7abf472ba Make properties panel obey free pads setting
Pads should almost never be moved without their parent.  Only allow this
in the case where free pads has explicitly been checked

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

(cherry picked from commit b22f259ccb)
2025-09-17 10:42:58 -07:00
Addo White f0c6b57ab9 Fix for Cursor rendering on Linux+EGL+Nvidia in accelerated graphics mode
EGL/NVidia can sometimes clip the cursor based on its plane regardless
of the depth mask.  This avoids the issue by forcing the cursor up over the existing plane.

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

(cherry picked from commit 843eea259d)
2025-09-17 10:42:13 -07:00
Seth Hillbrand e830709cda Make Expand Connection respect the filter
Prevents expansion that would require traversing elements that are
disabled in the selection filter

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

(cherry picked from commit a811f61c39)
2025-09-17 10:39:58 -07:00
Seth Hillbrand 415aac7fc5 Fix Chessboard splitting
Due to a bug(?) in Clipper2, 45° collinear edges may not be detected.
See https://github.com/AngusJohnson/Clipper2/issues/1008 for current
status.  In the meantime, we pre-process these to remove the extraneous
joints preventing our triangulation from getting mixed up

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

(cherry picked from commit 408e1feae2)
2025-09-17 10:37:44 -07:00
modbw 21f15c3b2a Fix net assignment messed up in Eagle import
When there is a polygon in the Eagle project withput any pad connected
netCode was not incremented and so the wrong nets were assigned to the
following elements.

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

(cherry picked from commit 57ad779797)
2025-09-17 10:36:17 -07:00
Seth Hillbrand 0f8df0bcee Ensure that we check tracks exiting pads for gaps
The DP gap check should look for sections of track that are coupled by
wider than a given spacing.  Our primitive check of looking for
collisions on the segment between the start poins causes tracks exiting
but not entering pads to be excluded.

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

(cherry picked from commit 1e76f1a11d)
2025-09-17 10:34:50 -07:00
Seth Hillbrand d6ef6252a2 Maintain group membership when shoving
Keep track of the original group membership and assign this to the newly
created element as well

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

(cherry picked from commit 2db8c6eca0)
2025-09-17 10:33:36 -07:00
Seth Hillbrand f13c9cbd49 Prevent stale names in fp browser
When switching libraries, if there is an additional footprint with the
same name, we don't want to select it by default as this will prevent
updating the footprint display.  Instead, force the update

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

(cherry picked from commit cb620338db)
2025-09-17 10:29:31 -07:00
Seth Hillbrand c2af66a44b Specialize the pad wall drawing
Avoids slowdown when zoom/pan with many THTs as everything remains
cached.  Still slow in Cairo but this is expected

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

(cherry picked from commit 3ef862f7b6)
2025-09-17 10:27:56 -07:00
Seth Hillbrand 40c50c94fb Help is always valid
Return 0 and no error, just help when the --help flag is present

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

(cherry picked from commit 9dc76f658d)
2025-09-17 10:27:21 -07:00
Seth Hillbrand 0103f92d0e Add more parent safety checks
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21317

(cherry picked from commit e346139301)
2025-09-17 10:26:51 -07:00
Seth Hillbrand 0f27f8b7fc Enforce board-level hole to hole on diff pairs
Makes the router behave like the DRC

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

(cherry picked from commit cac334bb45)
2025-09-17 10:25:56 -07:00
Seth Hillbrand 5631b61dbc Find the proper line split
And avoid leaving duplicate tracks when overlapping

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

(cherry picked from commit 8acdcafe90)
2025-09-17 10:25:32 -07:00
Seth Hillbrand da659f5d05 Manually check pad layers before inserting
We do not rely on GetEffectiveShape(layer) to return null for layers
that the pad does not exist on.

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

(cherry picked from commit 2e1910ca86)
2025-09-17 10:23:46 -07:00
Seth Hillbrand 2029c5389f Move IPC2581 output to REPORTER
Adds a wx_reporter_panel to the 2581 output window, shunt messages
through the reporter instance

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

(cherry picked from commit 44228bd580)
2025-09-17 10:23:21 -07:00
Seth Hillbrand 4205e70775 Update cache when modifying schematic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18297

(cherry picked from commit 2347b290cb)
2025-09-17 10:17:08 -07:00
Seth Hillbrand 4f66225de7 Allow multiple pad->single pin in 2581 correctly
Grouped pads by pin number in the IPC-2581 exporter so only one pin node
is created per number.  Still output multiple pad shapes with the same
number.

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

(cherry picked from commit c1cd4dd157)
2025-09-17 10:16:42 -07:00
Seth Hillbrand 18e4682c3a Set embedded delegate to update view properly
When embedding a 3d model we want to be able to see it immediately but
this requires getting the embedded files from the delegate model

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

(cherry picked from commit bd86f979ed)
2025-09-17 10:16:17 -07:00
Seth Hillbrand 6b540ae1e3 Add embed option to standard file dialog for 3dmodels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20025

(cherry picked from commit 09cdca876c)
2025-09-17 10:15:51 -07:00
Seth Hillbrand 1f12b6c17d Force overlapping wires to share labels
Crossing wires with pathological label in the center are actually
connected for the netlist.  This is an ERC error but we should keep
things consistent.

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

(cherry picked from commit c995d47c87)
2025-09-17 10:11:43 -07:00
Seth Hillbrand e2c23c70f1 Allow soldermask bridging between nettie items
Previously we only allowed graphical items but within the net-tie we
need to allow bridging for connected items as well

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

(cherry picked from commit 8faf1b4d0e)
2025-09-17 10:06:32 -07:00
Seth Hillbrand f60f0394be Fix preferential coordinates in rule display
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11546

(cherry picked from commit eb89d7ffcc)
2025-09-17 10:06:23 -07:00
Seth Hillbrand bd64bcf446 Keep the ruler measurements on screen
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11546

(cherry picked from commit b2fbb326b0)
2025-09-17 10:04:42 -07:00
Seth Hillbrand 176d0f5820 Slight modification to followTrivialPath
Now keeps track of branch points, recursing through them to find the
longest path it can in both directions.  This helps to ignore
overlapping segments

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

(cherry picked from commit 4c5b44545f)
2025-09-17 10:04:13 -07:00
Seth Hillbrand 118ee1c072 Prevent autosave error from cluttering the screen
Once per session, per editor we can show the error.  After that, assume
that the designer has seen and knows about the issue.

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

(cherry picked from commit 9f2b04c7e2)
2025-09-17 09:57:32 -07:00
Seth Hillbrand fd15a1108b Allow wildcard matching for Netclass naming
Fixes https://gitlab.com/kicad/code/kicad/issues/21455

(cherry picked from commit fcd2da354d)
2025-09-17 09:56:46 -07:00
Seth Hillbrand 43b5d4d91f Ensure archives without ext are given .zip
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21423

(cherry picked from commit 2ded7b87af)
2025-09-17 09:56:19 -07:00
Seth Hillbrand d11ab8201f Allow generator actions to affect children
Changing the generator will often modify the underlying children's
properties.  We should store these data in the stack.  Also add the
ability to change layers

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

(cherry picked from commit 3ec380d93c)
2025-09-17 09:55:52 -07:00
Seth Hillbrand 86bae558b4 Fix broken cherry-pick 2025-09-17 09:55:52 -07:00
Seth Hillbrand 68991a7644 Make move tool obey snap settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21192

(cherry picked from commit 8bf7975440)
2025-09-17 09:40:06 -07:00
Seth Hillbrand 0701640c5a Prevent error message when backpropagating
Need to allow only processing other fields

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

(cherry picked from commit 8a081f60b1)
2025-09-17 09:39:14 -07:00
Seth Hillbrand 9fe656a33c Remove namespacing from IPC2581 output
Because some readers maintain global namespace per the standard, we make
sure that we don't overlap names between namespaces but keep the minimum
viable name for each element

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

(cherry picked from commit 8f625086b1)
2025-09-17 09:38:48 -07:00
Seth Hillbrand 3fb8f22fd3 Have Find dialog update its cache on board mod
We don't want to find stale references

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

(cherry picked from commit 1a8dac9296)
2025-09-17 09:30:30 -07:00
Seth Hillbrand 929930fb3a Show inherited fields in symbols
When working with derived symbols, make sure that we show all of the
fields, not just the ones that are defined in the current level since
they are all attached to the output.

Inherited fields are shown in italics until changed

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

(cherry picked from commit ff5a309386)
2025-09-17 09:12:09 -07:00
Seth Hillbrand 4195b874d5 Properly order netlist pages
We cannot reorder these without updating the defines.  So, keep the GUI
in line with the definitions

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

(cherry picked from commit 497afffd48)
2025-09-17 17:59:08 +02:00
Jeff Young ae0d6c80dd Don't overwrite footprint filters created from multiple tokens in footprint column.
(cherry picked from commit 9ddb5465e1)
2025-09-17 13:13:23 +01:00
Jeff Young 4e2f84727c ADDED: support for multiple footprints in the footprint json from HTTP libraries
These are semi-colon-separated.

This is different from the footprint_filters dict entry, which is space-separated.

The first footprint in the footprint dict entry
will go into the "Footprint" field, while the rest
will go into the symbol's footprint filters.

(cherry picked from commit 91405ae34d)
2025-09-17 13:13:17 +01:00
Jeff Young 35889130e8 Formatting and naming conventions.
(cherry picked from commit 2eb3518e49)
2025-09-17 13:10:56 +01:00
Jeff Young 2e7145cc4b ADDED: handling of meta-data items in REST libraries.
"description" and "keywords" must hold string values;
"footprint_filters" can either hold a (space-
separated) string value, or an array of strings.

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

(cherry picked from commit 1f1f490887)
2025-09-17 13:02:09 +01:00
Jeff Young e0d955993c Catch all errors thrown by nanodbc.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21707

(cherry picked from commit 37df36be62)
2025-09-17 13:00:45 +01:00
Mark Roszko cd7a646fcc Fix up arm assembly compiling on windows 2025-09-15 21:01:50 -04:00
Mark Roszko cb2a09d17c Edit ConfigurePlatform.cmake
(cherry picked from commit bda994c00a)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-15 23:47:12 +00:00
Mark Roszko d0cb210427 Also set CMAKE_SYSTEM_PROCESSOR in win cross compile
(cherry picked from commit e02008630f)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-15 23:43:55 +00:00
Seth Hillbrand b89d77bf36 Do not leave stale edges floating around
We assume that all net edges are valid in too many places

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21745
2025-09-15 07:01:18 -07:00
Mark Roszko 7fdeb4796a Manually set CMAKE_CROSSCOMPILING on MSVC.
(cherry picked from commit accb0ddcd1)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-14 15:00:49 +00:00
Roberto Fernandez Bautista e82088a59b Windows CI: custom vcpkg triplet to ensure shareable binary cache
(cherry picked from commit 8d8bd7253f)
2025-09-13 23:45:41 +02:00
Seth Hillbrand 5a5191361f Second pass at fixing warping and grids
First attempt caused additional problems for #21535

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

(cherry picked from commit 2cdeb0cd7c)
2025-09-12 10:52:36 +02:00
jean-pierre charras b47f8f4504 Revert "Remove the forced ancillary grid"
This reverts commit 7b602142b1.
2025-09-12 10:51:29 +02:00
jean-pierre charras 00ae91d6b5 Gerbview: fix broken behavior for deprecated command IPPOS and IPNEG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21715

(cherry picked from commit 45166bf5c3)
2025-09-11 14:32:17 +02:00
Jeff Young 097e0eadf1 LIBEVAL::CONTEXT manages its own local VALUEs.
Don't use std::unique_ptr as we'll just free the
value right after storing it.

Also, don't try to execute a non-existent function.

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

(cherry picked from commit 6ab6283e2e)
2025-09-11 12:50:31 +01:00
Jeff Young c8c293dca8 Don't allow stack addresses to escape via long-life handlers.
(cherry picked from commit cff261ce2e)
2025-09-09 14:57:13 +01:00
Jeff Young e6cfd1cdcf Formatting.
(cherry picked from commit b98621c8c8)
2025-09-09 14:57:13 +01:00
Jeff Young 905170b4f4 Only test parameters under the same conditions as we'd write them to the file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21520

(cherry picked from commit 8ae2ad3586)
2025-09-09 14:57:12 +01:00
Jeff Young 57fa8ea2b9 Use WX_GRID::ClearRows() to avoid assertions.
Fixes KICAD-VM1.

(cherry picked from commit 0b102fc085)
2025-09-09 14:57:12 +01:00
Jeff Young c7730a00c4 Fix typo.
(cherry picked from commit 330361d0cb)
2025-09-09 14:57:12 +01:00
Alex Shvartzkop beaaf3b5be Update translations 2025-09-09 01:19:33 +03:00
dsa-t b644f15d7f Translated using Weblate (Hungarian)
Currently translated at 36.0% (3630 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:18:33 +02:00
Sárkány Lőrinc af398762db Translated using Weblate (Hungarian)
Currently translated at 36.0% (3630 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:18:33 +02:00
CloverGit dfd40b566d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-09 00:16:32 +02:00
KB e056ef2693 Translated using Weblate (Hungarian)
Currently translated at 36.0% (3630 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:32 +02:00
ZbeeGin 02d0944546 Translated using Weblate (Polish)
Currently translated at 99.5% (10019 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-09-09 00:16:32 +02:00
Nguyễn Ngọc Khánh 1aba70ca37 Translated using Weblate (Vietnamese)
Currently translated at 23.5% (2368 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/vi/
2025-09-09 00:16:32 +02:00
Frank Sonnenberg ff8b82d060 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
ssantos 68d1e3223a Translated using Weblate (Portuguese)
Currently translated at 98.5% (9922 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pt/
2025-09-09 00:16:31 +02:00
Frank Sonnenberg 9e64d52a38 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
CloverGit f7b3c0226b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-09 00:16:31 +02:00
Frank Sonnenberg 17fc05ec45 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
Pferd O b64f1f2bd3 Translated using Weblate (German)
Currently translated at 99.9% (10063 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
Frank Sonnenberg b32d8862da Translated using Weblate (German)
Currently translated at 99.9% (10063 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
Hesham Eina Abdalla ff061e51a0 Translated using Weblate (Arabic)
Currently translated at 1.1% (117 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ar/
2025-09-09 00:16:31 +02:00
Ivan Chuba 6020e6d6f9 Translated using Weblate (Estonian)
Currently translated at 3.5% (357 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/et/
2025-09-09 00:16:31 +02:00
Frank Sonnenberg a3fffc868f Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:31 +02:00
Frank Sonnenberg 9670aa1b8a Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
Frank Sonnenberg 85ba5ae406 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
Pferd O faa3287fd6 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
ZbeeGin 33ab1d9242 Translated using Weblate (Polish)
Currently translated at 99.5% (10018 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/pl/
2025-09-09 00:16:30 +02:00
Frank Sonnenberg 01aa2d7e42 Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
Sárkány Lőrinc b24e2ac00d Translated using Weblate (Hungarian)
Currently translated at 35.9% (3617 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:30 +02:00
Frank Sonnenberg 2bc3ef82dc Translated using Weblate (German)
Currently translated at 99.9% (10065 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
Sárkány Lőrinc 672ba5cd41 Translated using Weblate (Hungarian)
Currently translated at 35.6% (3591 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:30 +02:00
Pferd O 905b9ae6c5 Translated using Weblate (German)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:30 +02:00
CloverGit f81a203c22 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-09 00:16:29 +02:00
Sárkány Lőrinc 7aa0431a60 Translated using Weblate (Hungarian)
Currently translated at 34.3% (3459 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:29 +02:00
Pferd O 57505674f8 Translated using Weblate (German)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:29 +02:00
2tama3 558bef00cc Translated using Weblate (Japanese)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-09 00:16:29 +02:00
Sárkány Lőrinc 28f9bd797a Translated using Weblate (Hungarian)
Currently translated at 34.2% (3446 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:29 +02:00
CloverGit 52d6fc66f1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-09-09 00:16:28 +02:00
Максим Горпиніч ab49e9b29d Translated using Weblate (Ukrainian)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/uk/
2025-09-09 00:16:28 +02:00
Henrik Kauhanen f6710e64de Translated using Weblate (Swedish)
Currently translated at 99.9% (10058 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/sv/
2025-09-09 00:16:28 +02:00
dsa-t 804154e21d Translated using Weblate (Russian)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ru/
2025-09-09 00:16:28 +02:00
2tama3 03cb8521bc Translated using Weblate (Japanese)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ja/
2025-09-09 00:16:28 +02:00
Sárkány Lőrinc 3ee940e3fb Translated using Weblate (Hungarian)
Currently translated at 34.2% (3445 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/hu/
2025-09-09 00:16:28 +02:00
Frank Sonnenberg 8b25c3b0fe Translated using Weblate (German)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:28 +02:00
Pferd O 529cf246d2 Translated using Weblate (German)
Currently translated at 100.0% (10066 of 10066 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/de/
2025-09-09 00:16:27 +02:00
Mark Roszko 7e7c281a64 Fix unit binder dropdown not working on windows
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20626


(cherry picked from commit 0f97f51ba1)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-08 10:41:03 +00:00
Mark Roszko 350925f10a Shoehorn an improvement to table sorting to keep files more stable
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21652
2025-09-07 10:34:12 -04:00
Mark Roszko 5e8982600a Update ngspice to 45.2
(cherry picked from commit 922699f388)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-06 17:41:01 +00:00
Mark Roszko e633af9216 Update kicad-vcpkg and ngspice 2025-09-06 12:49:44 +00:00
jean-pierre charras b0f21e5452 DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE: fix a incorrect widgets type
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21662

From master branch
2025-09-06 13:28:41 +02:00
jean-pierre charras d2d582cc00 PCB_DIM_CENTER: fix incorrect bounding box size for 90deg cross.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21643

From master branch
2025-09-05 10:03:44 +02:00
jean-pierre charras 4f11681c4a French translation: fix typo 2025-09-05 09:51:45 +02:00
Mark Roszko 897ebee00f Fix position of package properties that must follow packages
(cherry picked from commit 9f1aa612ec)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-04 11:16:28 +00:00
Mark Roszko be0a42a09a Fix typo in allegro output for nets
(cherry picked from commit 9de2548064)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-04 11:09:35 +00:00
Mark Roszko 3069799a2d Fix double quoting tol for some reason
(cherry picked from commit a899da7cb7)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2025-09-04 03:00:05 +00:00
Mark Roszko ad22e53518 Fix the allegro netlist export and move mostly to {fmt}
Weirdly $PACKAGES header got shifted out of position.
Drop generating empty references.
2025-09-03 22:56:25 -04:00
Seth Hillbrand 2ef05eb191 Fix image pasting for MacOS
Apparently, GetImage() on MacOS does not always convert the image
properly.  So do a two-step here to get the Bitmap first, forcing the
conversion and then going back to an image

(cherry picked from commit 9f06d1f66b)
2025-09-03 09:20:12 -07:00
Seth Hillbrand 235e583182 Prevent crash in nettie
We need to avoid collecting invalid layers in the net ties regardless of
their origins

(cherry picked from commit 826f15a103)
2025-09-02 19:19:50 -07:00
Seth Hillbrand 76ce4ec535 Prevent pads from moving inappropriately
Free pads is a setting unless we are in the footprint editor and needs
to be respected by the alignmen tool

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

(cherry picked from commit 1f1f8699e0)
2025-09-02 09:11:48 -07:00
Jeff Young 0226481156 Give Mac dock icon menu a kick.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17596

(cherry picked from commit 98b63389c1)
2025-09-01 22:36:37 +01:00
Seth Hillbrand 8fab2d8ca3 Disable snap when moving with keyboard
Keyboard movement is for precision control, so avoid snapping behavior

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

(cherry picked from commit 9e326c29db)
2025-09-01 14:23:36 -07:00
Jeff Young 1c6d8b3f5e Don't reference stack variables from a long-life lambda.
In particular, a lambda for conditional menus should
never capture more than `[this]`.  Even the tool's
frame pointer could change.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21615
2025-09-01 12:37:43 +01:00
Jeff Young 32e9ab9b75 Don't reference stack variables from a long-life lambda. 2025-09-01 12:37:43 +01:00
Jon Evans ca0207016e API: Add ability to set enabled board layers and copper layer count 2025-08-31 22:18:53 -04:00
Mark Roszko 9ca1bf63d9 jobsets: fix Replace button to overwrite existing files (#19900)
(cherry picked from commit 5fb55ccb30)

1ea009e6 jobsets: allow replacing existing jobset files

Co-authored-by: Adrián García <adrgarcia@outlook.com>
2025-09-01 01:14:25 +00:00
Jeff Young 7e13870ae3 Allow stitching of graphic shapes.
(cherry picked from commit 1309b436da)
2025-08-31 19:34:22 +01:00
Jeff Young 3c907b5589 Set free vias to graphic net if available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21578

(cherry picked from commit c47b7459aa)
2025-08-31 19:34:19 +01:00
Jeff Young e9efd9971c Don't set point to a value we're not going to keep.
It just causes flicker.

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

(cherry picked from commit a2e98fb53c)
2025-08-31 17:15:17 +01:00
Jeff Young 2bf9a6f5d1 Better interactive feedback.
Don't wait for mouse to move before refreshing after a command.

Also fixes a crash bug deleting an item after an
Unstage() (the Unstage() has already deleted the item).

Also fixes a crash when changing label type during
creation of a label produces a mess.

Also Keep cursor aligned to grid when not warping
back to original point.

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

(cherry picked from commit 9d7db3d135)
2025-08-31 16:13:07 +01:00
jean-pierre charras 42c67b40b1 fix issues in ROUNDRECT: Fix incorrect ROUNDRECT Ctor.
- Do not throw  an error in CTor: this is not the place. It is much easy to
fix the value of incorrect radius.
Moreover, the Ctor is called without catching a throw-ed error in code.
- fix the test about radius validity, broken.

From master branch.
2025-08-31 08:25:14 +02:00
jean-pierre charras 5ae3c55a99 Step exporter: fix overzealous validity test.
When converting poly shapes with arcs in STEP_PCB_MODEL::MakeShapes,
when an error happens, a second try is made using a full polygonal shape.
However a fatal error was emitted at the first attempt, before the second try.
Now at first try, only a debug message is emitted on error. The fatal error
is emitted only if the second try fails.

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

(cherry picked from commit aeafbe48fe)
2025-08-31 08:00:06 +02:00
Jeff Young 54e9a97b26 ADDED: separate front/back silk and mask colours for STEP export.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21593

(cherry picked from commit acc7b1e508)
2025-08-30 17:46:42 +01:00
Jeff Young 1e3b879d93 Run collision check on correct layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21586
2025-08-29 17:12:33 +01:00
Seth Hillbrand 7ca6a93436 Don't both designers with unneeded changes
If we are not asking for fields to be removed when updating, then don't
say we're doing anything if all we have to do is remove fields

(cherry picked from commit ea8206eca5)
2025-08-27 13:31:59 -07:00
jean-pierre charras 05c11d023f GERBER_JOBFILE_WRITER: fix incorrect layer id in File Attributes for inner layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21569

(cherry picked from commit 9725ac2215)
2025-08-27 13:28:55 +02:00
jean-pierre charras 996c3d7fa1 PAD: better HitTest( const VECTOR2I& aPosition, int aAccuracy, PCB_LAYER_ID aLayer )
(cherry picked from commit b349f1988a)
2025-08-27 13:27:45 +02:00
jean-pierre charras b204742fe3 Pcbnew: fix teardrop generation for pads having different shapes by layer.
Teardrop generator used pad::HitTest not testing the hit of a specific layer.
It created false test for some complex pads. Now use a test specific to a layer.

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

(cherry picked from commit 963aa47778)
2025-08-27 11:35:07 +02:00
Emmanuel Vera 2b8e62e0b9 Update power filter for power symbols placement
(cherry picked from commit b5df0ad3eb)
2025-08-27 08:52:24 +02:00
jean-pierre charras c3d122becf French translation cleanup and update 2025-08-27 08:48:02 +02:00
John Beard 43c828474a Pcbnew: fix sensitivity of via placement to large grids
Another case where large grids are overly "grabby" for snaps.

In this case, because the via was moved to the grid-snap first,
and then THAT position was used to look for things like pad-snaps,
the pad snaps would not be found if a coarse grid meant the cursor
was outside the pad.

Instead, use the mouse position when looking for the non-grid snaps
in VIA_PLACER::SnapItem.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18626
(cherry picked from commit 0f0527bd03)
2025-08-26 23:50:35 +08:00
John Beard 8073185c36 Pcbnew: use R-tree for pad checks in via place tool
Otherwise this is an O(n-pads-on-board) operation for every new
candidate via position.

(cherry picked from commit 3d8803f579)
2025-08-26 23:50:35 +08:00
Jeff Young f1ddcfe799 Expose shape in prop inspector for sheet pins.
(cherry picked from commit 3058bc6355)
2025-08-25 17:21:04 +01:00
jean-pierre charras 9d6f9c84d0 French translation update 2025-08-23 12:41:37 +02:00
jean-pierre charras 680a693c04 DIALOG_CHANGE_SYMBOLS: fix hanging is some cases and shows a better message.
When (happens after converting old schematics to the new format) trying to
update symbols having a bad lib id can hang Eeschema (infinite loop)
It can easily happens when the user has badly converted the schematic.
Also display a error message when happens.

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

(cherry picked from commit 61aeea9237)
2025-08-23 12:40:48 +02:00
Alex Shvartzkop 4f72dd421a REPORTER's HasMessage indicates that any message got reported, not stored. 2025-08-23 00:27:41 +03:00
dsa-t bc533de0a3 Revert "Use board stackup colors by default in 3D render job."
This reverts commit f7380ae015
2025-08-23 00:09:53 +03:00
dsa-t c08109d63e Revert "Add FOLLOW_PCB, FOLLOW_PLOT_SETTINGS appearance presets to 3D render job dialog."
This reverts commit efc6c3e45e
2025-08-22 21:26:51 +03:00
Jeff Young b11f0a31b9 Read legacy tokens before current tokens.
(So current can overwrite.)

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

(cherry picked from commit 03c230dd64)
2025-08-22 17:03:32 +01:00
Jeff Young f6fabdc8ee Don't double mirror groups.
Also removes previous fix, which had side-effects.

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

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

(cherry picked from commit 3f85071f91)
2025-08-22 17:03:25 +01:00
Jeff Young 965abb46d0 Avoid div-by-zero.
(cherry picked from commit c287d9a222)
2025-08-22 17:00:04 +01:00
Jeff Young c9f53c607e Fix missing initialization.
(cherry picked from commit de1c6c86ab)
2025-08-22 16:59:45 +01:00
Jeff Young 7b91b51bcf Add spacing for Mac file dialog custom controls.
(cherry picked from commit e841ca1906)
2025-08-22 16:59:29 +01:00
Jeff Young a3354dc352 Always provide a SCH_SCREEN to SCH_COMMIT.
Fixes KICAD-YKY

(cherry picked from commit a0940b10d4)
2025-08-22 16:57:17 +01:00
Jeff Young 6723964cdd Fix copy/pasta.
(cherry picked from commit c2f953e3f7)
2025-08-22 16:48:19 +01:00
Jeff Young df5f4ba541 Improve quasimodal comment.
(cherry picked from commit c85e5c08e4)
2025-08-22 16:46:39 +01:00
Jeff Young 926f41a0f5 Don't show locked shadow in pad preview.
(cherry picked from commit 60dbfd3eec)
2025-08-22 16:44:19 +01:00
Jeff Young db801c8d7e Remove stale comment.
(cherry picked from commit 3f1f9e8e72)
2025-08-22 16:43:35 +01:00
Jeff Young ad433b9468 ADDED: follow-pcb and follow-plot-settings to render job settings.
Also added Follow-board-stackup-colors to both
render job settings and render CLI arguments

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

(cherry picked from commit 2e629ca55c)
2025-08-22 16:41:58 +01:00
Jeff Young 1eefb2b70a Allow deletion of nested embedded files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20581

(cherry picked from commit ea84879b06)
2025-08-22 16:40:10 +01:00
Jeff Young 3d6527c1be Formatting.
(cherry picked from commit 7240128130)
2025-08-22 16:40:07 +01:00
Jeff Young 319530ad01 Grid is already updated by AddFile() callback.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20565

(cherry picked from commit 2c3408aad5)
2025-08-22 16:38:19 +01:00
Jeff Young 24efca1db1 Focus second column control after property grid navigation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20651

(cherry picked from commit 95da436ddd)
2025-08-22 16:37:49 +01:00
Alex Shvartzkop a009d859d0 Fix some warnings. 2025-08-22 17:40:37 +03:00
Alex Shvartzkop 44a3bb9274 Prevent jobs from affecting each other via reporters when running jobsets from CLI. 2025-08-22 17:40:12 +03:00
Alex Shvartzkop 72e1904708 Fix ODB++ path creation. 2025-08-22 15:07:38 +03:00
Alex Shvartzkop 279a30974e Increase default precision in ODB++ export job dialog. 2025-08-22 14:34:43 +03:00
Alex Shvartzkop efc6c3e45e Add FOLLOW_PCB, FOLLOW_PLOT_SETTINGS appearance presets to 3D render job dialog. 2025-08-22 13:35:14 +03:00
Alex Shvartzkop f7380ae015 Use board stackup colors by default in 3D render job. 2025-08-22 13:34:25 +03:00
Alex Shvartzkop 26b6c28bef EasyEDA import: Add footprint Reference text on F_Fab. 2025-08-21 17:40:53 +03:00
Alex Shvartzkop 8cd7b73b2a EasyEDA import: Build basic Courtyard box for footprints. 2025-08-21 17:08:41 +03:00
Alex Shvartzkop c2d31699bf EasyEDA import: Place component shape and marking on F_Fab. 2025-08-21 17:04:23 +03:00
Alex Shvartzkop 47c5918c3d Add green color indication to length tuning status popup. 2025-08-21 15:38:08 +03:00
Alex Shvartzkop 12cf3f9301 router: Inline drag by track end even if cursor is slightly outside the track shape. 2025-08-21 13:56:25 +03:00
Alex Shvartzkop 013aab58d6 Update golden ERC QA files after 316a9511e8 2025-08-21 12:30:38 +03:00
Alex Shvartzkop 316a9511e8 Show errors before warnings in DRC/ERC. 2025-08-21 00:24:21 +03:00
Alex Shvartzkop 29fadcb931 Update translations 2025-08-21 00:16:37 +03:00
Pedro Moreira d73fecd2a1 Translated using Weblate (Korean)
Currently translated at 98.6% (9933 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/ko/
2025-08-20 23:15:12 +02:00
CloverGit 35caf91c31 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10059 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-08-20 23:15:12 +02:00
2tama3 352cf21ffc 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-20 23:15:12 +02:00
CloverGit 21335f604f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (10059 of 10065 strings)

Translation: KiCad EDA/v9
Translate-URL: https://hosted.weblate.org/projects/kicad/v9/zh_Hans/
2025-08-20 23:15:12 +02:00
Henrik Kauhanen c6b7f90408 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-20 23:15:12 +02:00
2tama3 a5dee0c2b1 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-20 23:15:12 +02:00
Ettore Atalan bf73ad42ca 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-20 23:15:11 +02:00
John Beard 7d905948f5 Pcbnew: fix refdes ordering in arrays
The first cell of the array needs to not be reannotated, or it will
skips its own number(s) and take what we expect for the second cell.
The repeats until the last entry, which didn't reannotate anything,
leaving the original numbers. Producing a 'rotation' like 2,3,4,5,1
rather than the expected 1,2,3,4,5.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20935
(cherry picked from commit f31a109ab4)
2025-08-21 00:26:50 +08:00
John Beard 5c8c0e0648 Pcbnew: fix occasional failure-to-select for dragging
In the Drag tool client filter function, sometimes,
GuessSelectionCandidates trims the collector's item list.
But we used the old contents of the per-type vectors to make
judgements about what was connected.

If a call came in with 2 tracks (e.g. near a knee) and one
was removed by GuessSelectionCandidates, sometimes the
other one would be the one selected for removal in the
2 tracks/0 via case. This leaves the collector empty.

The other case, where the item removed by GuessSelectionCandidates
was removed from the collector is silent, as removing an item
not in the collector is a no-op.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21517
(cherry picked from commit 105b9fcfe8)
2025-08-20 20:40:01 +08:00
Alex Shvartzkop 4cfa2e3a38 Remove unnecessary newlines in STEP exporter logging. 2025-08-20 14:54:27 +03:00
Alex Shvartzkop eecf0cd685 Remove a Message_Printer holding a stale REPORTER pointer from OCCT.
Fixes KICAD-V8A
2025-08-20 13:57:48 +03:00
Alex Shvartzkop 91e5e81bb4 Record execute command job input and error streams in the log.
Also print the resolved command.
2025-08-20 13:07:29 +03:00
JamesJCode 5b3cd96641 Don't assume SCH_SYMBOLs have a LIB_SYMBOL when resolving embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21497

(cherry picked from commit ee9e94df04)
2025-08-19 14:17:02 +01:00
John Beard db0967d5c9 Pcbnew: fix bug in private layer selection
USer-defined layers now occur in steps of 2, otherwise
illegal layers for the grid get used.
2025-08-19 16:25:02 +08:00
jean-pierre charras 5165ced528 Eeschema: Reset m_ercRun flag when cleaning all markers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21113

(cherry picked from commit 54085c4e50)
2025-08-18 17:33:30 +02:00
Alex Shvartzkop eb4f9fa093 Wrap command text control in execute command job dialog. 2025-08-18 17:06:17 +03:00
Alex Shvartzkop 47381f3d90 Disable ibeam cursor setter for search fields on non-OSX.
The ibeam cursor gets stuck on MSW when mouse leaves the field.
2025-08-18 15:53:37 +03:00
jean-pierre charras e697339bc6 PLOT_CONTROLLER::PlotLayer(): fix bug when drill marks must be plotted.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21474

(cherry picked from commit 20d8c9c7f9) and
(cherry picked from commit 2afd752bbc)
2025-08-18 11:48:07 +02:00
jean-pierre charras 6159cee2b0 Kicad manager: display the number of GDI objects in About Dialog (Windows only)
On Windows, if the number of GDI objects reach a limit (usually 10000) some can
be not shown, thus creating  a strange behavior not easy to diagnose.
Displaying the number in use can help.

(cherry picked from commit de208b3f00)
2025-08-18 09:07:31 +02:00
jean-pierre charras 3460b33ccf DIALOG_IMPORT_SETTINGS: fix some minor issues.
From master branch.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21483
2025-08-18 08:43:40 +02:00
jean-pierre charras 5baaa89131 Reapply "SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc."
This new algo is now tested since more than 2 months, so it should be good.
This reverts commit 88ad461514.
2025-08-18 08:25:33 +02:00
Wayne Stambaugh d45a38f086 Begin version 9.0.5 development. 2025-08-17 15:48:17 -04:00
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
926 changed files with 346928 additions and 294083 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
+4
View File
@@ -8,6 +8,7 @@ win64_build:
interruptible: false
image: registry.gitlab.com/kicad/kicad-ci/windows-build-image/ltsc2022-msvc:latest
variables:
VCPKG_BINARY_SOURCES: 'nuget,gitlab,readwrite'
# Switch the compressor to fastzip and reduce the compression level
FF_USE_FASTZIP: "true"
CACHE_COMPRESSION_LEVEL: "fast"
@@ -23,6 +24,7 @@ win64_build:
script:
- C:\builder\build.ps1 -Env -Arch x64
- $vcpkgCache=Join-Path -Path (Get-Location) -ChildPath ".vcpkgCache";$env:VCPKG_DEFAULT_BINARY_CACHE=$vcpkgCache;New-Item -ItemType Directory -Force -Path $vcpkgCache
- nuget.exe sources add -Name gitlab -Source "https://gitlab.com/api/v4/projects/27426693/packages/nuget/index.json" -UserName gitlab-ci-token -Password $env:CI_JOB_TOKEN
- mkdir -p build/windows -Force
- cd build/windows
- cmake `
@@ -34,6 +36,8 @@ win64_build:
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON `
-DKICAD_USE_3DCONNEXION=ON `
-DVCPKG_BUILD_TYPE=debug `
-DVCPKG_INSTALL_OPTIONS="--x-abi-tools-use-exact-versions" `
-DVCPKG_OVERLAY_TRIPLETS="$Env:CI_PROJECT_DIR/tools/custom_vcpkg_triplets" `
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
+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_
@@ -486,9 +486,12 @@ void RENDER_3D_RAYTRACE_BASE::renderBlockTracing( uint8_t* ptrPBO, signed int iB
// Initialize ray packets
const SFVEC2UI& blockPos = m_blockPositions[iBlock];
const SFVEC2I blockPosI = SFVEC2I( blockPos.x + m_xoffset, blockPos.y + m_yoffset );
const SFVEC2F randDisp = ( m_camera.GetProjection() == PROJECTION_TYPE::ORTHO ) ?
SFVEC2F( 0.0f, 0.0f ) :
SFVEC2F( DISP_FACTOR, DISP_FACTOR );
RAYPACKET blockPacket( m_camera, (SFVEC2F) blockPosI + SFVEC2F( DISP_FACTOR, DISP_FACTOR ),
SFVEC2F( DISP_FACTOR, DISP_FACTOR ) /* Displacement random factor */ );
RAYPACKET blockPacket( m_camera, (SFVEC2F) blockPosI + randDisp,
randDisp /* Displacement random factor */ );
HITINFO_PACKET hitPacket_X0Y0[RAYPACKET_RAYS_PER_PACKET];
@@ -566,7 +569,7 @@ void RENDER_3D_RAYTRACE_BASE::renderBlockTracing( uint8_t* ptrPBO, signed int iB
HITINFO_PACKET_init( hitPacket_AA_X1Y1 );
RAYPACKET blockPacket_AA_X1Y1( m_camera, (SFVEC2F) blockPosI + SFVEC2F( 0.5f, 0.5f ),
SFVEC2F( DISP_FACTOR, DISP_FACTOR ) );
randDisp );
if( !m_accelerator->Intersect( blockPacket_AA_X1Y1, hitPacket_AA_X1Y1 ) )
{
@@ -603,16 +606,16 @@ void RENDER_3D_RAYTRACE_BASE::renderBlockTracing( uint8_t* ptrPBO, signed int iB
RAY blockRayPck_AA_X1Y1_half[RAYPACKET_RAYS_PER_PACKET];
RAYPACKET_InitRays_with2DDisplacement(
m_camera, (SFVEC2F) blockPosI + SFVEC2F( 0.5f - DISP_FACTOR, DISP_FACTOR ),
SFVEC2F( DISP_FACTOR, DISP_FACTOR ), blockRayPck_AA_X1Y0 );
m_camera, (SFVEC2F) blockPosI + SFVEC2F( 0.5f - randDisp.x, randDisp.y ),
randDisp, blockRayPck_AA_X1Y0 );
RAYPACKET_InitRays_with2DDisplacement(
m_camera, (SFVEC2F) blockPosI + SFVEC2F( DISP_FACTOR, 0.5f - DISP_FACTOR ),
SFVEC2F( DISP_FACTOR, DISP_FACTOR ), blockRayPck_AA_X0Y1 );
m_camera, (SFVEC2F) blockPosI + SFVEC2F( randDisp.x, 0.5f - randDisp.y ),
randDisp, blockRayPck_AA_X0Y1 );
RAYPACKET_InitRays_with2DDisplacement(
m_camera, (SFVEC2F) blockPosI + SFVEC2F( 0.25f - DISP_FACTOR, 0.25f - DISP_FACTOR ),
SFVEC2F( DISP_FACTOR, DISP_FACTOR ), blockRayPck_AA_X1Y1_half );
m_camera, (SFVEC2F) blockPosI + SFVEC2F( 0.25f - randDisp.x, 0.25f - randDisp.y ),
randDisp, blockRayPck_AA_X1Y1_half );
renderAntiAliasPackets( bgColor, hitPacket_X0Y0, hitPacket_AA_X1Y1, blockRayPck_AA_X1Y0,
hitColor_AA_X1Y0 );
@@ -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
@@ -657,6 +657,12 @@ void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired )
}
void PANEL_PREVIEW_3D_MODEL::SetEmbeddedFilesDelegate( EMBEDDED_FILES* aDelegate )
{
m_dummyBoard->SetEmbeddedFilesDelegate( aDelegate );
}
void PANEL_PREVIEW_3D_MODEL::onModify()
{
KIWAY_HOLDER* kiwayHolder = dynamic_cast<KIWAY_HOLDER*>( wxGetTopLevelParent( this ) );
@@ -59,6 +59,7 @@ wxDECLARE_EVENT( wxCUSTOM_PANEL_SHOWN_EVENT, wxCommandEvent );
class WX_INFOBAR;
class S3D_CACHE;
class FILENAME_RESOLVER;
class EMBEDDED_FILES;
class BOARD;
class BOARD_ADAPTER;
class FOOTPRINT;
@@ -97,6 +98,8 @@ public:
*/
void UpdateDummyFootprint( bool aRelaodRequired = true );
void SetEmbeddedFilesDelegate( EMBEDDED_FILES* aDelegate );
/**
* Get the dummy footprint that is used for previewing the 3D model.
* We use this to hold the temporary 3D model shapes.
+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
+6 -1
View File
@@ -22,7 +22,12 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
cmake_minimum_required( VERSION 3.21 FATAL_ERROR )
if( MSVC )
# CMake 3.28.1 or higher required for MSVC ARM builds for armasm64.exe support
cmake_minimum_required( VERSION 3.28.1 FATAL_ERROR )
else()
cmake_minimum_required( VERSION 3.21 FATAL_ERROR )
endif()
# Generate DEPFILES without transforming relative paths
cmake_policy( SET CMP0116 OLD )
+38 -3
View File
@@ -6,7 +6,12 @@
},
{
"environment": "vcpkg",
"VcPkgDir": "D:/vcpkg/"
"VcPkgDir": "D:/vcpkg/",
"VCPKG_BINARY_SOURCES": "nuget,kicad-gitlab,read"
},
{
"environment": "swig",
"SwigExePath": "D:/swigwin-4.1.1/swig.exe"
}
],
"configurations": [
@@ -14,7 +19,7 @@
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64", "vcpkg" ],
"inheritEnvironments": [ "msvc_x64_x64", "vcpkg", "swig"],
"buildRoot": "${env.BuildDir}\\${name}",
"installRoot": "${env.InstallDir}\\${name}",
"cmakeCommandArgs": "",
@@ -30,6 +35,21 @@
"name": "KICAD_WIN32_DPI_AWARE",
"value": "ON",
"type": "BOOL"
},
{
"name": "SWIG_EXECUTABLE",
"value": "${env.SwigExePath}",
"type": "STRING"
},
{
"name": "VCPKG_OVERLAY_TRIPLETS",
"value": "${workspaceRoot}/tools/custom_vcpkg_triplets",
"type": "STRING"
},
{
"name": "VCPKG_INSTALL_OPTIONS",
"value": "--x-abi-tools-use-exact-versions",
"type": "STRING"
}
],
"cmakeToolchain": "${env.VcPkgDir}/scripts/buildsystems/vcpkg.cmake"
@@ -38,7 +58,7 @@
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"inheritEnvironments": [ "msvc_x64_x64", "vcpkg" ],
"inheritEnvironments": [ "msvc_x64_x64", "vcpkg", "swig"],
"buildRoot": "${env.BuildDir}\\${name}",
"installRoot": "${env.InstallDir}\\${name}",
"cmakeCommandArgs": "",
@@ -54,6 +74,21 @@
"name": "KICAD_WIN32_DPI_AWARE",
"value": "ON",
"type": "BOOL"
},
{
"name": "SWIG_EXECUTABLE",
"value": "${env.SwigExePath}",
"type": "STRING"
},
{
"name": "VCPKG_OVERLAY_TRIPLETS",
"value": "${workspaceRoot}/tools/custom_vcpkg_triplets",
"type": "STRING"
},
{
"name": "VCPKG_INSTALL_OPTIONS",
"value": "--x-abi-tools-use-exact-versions",
"type": "STRING"
}
],
"cmakeToolchain": "${env.VcPkgDir}/scripts/buildsystems/vcpkg.cmake"
+69
View File
@@ -42,12 +42,45 @@ message BoardStackupResponse
kiapi.board.BoardStackup stackup = 1;
}
// Changes the stackup for the given board according to the contents of the message (**not yet implemented**)
// WARNING: any existing content on layers that are removed by this call is deleted. This operation cannot be undone.
// Returns BoardStackupResponse with the updated stackup, in normalized form
message UpdateBoardStackup
{
kiapi.common.types.DocumentSpecifier board = 1;
kiapi.board.BoardStackup stackup = 2;
}
message GetBoardEnabledLayers
{
kiapi.common.types.DocumentSpecifier board = 1;
}
message BoardEnabledLayersResponse
{
// The number of copper layers enabled in this board.
uint32 copper_layer_count = 1;
// A list of all layers enabled in this board, including copper layers and ones which cannot be disabled.
repeated kiapi.board.types.BoardLayer layers = 2;
}
// Changes which layers are enabled in the board stackup
// WARNING: any existing content on layers that are removed by this call is deleted. This operation cannot be undone.
// Returns BoardEnabledLayersResponse with the updated layer set.
message SetBoardEnabledLayers
{
kiapi.common.types.DocumentSpecifier board = 1;
// The number of copper layers to enable in the board. Currently, this must be an even number >= 2.
uint32 copper_layer_count = 2;
// The non-copper layers to enable. Note that any copper layers in this list are ignored; copper layers are enabled
// by setting copper_layer_count. Note that the F/B.Courtyard, Edge.Cuts, and Margin layers cannot be disabled and
// will be present in the board even if they are omitted from this list.
repeated kiapi.board.types.BoardLayer layers = 3;
}
message GetGraphicsDefaults
{
kiapi.common.types.DocumentSpecifier board = 1;
@@ -189,6 +222,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
+15 -29
View File
@@ -36,7 +36,13 @@ if( MSVC )
set( KICAD_HOST_ARCH "x64" )
set( KICAD_HOST_ARCH_X64 1 )
else()
message(FATAL_ERROR "Failed to determine the host architecture: ${CMAKE_SYSTEM_PROCESSOR}")
message(FATAL_ERROR "Failed to determine the host architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
if( NOT KICAD_BUILD_ARCH STREQUAL KICAD_HOST_ARCH )
set( CMAKE_CROSSCOMPILING TRUE )
string(TOUPPER ${KICAD_BUILD_ARCH} CMAKE_SYSTEM_PROCESSOR)
endif()
else()
if ( NOT CMAKE_SIZEOF_VOID_P EQUAL 8 )
@@ -58,38 +64,18 @@ if( MSVC )
# cmake release AND when MSVC ships said cmake release
if(KICAD_BUILD_ARCH_ARM)
message( "Configuring ARM assembler" )
# Explicitly specify the assembler to be used for Arm32 compile
file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX86\\arm\\armasm.exe" CMAKE_ASM_COMPILER)
set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
message("CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER}")
# Enable generic assembly compilation to avoid CMake generate VS proj files that explicitly
# use ml[64].exe as the assembler.
enable_language(ASM)
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -g <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
enable_language(ASM_MARMASM)
# Bugfix for CMake < 29.1
set(ASM_DIALECT "_MARMASM")
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
elseif(KICAD_BUILD_ARCH_ARM64)
message( "Configuring ARM64 assembler" )
# Explicitly specify the assembler to be used for Arm64 compile
file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX86\\arm64\\armasm64.exe" CMAKE_ASM_COMPILER)
set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
message("CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER}")
# Enable generic assembly compilation to avoid CMake generate VS proj files that explicitly
# use ml[64].exe as the assembler.
enable_language(ASM)
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -g <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
enable_language(ASM_MARMASM)
# Bugfix for CMake < 29.1
set(ASM_DIALECT "_MARMASM")
set(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT "<CMAKE_ASM${ASM_DIALECT}_COMPILER> <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
else()
message( "Configuring MASM assembler" )
if(KICAD_BUILD_ARCH_X86)
+2 -2
View File
@@ -2,7 +2,7 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2016 Wayne Stambaugh <stambaughw@gmail.com>
# Copyright (C) 2016-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2016-2023, 2024, 2025 KiCad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -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.6" )
# Default the version to the semantic version.
# This is overridden by the git repository tag though (if using git)
-51
View File
@@ -1,51 +0,0 @@
# compile_asm(TARGET target ASM_FILES file1 [file2 ...] OUTPUT_OBJECTS [variableName])
# CMake does not support the ARM or ARM64 assemblers on Windows when using the
# MSBuild generator. When the MSBuild generator is in use, we manually compile the assembly files
# using this function.
#
# Borrowed from dotnet/runtime, licensed under MIT
# Copyright (c) .NET Foundation and Contributors
# https://github.com/dotnet/runtime/blob/main/eng/native/functions.cmake
function(compile_asm)
set(options "")
set(oneValueArgs TARGET OUTPUT_OBJECTS)
set(multiValueArgs ASM_FILES)
cmake_parse_arguments(COMPILE_ASM "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGV})
get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
set (ASSEMBLED_OBJECTS "")
foreach(ASM_FILE ${COMPILE_ASM_ASM_FILES})
get_filename_component(name ${ASM_FILE} NAME_WE)
# Produce object file where CMake would store .obj files for an OBJECT library.
# ex: artifacts\obj\coreclr\windows.arm64.Debug\src\vm\wks\cee_wks.dir\Debug\AsmHelpers.obj
set (OBJ_FILE "${CMAKE_CURRENT_BINARY_DIR}/${COMPILE_ASM_TARGET}.dir/${CMAKE_CFG_INTDIR}/${name}.obj")
# Need to compile asm file using custom command as include directories are not provided to asm compiler
add_custom_command(OUTPUT ${OBJ_FILE}
COMMAND "${CMAKE_ASM_COMPILER}" -g ${ASM_INCLUDE_DIRECTORIES} -o ${OBJ_FILE} ${ASM_FILE}
DEPENDS ${ASM_FILE}
COMMENT "Assembling ${ASM_FILE} ---> \"${CMAKE_ASM_COMPILER}\" -g ${ASM_INCLUDE_DIRECTORIES} -o ${OBJ_FILE} ${ASM_FILE}")
# mark obj as source that does not require compile
set_source_files_properties(${OBJ_FILE} PROPERTIES EXTERNAL_OBJECT TRUE)
# Add the generated OBJ in the dependency list so that it gets consumed during linkage
list(APPEND ASSEMBLED_OBJECTS ${OBJ_FILE})
endforeach()
set(${COMPILE_ASM_OUTPUT_OBJECTS} ${ASSEMBLED_OBJECTS} PARENT_SCOPE)
endfunction()
# Build a list of include directories for consumption by the assembler
function(get_include_directories_asm IncludeDirectories)
get_directory_property(dirs INCLUDE_DIRECTORIES)
foreach(dir IN LISTS dirs)
list(APPEND INC_DIRECTORIES -I${dir};)
endforeach()
set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE)
endfunction(get_include_directories_asm)
+30
View File
@@ -102,6 +102,7 @@ static const wxChar EnableDesignBlocks[] = wxT( "EnableDesignBlocks" );
static const wxChar EnableGenerators[] = wxT( "EnableGenerators" );
static const wxChar EnableLibWithText[] = wxT( "EnableLibWithText" );
static const wxChar EnableLibDir[] = wxT( "EnableLibDir" );
static const wxChar LibraryTableEditor[] = wxT( "LibraryTableEditor" );
static const wxChar EnableEeschemaPrintCairo[] = wxT( "EnableEeschemaPrintCairo" );
static const wxChar EnableEeschemaExportClipboardCairo[] = wxT( "EnableEeschemaExportClipboardCairo" );
static const wxChar DisambiguationTime[] = wxT( "DisambiguationTime" );
@@ -120,6 +121,8 @@ static const wxChar EnableExtensionSnaps[] = wxT( "EnableExtensionSnaps" );
static const wxChar ExtensionSnapTimeoutMs[] = wxT( "ExtensionSnapTimeoutMs" );
static const wxChar ExtensionSnapActivateOnHover[] = wxT( "ExtensionSnapActivateOnHover" );
static const wxChar EnableSnapAnchorsDebug[] = wxT( "EnableSnapAnchorsDebug" );
static const wxChar SnapHysteresis[] = wxT( "SnapHysteresis" );
static const wxChar SnapToAnchorMargin[] = wxT( "SnapToAnchorMargin" );
static const wxChar MinParallelAngle[] = wxT( "MinParallelAngle" );
static const wxChar HoleWallPaintingMultiplier[] = wxT( "HoleWallPaintingMultiplier" );
static const wxChar MsgPanelShowUuids[] = wxT( "MsgPanelShowUuids" );
@@ -128,6 +131,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
@@ -260,6 +265,7 @@ ADVANCED_CFG::ADVANCED_CFG()
m_EnableGenerators = false;
m_EnableLibWithText = false;
m_EnableLibDir = false;
m_LibraryTableEditor = false;
m_EnableEeschemaPrintCairo = true;
m_EnableEeschemaExportClipboardCairo = true;
@@ -297,6 +303,8 @@ ADVANCED_CFG::ADVANCED_CFG()
m_ExtensionSnapTimeoutMs = 500;
m_ExtensionSnapActivateOnHover = true;
m_EnableSnapAnchorsDebug = false;
m_SnapHysteresis = 5;
m_SnapToAnchorMargin = 1.1;
m_MinParallelAngle = 0.001;
m_HoleWallPaintingMultiplier = 1.5;
@@ -311,6 +319,10 @@ ADVANCED_CFG::ADVANCED_CFG()
m_GitIconRefreshInterval = 10000;
m_MaxPastedTextLength = 100;
m_PNSProcessClusterTimeout = 100; // Default: 100 ms
loadFromConfigFile();
}
@@ -506,6 +518,9 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableLibDir,
&m_EnableLibDir, m_EnableLibDir ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::LibraryTableEditor,
&m_LibraryTableEditor, m_LibraryTableEditor ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableEeschemaPrintCairo,
&m_EnableEeschemaPrintCairo,
m_EnableEeschemaPrintCairo ) );
@@ -571,6 +586,14 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_EnableSnapAnchorsDebug,
m_EnableSnapAnchorsDebug ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::SnapHysteresis,
&m_SnapHysteresis, m_SnapHysteresis,
0, 100 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::SnapToAnchorMargin,
&m_SnapToAnchorMargin, m_SnapToAnchorMargin,
1.0, 2.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::MinParallelAngle,
&m_MinParallelAngle, m_MinParallelAngle,
0.0, 45.0 ) );
@@ -601,6 +624,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;
+3 -2
View File
@@ -24,6 +24,7 @@
#include "clipboard.h"
#include <wx/clipbrd.h>
#include <wx/dataobj.h>
#include <wx/image.h>
#include <wx/log.h>
@@ -84,10 +85,10 @@ std::unique_ptr<wxImage> GetImageFromClipboard()
{
if( wxTheClipboard->IsSupported( wxDF_BITMAP ) )
{
wxImageDataObject data;
wxBitmapDataObject data;
if( wxTheClipboard->GetData( data ) )
{
image = std::make_unique<wxImage>( data.GetImage() );
image = std::make_unique<wxImage>( data.GetBitmap().ConvertToImage() );
}
}
else if( wxTheClipboard->IsSupported( wxDF_FILENAME ) )
+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 );
+14 -13
View File
@@ -161,7 +161,7 @@ bool DATABASE_CONNECTION::Connect()
m_conn = std::make_unique<nanodbc::connection>( cs, m_timeout );
}
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
return false;
@@ -188,7 +188,7 @@ bool DATABASE_CONNECTION::Disconnect()
{
m_conn->disconnect();
}
catch( boost::locale::conv::conversion_error& exc )
catch( std::exception& exc )
{
wxLogTrace( traceDatabase, wxT( "Disconnect() error \"%s\" occured." ), exc.what() );
return false;
@@ -250,7 +250,7 @@ bool DATABASE_CONNECTION::CacheTableInfo( const std::string& aTable,
return false;
}
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while caching table info: %s" ), m_lastError );
@@ -277,8 +277,9 @@ bool DATABASE_CONNECTION::getQuoteChar()
wxLogTrace( traceDatabase, wxT( "Quote char retrieved: %c" ), m_quoteChar );
}
catch( nanodbc::database_error& )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while querying quote char: %s" ), m_lastError );
return false;
}
@@ -401,14 +402,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
statement.prepare( *m_conn, query );
statement.bind( 0, aWhere.second.c_str() );
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while preparing statement for SelectOne: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
m_conn->disconnect();
Disconnect();
return false;
}
@@ -422,14 +423,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
{
results = nanodbc::execute( statement );
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while executing statement for SelectOne: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
m_conn->disconnect();
Disconnect();
return false;
}
@@ -480,7 +481,7 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
}
}
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while parsing results from SelectOne: %s" ),
@@ -507,7 +508,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
{
statement.prepare( query );
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase,
@@ -515,7 +516,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
m_conn->disconnect();
Disconnect();
return false;
}
@@ -526,7 +527,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
{
results = nanodbc::execute( statement );
}
catch( nanodbc::database_error& e )
catch( std::exception& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase,
@@ -534,7 +535,7 @@ bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const st
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
m_conn->disconnect();
Disconnect();
return false;
}
+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;
};
+52 -20
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" ) ) );
}
}
@@ -598,7 +631,8 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
{
tableExists = false;
if( !fn.DirExists() && !fn.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
if( !wxFileName::DirExists( fn.GetPath() )
&& !wxFileName::Mkdir( fn.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
{
THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path '%s'." ),
fn.GetPath() ) );
@@ -611,8 +645,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 +682,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 );
+7 -1
View File
@@ -909,7 +909,13 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
#define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints" )
aInfo.AddLibrarian( new CONTRIBUTOR( wxS( "Scripts by Maui" ),
MODELS_3D_CONTRIBUTION,
wxS( "https://gitlab.com/kicad/libraries/kicad-footprint-generator" ) ) );
wxS( "https://github.com/easyw" ) ) );
aInfo.AddLibrarian( new CONTRIBUTOR( wxS( "Hasan Yavuz Özderya" ),
MODELS_3D_CONTRIBUTION,
wxS( "https://bitbucket.org/hyOzd/freecad-macros/src/master/" ) ) );
aInfo.AddLibrarian( new CONTRIBUTOR( wxS( "GitHub contributors" ),
MODELS_3D_CONTRIBUTION,
wxS( "https://github.com/easyw/kicad-3d-models-in-freecad/graphs/contributors" ) ) );
aInfo.AddLibrarian( new CONTRIBUTOR( wxS( "GitLab contributors" ),
MODELS_3D_CONTRIBUTION,
wxS( "https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master" ) ) );
+13 -2
View File
@@ -22,7 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <build_version.h>
#include <eda_base_frame.h>
#include <wx/clipbrd.h>
@@ -108,8 +107,20 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
m_titleName = aParent->GetAboutTitle();
m_untranslatedTitleName = aParent->GetUntranslatedAboutTitle();
m_staticTextAppTitle->SetLabel( m_titleName );
// On windows, display the number of GDI objects in use. Can be useful when some GDI objects
// are not displayed because the max count of GDI objects (usually 10000) is reached
// So displaying this number can help to diagnose strange display issues
wxString extraInfo;
#if defined( _WIN32 )
uint32_t gdi_count = GetGuiResources( GetCurrentProcess(), GR_GDIOBJECTS );
extraInfo.Printf( _( "GDI objects in use %u" ), gdi_count );
extraInfo.Prepend( wxT( "\n" ) );
#endif
m_staticTextBuildVersion->SetLabel( wxS( "Version: " ) + m_info.GetBuildVersion() );
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() + extraInfo );
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
createNotebooks();
+70 -28
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:
@@ -460,14 +494,17 @@ int DIALOG_SHIM::ShowModal()
}
/*
Quasi-Modal Mode Explained:
QuasiModal Mode Explained:
The gtk calls in wxDialog::ShowModal() cause event routing problems if that
modal dialog then tries to use KIWAY_PLAYER::ShowModal(). The latter shows up
and mostly works but does not respond to the window decoration close button.
There is no way to get around this without reversing the gtk calls temporarily.
Quasi-Modal mode is our own almost modal mode which disables only the parent
There are also issues with the Scintilla text editor putting up autocomplete
popups, which appear behind the dialog window if QuasiModal is not used.
QuasiModal mode is our own almost modal mode which disables only the parent
of the DIALOG_SHIM, leaving other frames operable and while staying captured in the
nested event loop. This avoids the gtk calls and leaves event routing pure
and sufficient to operate the KIWAY_PLAYER::ShowModal() properly. When using
@@ -565,8 +602,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 +695,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 )
@@ -27,6 +27,8 @@
#include "design_block_lib_table.h"
#include <kiplatform/io.h>
DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG(
wxWindow* aParent ) :
@@ -106,8 +108,8 @@ bool DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::TransferDataFromWindow()
// Create the config path if it doesn't already exist.
wxFileName designBlockTableFileName = DESIGN_BLOCK_LIB_TABLE::GetGlobalTableFileName();
if( !designBlockTableFileName.DirExists()
&& !designBlockTableFileName.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
if( !wxFileName::DirExists( designBlockTableFileName.GetPath() )
&& !wxFileName::Mkdir( designBlockTableFileName.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
{
DisplayError( this, wxString::Format( _( "Cannot create global library table '%s'." ),
designBlockTableFileName.GetPath() ) );
@@ -124,6 +126,9 @@ bool DIALOG_GLOBAL_DESIGN_BLOCK_LIB_TABLE_CONFIG::TransferDataFromWindow()
fn.GetFullPath(), designBlockTableFileName.GetFullPath() ) );
return false;
}
// Ensure the copied file is writable
KIPLATFORM::IO::MakeWriteable( designBlockTableFileName.GetFullPath() );
}
// Load the successfully copied design block library table file. This should not fail since the
@@ -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:
+51 -12
View File
@@ -21,6 +21,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <eda_item.h>
#include <confirm.h>
#include <bitmaps.h>
#include <dialogs/panel_embedded_files.h>
#include <embedded_files.h>
@@ -31,12 +33,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 ---------- */
@@ -161,9 +163,7 @@ void PANEL_EMBEDDED_FILES::resizeGrid()
bool PANEL_EMBEDDED_FILES::TransferDataToWindow()
{
m_files_grid->ClearGrid();
if( m_files_grid->GetNumberRows() > 0 )
m_files_grid->DeleteRows( 0, m_files_grid->GetNumberRows() );
m_files_grid->ClearRows();
int ii = 0;
for( auto& [name, file] : m_localFiles->EmbeddedFileMap() )
@@ -187,6 +187,51 @@ bool PANEL_EMBEDDED_FILES::TransferDataToWindow()
bool PANEL_EMBEDDED_FILES::TransferDataFromWindow()
{
std::optional<bool> deleteReferences;
auto confirmDelete =
[&]() -> bool
{
if( EDA_ITEM* parent = dynamic_cast<EDA_ITEM*>( m_files ) )
{
if( parent->Type() == PCB_T )
{
return IsOK( m_parent, _( "Deleted embedded files are also referenced in some footprints.\n"
"Delete from footprints as well?" ) );
}
else if( parent->Type() == SCHEMATIC_T )
{
return IsOK( m_parent, _( "Deleted embedded files are also referenced in some symbols.\n"
"Delete from symbols as well?" ) );
}
}
wxFAIL_MSG( wxT( "Unexpected embedded files owner" ) );
return false;
};
for( const auto& [name, file] : m_files->EmbeddedFileMap() )
{
if( !m_localFiles->HasFile( name ) )
{
m_files->RunOnNestedEmbeddedFiles(
[&]( EMBEDDED_FILES* nested_files )
{
if( nested_files->HasFile( name ) )
{
if( !deleteReferences.has_value() )
deleteReferences = confirmDelete();
if( deleteReferences.value() )
nested_files->RemoveFile( name, true );
}
} );
}
if( deleteReferences.has_value() && deleteReferences.value() == false )
break;
}
m_files->ClearEmbeddedFiles();
std::vector<EMBEDDED_FILES::EMBEDDED_FILE*> files;
@@ -209,7 +254,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;
@@ -246,11 +292,6 @@ void PANEL_EMBEDDED_FILES::onFontEmbedClick( wxCommandEvent& event )
font->GetFileName() ) );
continue;
}
m_files_grid->AppendRows( 1 );
int ii = m_files_grid->GetNumberRows() - 1;
m_files_grid->SetCellValue( ii, 0, result->name );
m_files_grid->SetCellValue( ii, 1, result->GetLink() );
}
}
@@ -269,8 +310,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;
+1
View File
@@ -141,6 +141,7 @@ void EDA_BASE_FRAME::commonInit( FRAME_T aFrameType )
m_isNonUserClose = false;
m_autoSaveTimer = new wxTimer( this, ID_AUTO_SAVE_TIMER );
m_autoSaveRequired = false;
m_autoSavePermissionError = false;
m_mruPath = PATHS::GetDefaultUserProjectsPath();
m_frameSize = defaultSize( aFrameType, this );
m_displayIndex = -1;
+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();
+26 -13
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;
@@ -2326,10 +2339,10 @@ static struct EDA_SHAPE_DESC
if( lineStyleEnum.Choices().GetCount() == 0 )
{
lineStyleEnum.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
lineStyleEnum.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
}
+29 -29
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();
@@ -1323,18 +1323,18 @@ static struct EDA_TEXT_DESC
if( h_inst.Choices().GetCount() == 0)
{
h_inst.Map( GR_TEXT_H_ALIGN_LEFT, _( "Left" ) );
h_inst.Map( GR_TEXT_H_ALIGN_CENTER, _( "Center" ) );
h_inst.Map( GR_TEXT_H_ALIGN_RIGHT, _( "Right" ) );
h_inst.Map( GR_TEXT_H_ALIGN_LEFT, _HKI( "Left" ) );
h_inst.Map( GR_TEXT_H_ALIGN_CENTER, _HKI( "Center" ) );
h_inst.Map( GR_TEXT_H_ALIGN_RIGHT, _HKI( "Right" ) );
}
auto& v_inst = ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance();
if( v_inst.Choices().GetCount() == 0)
{
v_inst.Map( GR_TEXT_V_ALIGN_TOP, _( "Top" ) );
v_inst.Map( GR_TEXT_V_ALIGN_CENTER, _( "Center" ) );
v_inst.Map( GR_TEXT_V_ALIGN_BOTTOM, _( "Bottom" ) );
v_inst.Map( GR_TEXT_V_ALIGN_TOP, _HKI( "Top" ) );
v_inst.Map( GR_TEXT_V_ALIGN_CENTER, _HKI( "Center" ) );
v_inst.Map( GR_TEXT_V_ALIGN_BOTTOM, _HKI( "Bottom" ) );
}
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
+90 -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 );
@@ -589,6 +599,85 @@ double EDA_UNIT_UTILS::UI::DoubleValueFromString( const EDA_IU_SCALE& aIuScale,
}
bool EDA_UNIT_UTILS::UI::DoubleValueFromString( const EDA_IU_SCALE& aIuScale, const wxString& aTextValue,
double& aDoubleValue )
{
double dtmp = 0;
// Acquire the 'right' decimal point separator
const struct lconv* lc = localeconv();
wxChar decimal_point = lc->decimal_point[0];
wxString buf( aTextValue.Strip( wxString::both ) );
// Convert any entered decimal point separators to the 'right' one
buf.Replace( wxT( "." ), wxString( decimal_point, 1 ) );
buf.Replace( wxT( "," ), wxString( decimal_point, 1 ) );
// Find the end of the numeric part
unsigned brk_point = 0;
while( brk_point < buf.Len() )
{
wxChar ch = buf[brk_point];
if( !( (ch >= '0' && ch <= '9') || (ch == decimal_point) || (ch == '-') || (ch == '+') ) )
break;
++brk_point;
}
if( brk_point == 0 )
return false;
// Extract the numeric part
buf.Left( brk_point ).ToDouble( &dtmp );
// Check the unit designator
wxString unit( buf.Mid( brk_point ).Strip( wxString::both ).Lower() );
EDA_UNITS units;
//check for um, μm (µ is MICRO SIGN) and µm (µ is GREEK SMALL LETTER MU) for micrometre
if( unit == wxT( "um" ) || unit == wxT( "\u00B5m" ) || unit == wxT( "\u03BCm" ) )
{
units = EDA_UNITS::UM;
}
else if( unit == wxT( "mm" ) )
{
units = EDA_UNITS::MM;
}
else if( unit == wxT( "cm" ) )
{
units = EDA_UNITS::CM;
}
else if( unit == wxT( "mil" ) || unit == wxT( "mils" ) || unit == wxT( "thou" ) )
{
units = EDA_UNITS::MILS;
}
else if( unit == wxT( "in" ) || unit == wxT( "\"" ) )
{
units = EDA_UNITS::INCH;
}
else if( unit == wxT( "oz" ) ) // 1 oz = 1.37 mils
{
units = EDA_UNITS::MILS;
dtmp *= 1.37;
}
else if( unit == wxT( "ra" ) ) // Radians
{
units = EDA_UNITS::DEGREES;
dtmp *= 180.0f / M_PI;
}
else
{
return false;
}
aDoubleValue = FromUserUnit( aIuScale, units, dtmp );
return true;
}
long long int EDA_UNIT_UTILS::UI::ValueFromString( const EDA_IU_SCALE& aIuScale, EDA_UNITS aUnits,
const wxString& aTextValue, EDA_DATA_TYPE 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 )
+48 -7
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 );
@@ -588,7 +628,8 @@ bool FP_LIB_TABLE::LoadGlobalTable( FP_LIB_TABLE& aTable )
{
tableExists = false;
if( !fn.DirExists() && !fn.Mkdir( 0x777, wxPATH_MKDIR_FULL ) )
if( !wxFileName::DirExists( fn.GetPath() )
&& !wxFileName::Mkdir( fn.GetPath(), 0x777, wxPATH_MKDIR_FULL ) )
{
THROW_IO_ERROR( wxString::Format( _( "Cannot create global library table path '%s'." ),
fn.GetPath() ) );
+16 -4
View File
@@ -322,6 +322,12 @@ void CAIRO_GAL_BASE::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& a
}
void CAIRO_GAL_BASE::DrawHoleWall( const VECTOR2D& aCenterPoint, double aRadius, double aWallWidth )
{
DrawCircle( aCenterPoint, aRadius + aWallWidth );
}
void CAIRO_GAL_BASE::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius )
{
syncLineWidth();
@@ -1210,7 +1216,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 +1242,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 +1268,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 +1293,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();
@@ -1736,6 +1746,8 @@ void CAIRO_GAL_BASE::DrawGrid()
return;
VECTOR2D gridScreenSize( m_gridSize );
gridScreenSize = VECTOR2D( std::max( 1.0, gridScreenSize.x ),
std::max( 1.0, gridScreenSize.y ) );
double gridThreshold = KiROUND( computeMinGridSpacing() / m_worldScale );
+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__
@@ -67,6 +67,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetLayerDepth( 0.0 );
SetFlip( false, false );
SetLineWidth( 1.0f );
SetMinLineWidth( 1.0f );
computeWorldScale();
SetAxesEnabled( false );
@@ -75,6 +76,8 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetCoarseGrid( 10 );
m_gridLineWidth = 0.5f;
m_gridStyle = GRID_STYLE::LINES;
m_gridSize = VECTOR2D( 1.0, 1.0 );
m_gridOffset = VECTOR2D( 0.0, 0.0 );
m_gridMinSpacing = 10;
// Initialize the cursor shape
+75 -25
View File
@@ -413,10 +413,13 @@ OPENGL_GAL::OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIO
SetTarget( TARGET_NONCACHED );
// Avoid uninitialized variables:
ufm_worldPixelSize = 1;
ufm_screenPixelSize = 1;
ufm_pixelSizeMultiplier = 1;
ufm_antialiasingOffset = 1;
ufm_worldPixelSize = -1;
ufm_screenPixelSize = -1;
ufm_pixelSizeMultiplier = -1;
ufm_antialiasingOffset = -1;
ufm_minLinePixelWidth = -1;
ufm_fontTexture = -1;
ufm_fontTextureWidth = -1;
m_swapInterval = 0;
}
@@ -672,14 +675,6 @@ void OPENGL_GAL::BeginDrawing()
glActiveTexture( GL_TEXTURE0 );
}
// Set shader parameter
GLint ufm_fontTexture = m_shader->AddParameter( "u_fontTexture" );
GLint ufm_fontTextureWidth = m_shader->AddParameter( "u_fontTextureWidth" );
ufm_worldPixelSize = m_shader->AddParameter( "u_worldPixelSize" );
ufm_screenPixelSize = m_shader->AddParameter( "u_screenPixelSize" );
ufm_pixelSizeMultiplier = m_shader->AddParameter( "u_pixelSizeMultiplier" );
ufm_antialiasingOffset = m_shader->AddParameter( "u_antialiasingOffset" );
m_shader->Use();
m_shader->SetParameter( ufm_fontTexture, (int) FONT_TEXTURE_UNIT );
m_shader->SetParameter( ufm_fontTextureWidth, (int) font_image.width );
@@ -700,6 +695,7 @@ void OPENGL_GAL::BeginDrawing()
renderingOffset.x *= screenPixelSize.x;
renderingOffset.y *= screenPixelSize.y;
m_shader->SetParameter( ufm_antialiasingOffset, renderingOffset );
m_shader->SetParameter( ufm_minLinePixelWidth, GetMinLineWidth() );
m_shader->Deactivate();
// Something between BeginDrawing and EndDrawing seems to depend on
@@ -716,6 +712,18 @@ void OPENGL_GAL::BeginDrawing()
#endif /* KICAD_GAL_PROFILE */
}
void OPENGL_GAL::SetMinLineWidth( float aLineWidth )
{
GAL::SetMinLineWidth( aLineWidth );
if( m_shader && ufm_minLinePixelWidth != -1 )
{
m_shader->Use();
m_shader->SetParameter( ufm_minLinePixelWidth, aLineWidth );
m_shader->Deactivate();
}
}
void OPENGL_GAL::EndDrawing()
{
@@ -848,15 +856,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;
@@ -906,6 +915,25 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius )
}
void OPENGL_GAL::DrawHoleWall( const VECTOR2D& aCenterPoint, double aHoleRadius,
double aWallWidth )
{
if( m_isFillEnabled )
{
m_currentManager->Color( m_fillColor.r, m_fillColor.g, m_fillColor.b, m_fillColor.a );
m_currentManager->Shader( SHADER_HOLE_WALL, 1.0, aHoleRadius, aWallWidth );
m_currentManager->Vertex( aCenterPoint.x, aCenterPoint.y, m_layerDepth );
m_currentManager->Shader( SHADER_HOLE_WALL, 2.0, aHoleRadius, aWallWidth );
m_currentManager->Vertex( aCenterPoint.x, aCenterPoint.y, m_layerDepth );
m_currentManager->Shader( SHADER_HOLE_WALL, 3.0, aHoleRadius, aWallWidth );
m_currentManager->Vertex( aCenterPoint.x, aCenterPoint.y, m_layerDepth );
}
}
void OPENGL_GAL::drawCircle( const VECTOR2D& aCenterPoint, double aRadius, bool aReserve )
{
if( m_isFillEnabled )
@@ -1465,7 +1493,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 +2436,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;
@@ -2661,6 +2689,10 @@ void OPENGL_GAL::blitCursor()
glLineWidth( 1.0 );
glColor4d( color.r, color.g, color.b, color.a );
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glTranslated( 0, 0, -0.5 );
glBegin( GL_LINES );
glVertex2d( cursorCenter.x, cursorBegin.y );
glVertex2d( cursorCenter.x, cursorEnd.y );
@@ -2668,6 +2700,8 @@ void OPENGL_GAL::blitCursor()
glVertex2d( cursorBegin.x, cursorCenter.y );
glVertex2d( cursorEnd.x, cursorCenter.y );
glEnd();
glPopMatrix();
}
@@ -2752,6 +2786,9 @@ void OPENGL_GAL::init()
if( !m_shader->IsLinked() && !m_shader->Link() )
throw std::runtime_error( "Cannot link the shaders!" );
// Set up shader parameters after linking
setupShaderParameters();
// Check if video card supports textures big enough to fit the font atlas
int maxTextureSize;
glGetIntegerv( GL_MAX_TEXTURE_SIZE, &maxTextureSize );
@@ -2780,6 +2817,19 @@ void OPENGL_GAL::init()
}
void OPENGL_GAL::setupShaderParameters()
{
// Initialize shader uniform parameter locations
ufm_fontTexture = m_shader->AddParameter( "u_fontTexture" );
ufm_fontTextureWidth = m_shader->AddParameter( "u_fontTextureWidth" );
ufm_worldPixelSize = m_shader->AddParameter( "u_worldPixelSize" );
ufm_screenPixelSize = m_shader->AddParameter( "u_screenPixelSize" );
ufm_pixelSizeMultiplier = m_shader->AddParameter( "u_pixelSizeMultiplier" );
ufm_antialiasingOffset = m_shader->AddParameter( "u_antialiasingOffset" );
ufm_minLinePixelWidth = m_shader->AddParameter( "u_minLinePixelWidth" );
}
// Callback functions for the tesselator. Compare Redbook Chapter 11.
void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData )
{
+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;
}
}
+5
View File
@@ -35,6 +35,7 @@ const float SHADER_FILLED_CIRCLE = 2.0;
const float SHADER_STROKED_CIRCLE = 3.0;
const float SHADER_FONT = 4.0;
const float SHADER_LINE_A = 5.0;
const float SHADER_HOLE_WALL = 11.0;
varying vec4 v_shaderParams;
varying vec2 v_circleCoords;
@@ -124,6 +125,10 @@ void main()
{
strokedCircle( v_circleCoords, v_shaderParams[2], v_shaderParams[3] );
}
else if( mode == SHADER_HOLE_WALL )
{
strokedCircle( v_circleCoords, v_shaderParams[2], v_shaderParams[3] );
}
else if( mode == SHADER_FONT )
{
vec2 tex = v_shaderParams.yz;
+58 -4
View File
@@ -36,6 +36,7 @@ const float SHADER_LINE_C = 7.0;
const float SHADER_LINE_D = 8.0;
const float SHADER_LINE_E = 9.0;
const float SHADER_LINE_F = 10.0;
const float SHADER_HOLE_WALL = 11.0;
// Minimum line width
const float MIN_WIDTH = 1.0;
@@ -72,8 +73,8 @@ void computeLineCoords( bool posture, vec2 vs, vec2 vp, vec2 texcoord, vec2 dir,
vec2 s = sign( vec2( gl_ModelViewProjectionMatrix[0][0], gl_ModelViewProjectionMatrix[1][1] ) );
if( pixelWidth < 1.0 )
pixelWidth = 1.0;
if( pixelWidth < u_minLinePixelWidth )
pixelWidth = u_minLinePixelWidth;
if ( pixelWidth > 1.0 || u_pixelSizeMultiplier > 1.0 )
{
@@ -126,8 +127,59 @@ void computeCircleCoords( float mode, float vertexIndex, float radius, float lin
vec4 adjust = vec4(-1, -1, 0, 0);
if( pixelWidth < 1.0 )
pixelWidth = 1.0;
if( pixelWidth < u_minLinePixelWidth )
pixelWidth = u_minLinePixelWidth;
if( vertexIndex == 1.0 )
{
v_circleCoords = vec2( -sqrt( 3.0 ), -1.0 );
delta = vec4( -pixelR * sqrt(3.0), -pixelR, 0, 0 );
}
else if( vertexIndex == 2.0 )
{
v_circleCoords = vec2( sqrt( 3.0 ), -1.0 );
delta = vec4( pixelR * sqrt( 3.0 ), -pixelR, 0, 0 );
}
else if( vertexIndex == 3.0 )
{
v_circleCoords = vec2( 0.0, 2.0 );
delta = vec4( 0, 2 * pixelR, 0, 0 );
}
else if( vertexIndex == 4.0 )
{
v_circleCoords = vec2( -sqrt( 3.0 ), 0.0 );
delta = vec4( 0, 0, 0, 0 );
}
else if( vertexIndex == 5.0 )
{
v_circleCoords = vec2( sqrt( 3.0 ), 0.0 );
delta = vec4( 0, 0, 0, 0 );
}
else if( vertexIndex == 6.0 )
{
v_circleCoords = vec2( 0.0, 2.0 );
delta = vec4( 0, 0, 0, 0 );
}
v_shaderParams[2] = pixelR;
v_shaderParams[3] = pixelWidth;
delta.x *= u_screenPixelSize.x;
delta.y *= u_screenPixelSize.y;
gl_Position = center + delta + adjust;
gl_FrontColor = gl_Color;
}
void computeHoleWallCoords( float vertexIndex, float radius, float lineWidth )
{
vec4 delta;
vec4 center = roundv( gl_ModelViewProjectionMatrix * gl_Vertex + vec4(1, 1, 0, 0), u_screenPixelSize );
float pixelWidth = roundr( lineWidth / u_worldPixelSize, 1.0 );
if( pixelWidth < u_minLinePixelWidth )
pixelWidth = u_minLinePixelWidth;
float pixelR = roundr( radius / u_worldPixelSize, 1.0 ) + pixelWidth;
vec4 adjust = vec4(-1, -1, 0, 0);
if( vertexIndex == 1.0 )
{
@@ -195,6 +247,8 @@ void main()
computeLineCoords( posture, vs, vp, vec2( -1, 1 ), vec2( -1, 0 ), lineWidth, true );
else if( mode == SHADER_LINE_F )
computeLineCoords( posture, -vs, vp, vec2( 1, 1 ), vec2( -1, 0 ), lineWidth, false );
else if( mode == SHADER_HOLE_WALL )
computeHoleWallCoords( v_shaderParams.y, v_shaderParams.z, v_shaderParams.w );
else if( mode == SHADER_FILLED_CIRCLE || mode == SHADER_STROKED_CIRCLE)
computeCircleCoords( mode, v_shaderParams.y, v_shaderParams.z, v_shaderParams.w );
else
+28 -5
View File
@@ -40,7 +40,7 @@
KIGIT_COMMON::KIGIT_COMMON( git_repository* aRepo ) :
m_repo( aRepo ), m_connType( GIT_CONN_TYPE::GIT_CONN_LOCAL ), m_testedTypes( 0 ),
m_nextPublicKey( 0 )
m_nextPublicKey( 0 ), m_secretFetched( false )
{}
KIGIT_COMMON::KIGIT_COMMON( const KIGIT_COMMON& aOther ) :
@@ -55,7 +55,8 @@ KIGIT_COMMON::KIGIT_COMMON( const KIGIT_COMMON& aOther ) :
// The mutex is default-initialized, not copied
m_gitActionMutex(),
m_publicKeys( aOther.m_publicKeys ),
m_nextPublicKey( aOther.m_nextPublicKey )
m_nextPublicKey( aOther.m_nextPublicKey ),
m_secretFetched( aOther.m_secretFetched )
{
}
@@ -100,6 +101,25 @@ wxString KIGIT_COMMON::GetCurrentBranchName() const
}
wxString KIGIT_COMMON::GetPassword()
{
if( !m_secretFetched )
{
if( m_connType != GIT_CONN_TYPE::GIT_CONN_LOCAL && !m_remote.IsEmpty() )
{
wxString secret;
if( KIPLATFORM::SECRETS::GetSecret( m_remote, m_username, secret ) )
m_password = secret;
}
m_secretFetched = true;
}
return m_password;
}
std::vector<wxString> KIGIT_COMMON::GetBranchNames() const
{
if( !m_repo )
@@ -645,6 +665,10 @@ void KIGIT_COMMON::UpdateCurrentBranchInfo()
wxString remote_name = GetRemotename();
git_remote* remote = nullptr;
m_remote.clear();
m_password.clear();
m_secretFetched = false;
if( git_remote_lookup( &remote, m_repo, remote_name.ToStdString().c_str() ) == GIT_OK )
{
const char* url = git_remote_url( remote );
@@ -655,9 +679,6 @@ void KIGIT_COMMON::UpdateCurrentBranchInfo()
git_remote_free( remote );
}
// Find the stored password if it exists
KIPLATFORM::SECRETS::GetSecret( m_remote, m_username, m_password );
updateConnectionType();
updatePublicKeys();
}
@@ -748,6 +769,8 @@ void KIGIT_COMMON::updateConnectionType()
m_hostname = host;
}
}
m_secretFetched = !m_password.IsEmpty();
}
+6 -3
View File
@@ -89,11 +89,11 @@ public:
};
wxString GetUsername() const { return m_username; }
wxString GetPassword() const { return m_password; }
wxString GetPassword();
GIT_CONN_TYPE GetConnType() const;
void SetUsername( const wxString& aUsername ) { m_username = aUsername; }
void SetPassword( const wxString& aPassword ) { m_password = aPassword; }
void SetUsername( const wxString& aUsername ) { m_username = aUsername; m_secretFetched = false; }
void SetPassword( const wxString& aPassword ) { m_password = aPassword; m_secretFetched = true; }
void SetSSHKey( const wxString& aSSHKey );
// Holds a temporary variable that can be used by the authentication callback
@@ -127,6 +127,8 @@ public:
void SetRemote( const wxString& aRemote )
{
m_remote = aRemote;
m_password.clear();
m_secretFetched = false;
updateConnectionType();
}
@@ -170,6 +172,7 @@ private:
std::vector<wxString> m_publicKeys;
int m_nextPublicKey;
bool m_secretFetched;
// Create a dummy flag to tell if we have tested ssh agent credentials separately
// from the ssh key credentials
+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;
+38 -62
View File
@@ -40,19 +40,11 @@ HTTP_LIB_CONNECTION::HTTP_LIB_CONNECTION( const HTTP_LIB_SOURCE& aSource, bool a
m_source = aSource;
if( aTestConnectionNow )
{
ValidateHTTPLibraryEndpoints();
}
validateHttpLibraryEndpoints();
}
HTTP_LIB_CONNECTION::~HTTP_LIB_CONNECTION()
{
// Do nothing
}
bool HTTP_LIB_CONNECTION::ValidateHTTPLibraryEndpoints()
bool HTTP_LIB_CONNECTION::validateHttpLibraryEndpoints()
{
m_endpointValid = false;
std::string res = "";
@@ -78,11 +70,8 @@ bool HTTP_LIB_CONNECTION::ValidateHTTPLibraryEndpoints()
nlohmann::json response = nlohmann::json::parse( res );
// Check that the endpoints exist, if not fail.
if( !response.at( http_endpoint_categories ).empty()
&& !response.at( http_endpoint_parts ).empty() )
{
if( !response.at( "categories" ).empty() && !response.at( "parts" ).empty() )
m_endpointValid = true;
}
}
}
catch( const std::exception& e )
@@ -90,29 +79,19 @@ bool HTTP_LIB_CONNECTION::ValidateHTTPLibraryEndpoints()
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
e.what(), res );
wxLogTrace( traceHTTPLib,
wxT( "ValidateHTTPLibraryEndpoints: Exception occurred while testing the API "
"connection: %s" ),
wxLogTrace( traceHTTPLib, wxT( "validateHttpLibraryEndpoints: Exception while testing API connection: %s" ),
m_lastError );
m_endpointValid = false;
}
if( m_endpointValid )
{
syncCategories();
}
return m_endpointValid;
}
bool HTTP_LIB_CONNECTION::IsValidEndpoint() const
{
return m_endpointValid;
}
bool HTTP_LIB_CONNECTION::syncCategories()
{
if( !IsValidEndpoint() )
@@ -124,7 +103,7 @@ bool HTTP_LIB_CONNECTION::syncCategories()
std::string res = "";
std::unique_ptr<KICAD_CURL_EASY> curl = createCurlEasyObject();
curl->SetURL( m_source.root_url + http_endpoint_categories + ".json" );
curl->SetURL( m_source.root_url + "categories.json" );
try
{
@@ -133,9 +112,7 @@ bool HTTP_LIB_CONNECTION::syncCategories()
res = curl->GetBuffer();
if( !checkServerResponse( curl ) )
{
return false;
}
nlohmann::json response = nlohmann::json::parse( res );
@@ -162,9 +139,7 @@ bool HTTP_LIB_CONNECTION::syncCategories()
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
e.what(), res );
wxLogTrace( traceHTTPLib,
wxT( "syncCategories: Exception occurred while syncing categories: %s" ),
m_lastError );
wxLogTrace( traceHTTPLib, wxT( "syncCategories: Exception while syncing categories: %s" ), m_lastError );
m_categories.clear();
@@ -187,8 +162,7 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
if( m_cachedParts.find( aPartID ) != m_cachedParts.end() )
{
// check if it's outdated, if so re-fetch
if( std::difftime( std::time( nullptr ), m_cachedParts[aPartID].lastCached )
< m_source.timeout_parts )
if( std::difftime( std::time( nullptr ), m_cachedParts[aPartID].lastCached ) < m_source.timeout_parts )
{
aFetchedPart = m_cachedParts[aPartID];
return true;
@@ -198,7 +172,7 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
std::string res = "";
std::unique_ptr<KICAD_CURL_EASY> curl = createCurlEasyObject();
std::string url = m_source.root_url + fmt::format( "{}/{}.json", http_endpoint_parts, aPartID );
std::string url = m_source.root_url + fmt::format( "parts/{}.json", aPartID );
curl->SetURL( url );
try
@@ -208,9 +182,7 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
res = curl->GetBuffer();
if( !checkServerResponse( curl ) )
{
return false;
}
nlohmann::ordered_json response = nlohmann::ordered_json::parse( res );
std::string key = "";
@@ -225,13 +197,9 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
// API might not want to return an optional name.
if( response.contains( "name" ) )
{
aFetchedPart.name = response.at( "name" );
}
else
{
aFetchedPart.name = aFetchedPart.id;
}
aFetchedPart.symbolIdStr = response.at( "symbolIdStr" );
@@ -285,18 +253,36 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
}
// Add field to fields list
aFetchedPart.fields.push_back(
std::make_pair( key, std::make_tuple( value, visible ) ) );
aFetchedPart.fields.push_back( std::make_pair( key, std::make_tuple( value, visible ) ) );
}
if( response.contains( "description" ) )
aFetchedPart.desc = response.at( "description" );
if( response.contains( "keywords" ) )
aFetchedPart.keywords = response.at( "keywords" );
if( response.contains( "footprint_filters" ) )
{
nlohmann::json filters_json = response.at( "footprint_filters" );
if( filters_json.is_array() )
{
for( const auto& val : filters_json )
aFetchedPart.fp_filters.push_back( val );
}
else
{
aFetchedPart.fp_filters.push_back( filters_json );
}
}
}
catch( const std::exception& e )
{
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
e.what(), res );
wxLogTrace( traceHTTPLib,
wxT( "SelectOne: Exception occurred while retrieving part from REST API: %s" ),
m_lastError );
wxLogTrace( traceHTTPLib, wxT( "SelectOne: Exception while fetching part: %s" ), m_lastError );
return false;
}
@@ -307,8 +293,7 @@ bool HTTP_LIB_CONNECTION::SelectOne( const std::string& aPartID, HTTP_LIB_PART&
}
bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory,
std::vector<HTTP_LIB_PART>& aParts )
bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory, std::vector<HTTP_LIB_PART>& aParts )
{
if( !IsValidEndpoint() )
{
@@ -320,8 +305,7 @@ bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory,
std::unique_ptr<KICAD_CURL_EASY> curl = createCurlEasyObject();
curl->SetURL( m_source.root_url
+ fmt::format( "{}/category/{}.json", http_endpoint_parts, aCategory.id ) );
curl->SetURL( m_source.root_url + fmt::format( "parts/category/{}.json", aCategory.id ) );
try
{
@@ -339,21 +323,13 @@ bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory,
part.id = item.at( "id" );
if( item.contains( "description" ) )
{
// At this point we don't display anything so just set it to false
part.fields.push_back( std::make_pair(
"description", std::make_tuple( item.at( "description" ), false ) ) );
}
part.desc = item.at( "description" );
// API might not want to return an optional name.
if( item.contains( "name" ) )
{
part.name = item.at( "name" );
}
else
{
part.name = part.id;
}
// add to cache
m_cache[part.name] = std::make_tuple( part.id, aCategory.id );
@@ -363,11 +339,10 @@ bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory,
}
catch( const std::exception& e )
{
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
m_lastError += wxString::Format( _( "Error: %s" ) + "\n" + _( "API Response: %s" ) + "\n",
e.what(), res );
wxLogTrace( traceHTTPLib, wxT( "Exception occurred while syncing parts from REST API: %s" ),
m_lastError );
wxLogTrace( traceHTTPLib, wxT( "Exception occurred while syncing parts: %s" ), m_lastError );
return false;
}
@@ -379,6 +354,7 @@ bool HTTP_LIB_CONNECTION::SelectAll( const HTTP_LIB_CATEGORY& aCategory,
bool HTTP_LIB_CONNECTION::checkServerResponse( std::unique_ptr<KICAD_CURL_EASY>& aCurl )
{
int statusCode = aCurl->GetResponseStatusCode();
if( statusCode != 200 )
{
m_lastError += wxString::Format( _( "API responded with error code: %s" ) + "\n",
+3 -5
View File
@@ -35,10 +35,9 @@ const int httplibSchemaVersion = 1;
HTTP_LIB_SETTINGS::HTTP_LIB_SETTINGS( const std::string& aFilename ) :
JSON_SETTINGS( aFilename, SETTINGS_LOC::NONE, httplibSchemaVersion )
{
m_params.emplace_back( new PARAM<std::string>( "source.type", &sourceType, "" ) );
m_params.emplace_back( new PARAM<std::string>( "source.type", &m_sourceType, "" ) );
m_params.emplace_back(
new PARAM<std::string>( "source.api_version", &m_Source.api_version, "" ) );
m_params.emplace_back( new PARAM<std::string>( "source.api_version", &m_Source.api_version, "" ) );
m_params.emplace_back( new PARAM<std::string>( "source.root_url", &m_Source.root_url, "" ) );
@@ -46,8 +45,7 @@ HTTP_LIB_SETTINGS::HTTP_LIB_SETTINGS( const std::string& aFilename ) :
m_params.emplace_back( new PARAM<int>( "source.timeout_parts_seconds", &m_Source.timeout_parts, 30 ) );
m_params.emplace_back( new PARAM<int>( "source.timeout_categories_seconds",
&m_Source.timeout_categories, 600 ) );
m_params.emplace_back( new PARAM<int>( "source.timeout_categories_seconds", &m_Source.timeout_categories, 600 ) );
}
+4 -1
View File
@@ -119,7 +119,10 @@ std::map<wxString, wxString> ALTIUM_ASCII_PARSER::ReadProperties()
if( canonicalKey == wxT( "DESIGNATOR" ) || canonicalKey == wxT( "NAME" )
|| canonicalKey == wxT( "TEXT" ) )
{
if( kv[ wxT( "RECORD" ) ] != wxT( "4" ) )
wxString recordType = kv[ wxT( "RECORD" ) ];
// RECORD=33 (FILE_NAME) stores Windows-formatted paths; keep the backslashes intact.
if( recordType != wxT( "4" ) && recordType != wxT( "33" ) )
value = AltiumPropertyToKiCadString( value );
}
}
+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 ) );
}
+1 -1
View File
@@ -41,7 +41,7 @@ JOB_EXPORT_PCB_ODB::JOB_EXPORT_PCB_ODB() :
m_filename(),
m_drawingSheet(),
m_units( ODB_UNITS::MM ),
m_precision( 2 ),
m_precision( 4 ),
m_compressionMode( ODB_COMPRESSION::ZIP )
{
m_params.emplace_back( new JOB_PARAM<wxString>( "drawing_sheet", &m_drawingSheet, m_drawingSheet ) );
+5
View File
@@ -84,6 +84,8 @@ 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<bool>( "use_board_stackup_colors", &m_useBoardStackupColors, m_useBoardStackupColors ) );
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 +93,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 ) );
+7 -2
View File
@@ -60,7 +60,8 @@ public:
{
BASIC,
HIGH,
USER
USER,
JOB_SETTINGS
};
enum class BG_STYLE
@@ -85,14 +86,18 @@ public:
BG_STYLE m_bgStyle = BG_STYLE::DEFAULT;
int m_width = 0;
int m_height = 0;
std::string m_colorPreset;
std::string m_appearancePreset;
bool m_useBoardStackupColors = true;
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;
+1 -1
View File
@@ -39,7 +39,7 @@ JOB_RC::JOB_RC( const std::string& aType ) :
m_units( JOB_RC::UNITS::MM ),
m_severity( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ),
m_format( OUTPUT_FORMAT::REPORT ),
m_exitCodeViolations( false )
m_exitCodeViolations( true ) // this ensures GUI jobs default to treat violations as job failure, cli will default false elsewhere
{
m_params.emplace_back( new JOB_PARAM<UNITS>( "units", &m_units, m_units ) );
m_params.emplace_back( new JOB_PARAM<int>( "severity", &m_severity, m_severity ) );
+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:
+3
View File
@@ -24,6 +24,7 @@
#include <wx/zipstrm.h>
#include <gestfich.h>
#include <common.h>
#include <wildcards_and_files_ext.h>
JOBS_OUTPUT_ARCHIVE::JOBS_OUTPUT_ARCHIVE() :
JOBS_OUTPUT_HANDLER(),
@@ -52,6 +53,8 @@ bool JOBS_OUTPUT_ARCHIVE::HandleOutputs( const wxString& baseTempPath, PROJECT*
if( outputPath.StartsWith( "~" ) )
outputPath.Replace( "~", wxGetHomeDir(), false );
outputPath = EnsureFileExtension( outputPath, FILEEXT::ArchiveFileExtension );
wxFFileOutputStream ostream( outputPath );
if( !ostream.IsOk() ) // issue to create the file. Perhaps not writable dir
+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() );

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