Compare commits

...

1642 Commits

Author SHA1 Message Date
Wayne Stambaugh 9767a083cc Tag stable version 7.0.11 release candidate 1. 2024-02-06 08:19:22 -05:00
Alex Shvartzkop 07c9aee1ea Altium: remove illegal chars from library name.
(cherry picked from commit 8a4f203963)
2024-02-01 21:42:36 +03:00
Alex fc0911f55e DXF import: INSERT angles are in degrees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16656

(cherry picked from commit 767ab72cdb)
2024-02-01 21:09:09 +03:00
Alex b74fef1b10 Altium PCB: support polygon id 65534 for keepout tracks on board outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16849

(cherry picked from commit 285067dad1)
2024-02-01 20:59:20 +03:00
Alex Shvartzkop 127874a7b9 Fix bezier curves drawing in schematic/libedit.
(cherry picked from commit ead44d58a0)
2024-02-01 20:42:01 +03:00
Alex ecce28a472 Altium schematic import: fix power ports.
Use different symbol names for different port port styles.
Also fixes curved shapes construction.

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

(cherry picked from commit 6225ef69b6)
2024-02-01 20:37:22 +03:00
Alex Shvartzkop e93dacb788 Fix HPGL color mode being set.
(cherry picked from commit 57bc443f0b)
2024-02-01 20:02:00 +03:00
Alex Shvartzkop 6c4734c370 Altium schematic: case-insensitive search for subsheet files.
Also fixes open polylines on sheet.
Also prevents adding polylines with less than 2 points.

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

(cherry picked from commit 7f29ac39d8)
2024-02-01 20:00:58 +03:00
Henrik Kauhanen 93a63a61ec Translated using Weblate (Swedish)
Currently translated at 99.9% (8020 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2024-02-01 14:54:37 +01:00
김랑기 57b9c1bdaf Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-02-01 14:54:36 +01:00
VicSanRoPe b166e866e0 Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-02-01 14:54:35 +01:00
Pferd O 9fa2549d7a Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-02-01 14:54:34 +01:00
Seth Hillbrand f9cb5a26a3 Update Translations 2024-02-01 10:06:56 +01:00
김랑기 cbd40cb5e4 Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-02-01 09:44:05 +01:00
pondahai 352672f8bf Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (8008 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-02-01 09:44:05 +01:00
Ulices 6dc5c2b24a Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8022 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2024-02-01 09:44:05 +01:00
YÜKSEL AÇIKGÖZ fa63bd24f4 Translated using Weblate (Turkish)
Currently translated at 61.9% (4969 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2024-02-01 09:44:05 +01:00
VicSanRoPe 10750bc460 Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-02-01 09:44:04 +01:00
ssantos afb4b1411d Translated using Weblate (Portuguese)
Currently translated at 99.8% (8013 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt/
2024-02-01 09:44:04 +01:00
ZbeeGin 74d7711e37 Translated using Weblate (Polish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2024-02-01 09:44:04 +01:00
Mark Roszko 585693f0b3 Explicitly add 48, 128, 256 to icon bundles for each app 2024-01-30 20:58:05 +00:00
Marek Roszko 186f5e65a7 Add 256x256 program icon pngs
(cherry picked from commit f20e8a6e41)
2024-01-30 20:35:19 +00:00
Marek Roszko 1fd1cde3bf Add 256 icon png generation
(cherry picked from commit 8b5fff4ffe)
2024-01-30 20:34:33 +00:00
Marek Roszko dcadff46b7 Add missing 256x256 image to app icos
(cherry picked from commit 6f52220741)
2024-01-30 20:31:49 +00:00
Seth Hillbrand 62bb553460 Update translations 2024-01-29 08:24:32 -08:00
pondahai 0f32217cf0 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (8005 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:12 +01:00
ssantos 0ec479c17f Translated using Weblate (Portuguese)
Currently translated at 99.8% (8013 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt/
2024-01-29 04:52:12 +01:00
VicSanRoPe 4ede3b3f2b Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-01-29 04:52:11 +01:00
pondahai 22feba7bbf Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (8004 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
Oliver0804 b6eef921a4 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (8004 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
CloverGit 567d0dca95 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
Stanislav Kaliuk 7a869fc503 Translated using Weblate (Ukrainian)
Currently translated at 99.8% (8013 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2024-01-29 04:52:11 +01:00
ZbeeGin 8b6274af16 Translated using Weblate (Polish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2024-01-29 04:52:11 +01:00
VicSanRoPe 581715f7aa Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-01-29 04:52:11 +01:00
pondahai 1c7a64b0ea Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (8001 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
Oliver0804 8fb25f5577 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (8001 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
CloverGit 88ae436249 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
pondahai bf6bcba7bb Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (7997 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
Oliver0804 10205bb432 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (7997 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2024-01-29 04:52:11 +01:00
CloverGit aa1fc43048 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
VicSanRoPe 9c12ba60aa Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-01-29 04:52:11 +01:00
Mark Hämmerling 3c21938295 Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-29 04:52:11 +01:00
Hubert Hu 8d9e254e0c Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
Henrik Kauhanen e52dafcaaf Translated using Weblate (Swedish)
Currently translated at 99.9% (8020 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2024-01-29 04:52:11 +01:00
Henrik Kauhanen 676b7d1739 Translated using Weblate (Finnish)
Currently translated at 99.7% (8007 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2024-01-29 04:52:11 +01:00
向阳阳 490d3152ab Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
Hubert Hu 1b68a4f98e Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
向阳阳 58fac19a5c Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-29 04:52:11 +01:00
Tokita, Hiroshi 65850682a8 Translated using Weblate (Japanese)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2024-01-29 04:52:11 +01:00
Ulices 6c4df9aca9 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8022 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2024-01-29 04:52:10 +01:00
Pferd O b110861ba1 Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-29 04:52:10 +01:00
jean-pierre charras 13fcb571f7 Eeschema, hierarchy navigator: right click on an item must select the corresponding
sheet, not the currently opened sheet.
From master branch
Fixes #16670
https://gitlab.com/kicad/code/kicad/-/issues/16670
2024-01-27 10:06:21 +01:00
Wayne Stambaugh 9738a71922 Fix symbol annotation when pasting nested hierarchical sheets.
(cherry picked from commit 4d6bbc8caa)
2024-01-26 07:32:57 -05:00
Marek Roszko f45e3ca339 Fix assert in SYMBOL_VIEWER_FRAME::onSelectNextSymbol due to bad current selection check
Fixes sentry KICAD-6KE


(cherry picked from commit b8bbbcf410)
2024-01-25 01:18:05 +00:00
Jon Evans c579e11db4 Allow for empty LIB_PART in certain symbol functions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16731


(cherry picked from commit 5d7eac7677)
2024-01-24 20:54:13 +00:00
Wayne Stambaugh 819f75e17c Remove paste sheet instance path debugging output. 2024-01-23 16:06:07 -05:00
Wayne Stambaugh 0828ee3b10 Fix overly aggressive sheet instance pruning.
(cherry picked from commit b3a36bd783)
2024-01-23 08:03:01 -05:00
jean-pierre charras 35094a786d PANEL_PCBNEW_COLOR_SETTINGS: ensure color setting for all DRC markers are in list
From master branch.
Fixes #16674
https://gitlab.com/kicad/code/kicad/-/issues/16674
2024-01-23 13:39:34 +01:00
Wayne Stambaugh add2215e5a Fix broken pasted sheet page numbering.
This change no longer sorts pasted sheets by page number.  This was done
because pasted sheets may not be numbered.  When sheets are not numbered
they are sorted by UUID path which results in some unexpected results.
Since the pasted sheet code uses recursion, pages will be numbered in the
order they are added.

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

(cherry picked from commit 4cf22e428c)
2024-01-22 19:26:42 -05:00
Marco Ciampa efa99b1e71 Updated Italian translation 2024-01-22 17:43:38 +01:00
Seth Hillbrand 1ebc66b9e2 Update translations 2024-01-21 17:13:13 -08:00
dsa-t c852055ae1 Translated using Weblate (Russian)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2024-01-22 02:12:33 +01:00
Marek 8fb2cecd64 Translated using Weblate (Polish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2024-01-22 02:12:33 +01:00
Hajdu Norbert 5d2952cd24 Translated using Weblate (Hungarian)
Currently translated at 1.8% (152 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/hu/
2024-01-22 02:12:33 +01:00
dsa-t 4a1fe267ca Translated using Weblate (Russian)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2024-01-22 02:12:33 +01:00
Tokita, Hiroshi 694b37b852 Translated using Weblate (Japanese)
Currently translated at 99.9% (8024 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2024-01-22 02:12:33 +01:00
aris-kimi 253f7deb62 Translated using Weblate (Greek)
Currently translated at 99.9% (8021 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-22 02:12:33 +01:00
Lao·Zhu 3e62bbf561 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8023 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-22 02:12:33 +01:00
김랑기 0f9c75749d Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-22 02:12:33 +01:00
aris-kimi 9c7f1d261f Translated using Weblate (Greek)
Currently translated at 99.8% (8011 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-22 02:12:32 +01:00
Mert Kalkancı 44a4800383 Translated using Weblate (Turkish)
Currently translated at 61.4% (4929 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2024-01-22 02:12:32 +01:00
김랑기 2e6f01b871 Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-22 02:12:32 +01:00
aris-kimi 41bb627ef2 Translated using Weblate (Greek)
Currently translated at 99.8% (8010 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-22 02:12:32 +01:00
Mark Hämmerling b2fa06b5f5 Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
Pferd O 69e9aa917a Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
김랑기 507bebda80 Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-22 02:12:32 +01:00
Pferd O e4a66c8a11 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
Mark Hämmerling ecdee78368 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
向阳阳 763ee75856 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8022 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-22 02:12:32 +01:00
Henrik Kauhanen 07fb0804ac Translated using Weblate (Swedish)
Currently translated at 99.9% (8019 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2024-01-22 02:12:32 +01:00
김랑기 ced1c742c8 Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-22 02:12:32 +01:00
Henrik Kauhanen 029b0e709a Translated using Weblate (Finnish)
Currently translated at 99.7% (8007 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2024-01-22 02:12:32 +01:00
Ulices 43ffccc67f Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8022 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2024-01-22 02:12:32 +01:00
김랑기 23e9b733ee Translated using Weblate (Korean)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-22 02:12:32 +01:00
aris-kimi f4ffa8123b Translated using Weblate (Greek)
Currently translated at 99.7% (8009 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-22 02:12:32 +01:00
Pferd O fd9e976346 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
Mark Hämmerling 85db61b8d3 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:32 +01:00
Henrik Kauhanen a2e1ac3972 Translated using Weblate (Swedish)
Currently translated at 99.9% (8019 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2024-01-22 02:12:32 +01:00
dsa-t 0c3f2fd4b4 Translated using Weblate (Russian)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2024-01-22 02:12:31 +01:00
Wellington Terumi Uemura b71f32e1b4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2024-01-22 02:12:31 +01:00
ZbeeGin f478643411 Translated using Weblate (Polish)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2024-01-22 02:12:31 +01:00
gallegonovato 39cf1fea22 Translated using Weblate (Spanish)
Currently translated at 100.0% (8026 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2024-01-22 02:12:31 +01:00
aris-kimi f967d6ab43 Translated using Weblate (Greek)
Currently translated at 99.7% (8008 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-22 02:12:31 +01:00
Pferd O 448da01cea Translated using Weblate (German)
Currently translated at 99.9% (8025 of 8026 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-22 02:12:31 +01:00
Jeff Young a25888b4ba Partial cherry-pick of d6b39c672e 2024-01-21 23:10:18 +00:00
Jeff Young 7f3508b8b3 Don't query first item of empty vector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16687

(cherry picked from commit 6fca467e2a)
2024-01-21 23:10:18 +00:00
Wayne Stambaugh 1d880cdcf6 Incremental schematic connectivity fixes.
(cherry picked from commit 2cfb7a5310)
2024-01-21 12:46:39 -05:00
Jeff Young c855702918 Selective cherry-pick from 13935399a5 2024-01-20 22:38:01 +00:00
Jeff Young 51023a1ae4 Make sure imported graphics layer is visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642

(partially cherry picked from commit 57315dd625)
2024-01-18 14:10:55 +00:00
Jeff Young 35364bd8ad Support point editing of inverted rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16595

(cherry picked from commit 455fae45d8)
2024-01-17 15:31:17 +00:00
Jeff Young 0f715223e9 Restore preferential selection treatment for silk items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16607

(cherry picked from commit df48ebfbe7)
2024-01-17 14:11:39 +00:00
Marek Roszko 9ceace2a47 Add share/locale to catalog paths on windows
(cherry picked from commit fc62d36441)
2024-01-16 17:51:15 +00:00
Mark Roszko 6e93c08ff2 update vcpkg for locale wxwidgets 2024-01-16 02:25:02 +00:00
Wayne Stambaugh 3744cfd987 Fix assertion when pasting schematic sheets.
Pasted sheets do not have assigned SCH_SCREEN objects until after they
are loaded.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16579
2024-01-15 13:56:20 -05:00
Marek Roszko 245abd5f16 Remove the user 3d path creation
(cherry picked from commit 5bc78f7d9f)
2024-01-14 00:49:20 +00:00
Seth Hillbrand f559b49f44 Update translations 2024-01-12 09:05:22 -08:00
김랑기 8e9f50f465 Translated using Weblate (Korean)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:53 +01:00
Toni Laiho ae39cfb1be Translated using Weblate (Finnish)
Currently translated at 99.7% (8007 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2024-01-12 18:02:53 +01:00
aris-kimi 259c34d12b Translated using Weblate (Greek)
Currently translated at 99.7% (8005 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-12 18:02:53 +01:00
Mark Hämmerling fbeeadfd0f Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:53 +01:00
김랑기 9ed89a324b Translated using Weblate (Korean)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:53 +01:00
Tokita, Hiroshi 49c17a0ce5 Translated using Weblate (Japanese)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2024-01-12 18:02:53 +01:00
aris-kimi a11211ecd1 Translated using Weblate (Greek)
Currently translated at 99.6% (7997 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-12 18:02:53 +01:00
Johannes Maibaum 8d2c04b287 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:52 +01:00
dsa-t 7834fc9214 Translated using Weblate (Russian)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2024-01-12 18:02:52 +01:00
Toni Laiho 6bebfdc65d Translated using Weblate (Finnish)
Currently translated at 99.7% (8007 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2024-01-12 18:02:52 +01:00
Luc c35f4a0988 Translated using Weblate (German)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:52 +01:00
Mark Hämmerling 86660d055c Translated using Weblate (German)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:52 +01:00
김랑기 59dae982d4 Translated using Weblate (Korean)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:52 +01:00
Tokita, Hiroshi 8a3bf672e7 Translated using Weblate (Japanese)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2024-01-12 18:02:52 +01:00
Mark Hämmerling cc05e9d8fb Translated using Weblate (German)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:52 +01:00
Hubert Hu ada4f107e7 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8020 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-12 18:02:52 +01:00
김랑기 3db58c533b Translated using Weblate (Korean)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:52 +01:00
Tokita, Hiroshi 480e4290a0 Translated using Weblate (Japanese)
Currently translated at 99.9% (8022 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2024-01-12 18:02:52 +01:00
CloverGit 89c96d50ef Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8020 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2024-01-12 18:02:52 +01:00
김랑기 dfc3a7bf5c Translated using Weblate (Korean)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:52 +01:00
Jan Straka 10f0fa65f3 Translated using Weblate (Czech)
Currently translated at 91.9% (7375 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2024-01-12 18:02:52 +01:00
Jan Straka d23a449d57 Translated using Weblate (Czech)
Currently translated at 91.8% (7372 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2024-01-12 18:02:52 +01:00
Nguyễn Ngọc Khánh 753c7ae666 Translated using Weblate (Vietnamese)
Currently translated at 21.8% (1753 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2024-01-12 18:02:52 +01:00
Wellington Terumi Uemura ac7fa777a6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2024-01-12 18:02:52 +01:00
김랑기 2b63d9f175 Translated using Weblate (Korean)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2024-01-12 18:02:52 +01:00
aris-kimi 744a3463b2 Translated using Weblate (Greek)
Currently translated at 99.5% (7990 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-12 18:02:51 +01:00
Mark Hämmerling f70fdad9ae Translated using Weblate (German)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2024-01-12 18:02:51 +01:00
Jan Straka 42df6cbca2 Translated using Weblate (Czech)
Currently translated at 91.8% (7371 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2024-01-12 18:02:51 +01:00
Nguyễn Ngọc Khánh c2e39cbc5d Translated using Weblate (Vietnamese)
Currently translated at 21.7% (1746 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2024-01-12 18:02:51 +01:00
aris-kimi ed0046fcd0 Translated using Weblate (Greek)
Currently translated at 99.5% (7989 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2024-01-12 18:02:51 +01:00
Wayne Stambaugh 5e2f979f36 Do not assert when pruning orphaned sheet and/or symbol instances.
Running the schematic editor in the stand alone mode can result in an
empty project name.  Rather than assert when the project name is empty,
just don't run the pruning algorithm.  The pruning will just have to
happen on the next load of the schematic when it has a proper project
name.

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

(cherry picked from commit 0df8d5c2d6)
2024-01-11 15:52:27 -05:00
Jeff Young 0b1065ff55 Knockout different-net dimensions in zone-filler.
(By-hand cherry-pick of 435e60d0e54826f799ed1580c616e82e0199c460.)
2024-01-10 17:01:13 +00:00
Wayne Stambaugh 7db48b81b6 Second attempt at fixing ERC dialog reference update issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519

(cherry picked from commit 4f3fb5c23f)
2024-01-09 13:15:46 -05:00
Wayne Stambaugh f0ce3167c0 Fix sheet path dependent ERC dialog selection issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16519

(cherry picked from commit 92c58f2564)
2024-01-08 12:25:19 -05:00
jean-pierre charras ace6439758 LIB_TEXTBOX: fix incorrect line style in plot function for LINE_STYLE::DEFAULT.
LINE_STYLE::DEFAULT is fixed as SOLID in all plot functions, but not for this item.
From master branch
Fixes #16543
https://gitlab.com/kicad/code/kicad/-/issues/16543
2024-01-07 16:19:33 +01:00
Wayne Stambaugh e38b948f0b Do not update tree to selected sheet in schematic hierarchy navigator.
This was causing unwanted tree expansions when descending a sheet hierarchy
in editor.

Also fixed an issue with the tree highlighting when changing sheets in the
schematic editor.

(cherry picked from commit 50cad558cf)
2024-01-06 12:27:28 -05:00
jean-pierre charras 2f74d1466e SVG_PLOTTER: Update brush color also when the alpha value has changed.
Previously, the alpha value change was not tested, so the SVG style was
not always updated.
Fixes #16530
https://gitlab.com/kicad/code/kicad/-/issues/16530
2024-01-06 10:01:22 +01:00
Marek Roszko 85c324b5d7 Change the __except to use the exception result codes
(cherry picked from commit be21c689e8)
2024-01-06 02:06:06 +00:00
Marek Roszko edddf8a660 Add Windows SEH to catch fontconfig/freetype font read faults
Related https://gitlab.com/kicad/code/kicad/-/issues/16484


(cherry picked from commit 05cbfc6aca)
2024-01-06 00:26:17 +00:00
Wayne Stambaugh 193e7f894d Do not expand the entire schematic hierarchy navigator tree by default.
The new behavior is to only expand to the first child of the root sheet
level.  On very complex hierarchies, this makes the navigator far more
useful.

Do not update schematic hierarchy navigator on every edit.  Now only
sheet changes will trigger a rebuild of the tree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16371
2024-01-05 16:46:01 -05:00
Roberto Fernandez Bautista 32cc486d89 Handle bitmap (reference image) selection correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16522
2024-01-05 00:20:32 +01:00
Wayne Stambaugh 0aec789659 Don't show ERCs for every sheet path when using shared schematics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16434

(cherry picked from commit f07d797ab3)
2024-01-04 14:01:22 -05:00
Jeff Young f92cedab9a Only generate event on setting current value.
(And do it last.)

(cherry picked from commit 3fd81fe7c0)
2024-01-04 14:37:37 +00:00
Jeff Young f84f93b167 Switch default thicknesses to um.
Also fix a bug where resetting the values doesn't work if
the thickness units were changed because it tries to keep
the old width values which are then re-scaled to the reset
thickness units.  Probably better to just reset the widths
too, as it's potentially less confusing.
2024-01-04 13:37:48 +00:00
Jeff Young d33fbd8e47 Do NOT return false from a visitor unless you want to stop visiting!
This fixes a bug where DRC would bail out early if any of
the colliding objects was a free pad.
2024-01-04 13:24:38 +00:00
Mark Roszko 3ab23201b4 Add missing drill precision arg integer specifier
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16508
2024-01-04 02:31:23 +00:00
Roberto Fernandez Bautista 39236ae68f CADSTAR PCB: Fix build. BuildLibName() doesn't exist in 7.0 2024-01-04 01:01:26 +01:00
Roberto Fernandez Bautista 5ee89b41ac CADSTAR PCB: Handle multi-layer figures & fix multi-layer mapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16515
2024-01-04 00:55:55 +01:00
Roberto Fernandez Bautista ec0ff4ffc2 CADSTAR PCB: Handle multi-layer library coppers correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16486
2024-01-04 00:55:54 +01:00
Wayne Stambaugh 1b6b2d7896 Fix crash when importing Eagle board file with no "classes" element.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16504
2024-01-03 10:16:28 -05:00
Jeff Young 036241c819 More explicit pad-missing message when net involved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16489

(cherry picked from commit 15a2d65a0c)
2024-01-01 10:54:38 +00:00
Alex Shvartzkop 2dc81999ef Default graphical line style in v6 and older was Dashed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16479

(cherry picked from commit aa6fd88082)
2024-01-01 13:51:03 +05:00
jean-pierre charras 3f8a5874e6 Gerbview: fix incorrect rotation of DCode shape type regular polygon.
The rotation was the opposite of the actual rotation, due to the Y axis
direction (top to bottom) coordinate in gerbview/dcode.cpp
Fixes #16480
https://gitlab.com/kicad/code/kicad/-/issues/16480
2023-12-31 18:38:13 +01:00
Jon Evans 838674c4a7 Change regression test for #13162 to be less complex
We are really only testing that `Rload1` works,
and the original testcase is unstable on some platforms.


(cherry picked from commit 2ecf1ac23f)
2023-12-29 18:19:21 +00:00
Wayne Stambaugh 98a8781d70 Fix shadowed variable caused by cherry pick. 2023-12-29 11:52:08 -05:00
Jeff Young 85f4ab3944 Attempt to fix borked build.... 2023-12-29 16:41:59 +00:00
Jeff Young 25db3032ee Add missing DRC auto-complete token.
(cherry picked from commit 2ba9e07f0f)
2023-12-29 14:08:07 +00:00
Jeff Young d638f4cad0 Record nested footprints for collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410

(cherry picked from commit 6a5adc7646)
2023-12-29 14:07:27 +00:00
Jeff Young 32fe612045 Handle units switch in board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16361

(cherry picked from commit c051e66830)
2023-12-29 14:07:07 +00:00
Jeff Young 76d463dcc8 Honour alternates when getting SCH_PIN description.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16407

(cherry picked from commit af158715e5)
2023-12-29 14:05:44 +00:00
Jeff Young 2daa432261 Ignore reference and value when computing "allChecked".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16408

(cherry picked from commit 9910c670d2)
2023-12-29 14:04:30 +00:00
Jeff Young d7b2c81db5 Check added fields only if all fields were checked before.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16408

(cherry picked from commit 7e72a53876)
2023-12-29 14:04:15 +00:00
Jeff Young b597a4559f Update SCH_SHAPE::Plot() to handle all fill styles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16429

(cherry picked from commit 1ca82035ae)
2023-12-29 14:00:53 +00:00
Jon Evans 18e3227c9a Allow no-connects on standalone hierarchical pins/ports
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16397


(cherry picked from commit dad842d3f0)
2023-12-29 13:34:55 +00:00
Wayne Stambaugh 41b847b3c9 Prune orphaned schematic sheet instances.
Pasting from the clipboard when copying from another project can leave
sheet instance information that is not valid for the current project.
This change prunes all sheet instance information that is not relevant
to the current project.  It also prunes invalid paths created by pasting
sheets from different paths in the same project.

(cherry picked from commit 482aff3f0b)
2023-12-29 08:06:53 -05:00
Wayne Stambaugh ae2aea8fc0 Begin version 7.0.11 development. 2023-12-27 16:23:20 -05:00
Wayne Stambaugh 567c5bc8db Tag release version 7.0.10. 2023-12-27 16:21:44 -05:00
Seth Hillbrand 1fdf7d0cf4 Update translations 2023-12-19 08:35:23 -08:00
Nguyễn Ngọc Khánh 5ffe28eec2 Translated using Weblate (Vietnamese)
Currently translated at 18.2% (1464 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-19 17:33:17 +01:00
dsa-t 4e855b4cb0 Translated using Weblate (Russian)
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-12-19 17:33:17 +01:00
Nguyễn Ngọc Khánh ae886c824c Translated using Weblate (Vietnamese)
Currently translated at 17.2% (1381 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-19 17:33:17 +01:00
Henrik Kauhanen 46b5442214 Translated using Weblate (Swedish)
Currently translated at 99.9% (8018 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-19 17:33:17 +01:00
Nguyễn Ngọc Khánh c3deafd271 Translated using Weblate (Vietnamese)
Currently translated at 16.8% (1352 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-19 17:33:16 +01:00
Ulices de2da52941 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8021 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-12-19 17:33:16 +01:00
Ulices 8aa3d183ef Translated using Weblate (Spanish)
Currently translated at 99.0% (7950 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es/
2023-12-19 17:33:16 +01:00
Nguyễn Ngọc Khánh 6623b19b70 Translated using Weblate (Vietnamese)
Currently translated at 16.4% (1318 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-19 17:33:16 +01:00
Henrik Kauhanen 7a40b6e484 Translated using Weblate (Swedish)
Currently translated at 99.9% (8018 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-19 17:33:16 +01:00
dsa-t d63dc32e71 Translated using Weblate (Russian)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-12-19 17:33:16 +01:00
Wellington Terumi Uemura 54aa3bc5d4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8025 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-12-19 17:33:16 +01:00
ZbeeGin 6ebd616049 Translated using Weblate (Polish)
Currently translated at 99.9% (8024 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-12-19 17:33:16 +01:00
김랑기 c0439feef8 Translated using Weblate (Korean)
Currently translated at 99.9% (8023 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-12-19 17:33:16 +01:00
Tokita, Hiroshi 0e550322db Translated using Weblate (Japanese)
Currently translated at 99.9% (8022 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-12-19 17:33:16 +01:00
Toni Laiho 7398d47728 Translated using Weblate (Finnish)
Currently translated at 99.7% (8007 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-12-19 17:33:16 +01:00
aris-kimi 9f0f7e8641 Translated using Weblate (Greek)
Currently translated at 99.4% (7982 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2023-12-19 17:33:16 +01:00
Bas Wijnen f26e36440d Translated using Weblate (Dutch)
Currently translated at 84.0% (6743 of 8025 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-12-19 17:33:16 +01:00
Wayne Stambaugh 8ff0aca6b4 Tag stable version 7.0.10 release candidate 1. 2023-12-19 07:54:07 -05:00
Marco Ciampa d4b564ee7a Updated Italian translation 2023-12-19 01:12:44 +01:00
Huibean 22a6bf999f Add frame window monitor display index compare with saved dialog and centre it if display changed which caused dialog disapper
(cherry picked from commit 530b72972d)
2023-12-15 16:39:57 +00:00
Jeff Young 09bae9bb14 Fallback to normal undo when wire-drawing not in progress.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16216

(cherry picked from commit 035725cd5d)
2023-12-12 17:15:05 +00:00
Jeff Young 874f7fbdff Prevent copy-elision issues by using smart-pointer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16335

(cherry picked from commit e801e793dc)
2023-12-11 17:27:16 +00:00
Wayne Stambaugh 6d17d7d7a1 Fix crash when duplicating and editing a hierarchical label.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16264
2023-12-11 10:57:19 -05:00
Wayne Stambaugh 98dc21360a Fix crash on save after pasting symbols in schematic editor.
This was caused by pasting zero length instance paths which are not valid.

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

(cherry picked from commit 484491aaea)
2023-12-11 08:30:38 -05:00
jean-pierre charras 0d330051ed Pcbnew: draw shadow PCB_SHAPEs for locked items using continuous lines.
Using other shapes gives really strange and ugly results.
From master branch
Fixes #16327
https://gitlab.com/kicad/code/kicad/-/issues/16327
2023-12-10 15:51:14 +01:00
Jeff Young f17c4cceac Back-port bugfix from master.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16315
2023-12-09 14:54:24 +00:00
Jeff Young a3072ffade Revert e99a2fbc56.
The full fix will have to wait for 8.0:
0cf6679bfe
64c692a42e
72c985bc07
2f3c0a608d
2023-12-09 14:10:55 +00:00
Seth Hillbrand f60c544478 Update translations 2023-12-08 09:39:40 -08:00
김랑기 fc320e0ab4 Translated using Weblate (Korean)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-12-08 18:38:56 +01:00
김랑기 91c861e8d6 Translated using Weblate (Korean)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-12-08 18:38:56 +01:00
Zhen Sun 2640f4ad41 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8021 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-12-08 18:38:56 +01:00
Henrik Kauhanen 06f5828990 Translated using Weblate (Swedish)
Currently translated at 99.9% (8017 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:56 +01:00
Henrik Kauhanen 85604e1707 Translated using Weblate (Swedish)
Currently translated at 99.9% (8017 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:56 +01:00
Henrik Kauhanen ad7bc215d0 Translated using Weblate (Swedish)
Currently translated at 99.9% (8016 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:56 +01:00
JasonTan f005676c90 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8016 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-12-08 18:38:55 +01:00
Pinpang Liao 17961165cf Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8015 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-12-08 18:38:55 +01:00
欠陥電気 6ba2230804 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8015 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-12-08 18:38:55 +01:00
Erkan cacfaac52e Translated using Weblate (Turkish)
Currently translated at 61.4% (4929 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-12-08 18:38:55 +01:00
Henrik Kauhanen 4f09e18894 Translated using Weblate (Swedish)
Currently translated at 99.9% (8015 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:55 +01:00
___davidpr 05f1912d19 Translated using Weblate (Serbian)
Currently translated at 12.3% (993 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sr/
2023-12-08 18:38:55 +01:00
김랑기 e15306464f Translated using Weblate (Korean)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-12-08 18:38:55 +01:00
欠陥電気 28f75d5ad3 Translated using Weblate (Japanese)
Currently translated at 99.9% (8022 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-12-08 18:38:55 +01:00
Henrik Kauhanen 3021764401 Translated using Weblate (Finnish)
Currently translated at 99.7% (8006 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-12-08 18:38:55 +01:00
Mark Hämmerling 2766e90fe0 Translated using Weblate (German)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-12-08 18:38:55 +01:00
Ahmed Elswah 10d5baa862 Translated using Weblate (Arabic)
Currently translated at 1.3% (106 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ar/
2023-12-08 18:38:55 +01:00
Henrik Kauhanen 28a8997603 Translated using Weblate (Swedish)
Currently translated at 99.9% (8015 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:55 +01:00
Bas Wijnen 83d4771e6b Translated using Weblate (Dutch)
Currently translated at 83.9% (6736 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-12-08 18:38:55 +01:00
lê văn lập 0f4cd449b9 Translated using Weblate (Vietnamese)
Currently translated at 15.9% (1283 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-08 18:38:55 +01:00
Henrik Kauhanen 27843728d7 Translated using Weblate (Swedish)
Currently translated at 99.8% (8012 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-12-08 18:38:55 +01:00
김랑기 676ad491fe Translated using Weblate (Korean)
Currently translated at 99.6% (7996 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-12-08 18:38:54 +01:00
Mark Hämmerling 9a91537968 Translated using Weblate (German)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-12-08 18:38:54 +01:00
Phạm Minh Tấn 3eba0d9bab Translated using Weblate (Vietnamese)
Currently translated at 15.1% (1216 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-12-08 18:38:54 +01:00
aris-kimi b4995aa711 Translated using Weblate (Greek)
Currently translated at 99.4% (7981 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2023-12-08 18:38:54 +01:00
dsa-t 55353536e5 Translated using Weblate (Russian)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-12-08 18:38:54 +01:00
jean-pierre charras e3d45fb37b Fix compil issue (change PCB_REFERENCE_IMAGE_T to old name PCB_BITMAP_T) 2023-12-07 17:50:45 +01:00
Jeff Young e3369608fd Add missing case to Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283

(cherry picked from commit aa046345eb)
2023-12-07 14:04:43 +00:00
Alex Shvartzkop 1c6390f829 Don't crash when OCC fails to read a model and didn't open the doc.
(cherry picked from commit 9345b73af5)
2023-12-06 03:18:26 +03:00
Seth Hillbrand df64a6c583 Handle FP polygons in DRC check
Iterator points are relative to the footprint

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16266
2023-12-05 16:07:57 -08:00
Alex Shvartzkop 59c638c64c Fix drawing sheet border random thickness glitch.
(cherry picked from commit 26c8c718eb)
2023-12-05 19:43:31 +03:00
Alex Shvartzkop 9850541433 Gerber plotter: work around CAM350 circle bug.
Some fabs still have issues with circles in 4.6 mm format.

master commit: 9c2c291255
2023-12-05 19:43:31 +03:00
Alex Shvartzkop 5140fd7819 "kicad-cli pcb export drill": hook up --gerber-precision. 2023-12-04 21:59:26 +03:00
jean-pierre charras 5ae1b271e7 Fix crash: Under some circumstances the command "Export symbols to (new) library"
produces a crash when the library links are updated, and a power symbol is not found
in any loaded library.
Add also an option to export all symbols or all not pwer symbols
From master branch
Fixes #16229
https://gitlab.com/kicad/code/kicad/-/issues/
2023-12-04 18:28:06 +01:00
Jon Evans c5cdff6213 Fix crash launching editors with additional command line arguments 2023-12-04 12:22:26 -05:00
jean-pierre charras e05b3955a5 Gerber export: fix incorrect shape of round rect pads on paste layers in some cases.
They can be plotted as rect shape depending on margin value.
From master branch.
Fixes #16257
https://gitlab.com/kicad/code/kicad/-/issues/16257
2023-12-04 13:06:25 +01:00
Wayne Stambaugh e1c0bddff3 Make paste special dialog a bit more user friendly.
Set a default control so that the escape key closes the dialog.

Select the OK button after the user selects an annotation option.  This
allows for keyboard navigation of the dialog and saves an extra mouse
move and click to when choosing an annotation setting.

(cherry picked from commit ef2f72697b)
2023-12-03 13:45:51 -05:00
Wayne Stambaugh 62297e63a2 Fix crash when saving pasted root sheet symbols.
The paste code creates invalid KIID_PATH objects with a zero length.  All
paths must include the root KIID at a minimum.  Code was added to prune
the invalid paths and some defensive code was adding to the formatter to
prevent the crash in case there are other paths where someone generates
a zero length path.

Pruning orphaned instance data does not work when loading schematics prior
to version 7 because the paths did not include the root sheet UUID.  Once
the file is saved to V7 or later, the next load will prune any orphaned or
invalid instance data for the current project.

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

(cherry picked from commit 764df1d107)
2023-12-03 13:27:34 -05:00
Ian McInerney 54c325a631 Fix broken cherry-pick in 4cb9edd9f0 2023-12-03 18:04:40 +00:00
Jeff Young af99c9da34 Don't use epsilon when calculating pushout force in dp placer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16210

(cherry picked from commit ff9d834e31)
2023-12-03 17:24:45 +00:00
Jeff Young dbf5455656 Update message panel after switching layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16247

(cherry picked from commit a1b514bcba)
2023-12-03 17:10:30 +00:00
Ian McInerney 4cb9edd9f0 Warn when installing PCM local package that is incompatible
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14243

(Cherry-picked from b2cc4b8310)
2023-12-03 11:58:40 +00:00
Ian McInerney 60d23b14e7 Plot footprint edgecuts in PDF drill map file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15247

(Cherry-picked from e5f688e865)
2023-12-03 11:55:11 +00:00
Seth Hillbrand 12fdeac31c Re-implementation of 8b3ac316
Update GenCAD export to handle arbitrary outline

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15961
2023-12-02 17:15:39 -08:00
Jeff Young 69a1a4611b Fill empty zones when auto-fill is on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16234

(cherry picked from commit 1618beba2c)
2023-12-02 20:17:41 +00:00
Jeff Young a46501b279 Attempt to fix build. 2023-12-02 19:19:02 +00:00
Jeff Young bc1953dded Collapse drawing tools to a single re-entrancy guard.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16112

(cherry picked from commit c518041f9b)
2023-12-02 16:23:46 +00:00
Jeff Young 789a695737 Remove children from view_group when de-selecting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16139

(cherry picked from commit 4a25ef164d)
2023-12-02 16:21:50 +00:00
Jeff Young 5f8a0b0728 Import a few more rules from Altium board files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15585

(cherry picked from commit 6a2aeeeae2)
2023-12-02 16:20:34 +00:00
Wayne Stambaugh 9fdda223f5 Fix broken symbol reference designators on paste special.
It appears that in our zeal to prevent file changes when saving shared
schematics, we (I) clobbered saving relative symbol instance data paths
to the clipboard.  This has be restored along with setting the correct
symbol unit for relative clipboard paths.

Fixed a serious issue with KIID_PATH::MakeRelativeTo() where the original
path was not restored when the incremental KIID object test fails.  This
also included a minor optimization using the actual KIID object for
comparison instead of converting it to a string and then comparing the
string.

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

(cherry picked from commit 6dc25f4775)
2023-12-01 15:30:51 -05:00
Seth Hillbrand 1ff4b2b4eb Upgrade Clipper2 to 1.3.0
Fixes a number of minor inflation issues including slivers when
overlapping points are inflated

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

(cherry picked from commit daf178b64f)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16241
2023-12-01 12:10:28 -08:00
Jon Evans 0751a3ae7f Prevent some issues with recursion on repeat-last-item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16168

(cherry picked from commit 90a61b8d36)
2023-12-01 13:02:50 -05:00
Marek Roszko e6e08c111b Set PYTHONPATH internally for macOS run from build dir 2023-12-01 12:32:59 -05:00
Marek Roszko 004b96ec21 Make wxPython work under run from build directory on macOS 2023-12-01 12:32:52 -05:00
Seth Hillbrand 7cb98f6856 Check for actual dirty flag
Looking at the address will always return true
2023-12-01 09:31:48 -08:00
Seth Hillbrand fc86de34f8 Add default parameter to GetEffectivePolygon()
Allows legacy plugins to use this function

(cherry picked from commit 6b3ac54a41)
2023-12-01 09:28:13 -08:00
Jon Evans fe69da4cb8 Handle non-IOE exceptions in symbol loader
(cherry picked from commit 35edd84269)
2023-11-30 22:26:14 +00:00
Jon Evans 27434e38f9 Database: handle more possible datatype exceptions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16090


(cherry picked from commit 44374c661f)
2023-11-30 22:26:02 +00:00
Jon Evans 60ddafa4ff Guard against UNDEFINED_LAYER in GetLayerSet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16230


(cherry picked from commit 1ff3b5a437)
2023-11-30 22:09:11 +00:00
Seth Hillbrand ef8b6bf9e1 Fix invalid string compare in IBIS parser
strcmp returns 0 if strings are the same but compareIbisWord returns
True (1).

Adds an IBIS simulation QA test case to catch this in the future

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16223
2023-11-30 09:15:01 -08:00
Wayne Stambaugh 59cc7b2d3e Fix unconnected schematic net highlighting issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16218

(cherry picked from commit 23175c163f)
2023-11-30 11:41:56 -05:00
Alex Shvartzkop 6245bbff50 IBIS: add stub for Model Spec; support empty strings in line with keywords.
(cherry picked from commit 08e6e0258f)
2023-11-29 22:24:45 +03:00
jean-pierre charras 6331a0ab7a Pcbnew, Excellon export: remove an useless line at end of file
From master branch
2023-11-27 17:30:35 +01:00
jean-pierre charras c43ae314e0 Fix old python examples and a compatibility issue in pcb_shape.i.
Fix simlar to master branch
Fixes #16158
https://gitlab.com/kicad/code/kicad/-/issues/16158
2023-11-26 13:46:33 +01:00
Wayne Stambaugh 250720ca4a Fix broken schematic net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16131

(cherry picked from commit 70dad45996)
2023-11-23 18:04:50 -05:00
Alex Shvartzkop a5ac1fc34f 3D OCE plugin: make two-sided faces for non-solid shapes (shells).
Fixes single-face shells display in the 3D viewer.

(cherry picked from commit e9c5b4755b)
2023-11-22 18:57:11 +03:00
jean-pierre charras 1740aeca5e "Kicad PROJECT_ARCHIVER: do not store twice files with extension .gm?"
Better fix than commit 8255e091f0.
It also fixes duplicates for ext like *.g1
From master branch.
2023-11-21 15:51:19 +01:00
Alex Shvartzkop 4f060d9384 STEP export: make use of footprint names instead of "SOLID".
Should help when importing into software that does deduplication
based on label names (e.g. SolidWorks).

(cherry picked from commit 58b9d68084)
2023-11-21 14:12:09 +03:00
Alex Shvartzkop acd244f873 STEP export: Do not set BRepBuilderAPI precision.
This caused issues when loading some STEP models.

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

(cherry picked from commit f3fdfa73e6)
2023-11-21 09:20:37 +03:00
jean-pierre charras dfef20658c 3D viewer: fix incorrect display of PCB_TEXTBOX in some cases
From master branch.
2023-11-19 20:37:34 +01:00
jean-pierre charras 8255e091f0 Kicad PROJECT_ARCHIVER: do not store twice files with extension .gm?
Files with extension .g?? and .gm? were stored in zip archive. but
*.gm? files also matches .g?? files so they were stored twice.
2023-11-19 19:58:20 +01:00
jean-pierre charras 96037591c5 fix FOOTPRINT::GetLikelyAttribute() to follow the comments of FOOTPRINT::CheckFootprintAttributes(): at least one through hole pad means most probably a footprint through hole attribute. 2023-11-19 19:57:32 +01:00
jean-pierre charras 692949fd0a Gerbview: fix some issues related to comments and primitives in macros:
- comments on more than one line were not fully skipped, creating read errors
- in macros, some primitives (not all) were incorrectly rotated: they must be
rotated around the aperture macro origin, not the primitive origin.
- a new test file with rotated primitives in macros is added.
From master branch
Fixes #16049
https://gitlab.com/kicad/code/kicad/-/issues/16049
2023-11-19 19:57:32 +01:00
Wayne Stambaugh 4bf75de6fd Don't copy hidden files and folders when creating project from template.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16093

(cherry picked from commit a309e24132)
2023-11-19 11:05:53 -05:00
Wayne Stambaugh 05890480e2 Fix crash when creating an array of footprint fields in board editor.
Attempting to create an array of footprint child objects other than a pad
causes the crash due to the fact that only pads where checked.  The change
now checks if any object has a footprint as a parent.  This should prevent
any future issues when new footprint child objects are added.

There was also another subtle bug fixed when more than one child object of
a footprint were selected, the array feature would make as many copies of
the footprint as selected child items.

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

(cherry picked from commit 9e1caa0d39)
2023-11-18 11:37:38 -05:00
Wayne Stambaugh 70d7bc2099 Add missing merge conflict fixes from cherry picking 402c139957. 2023-11-18 11:29:13 -05:00
Alex Shvartzkop e2d8d53a10 Fix bad outline font glyphs when ligatures apply.
(cherry picked from commit b108e7058b)
2023-11-18 08:19:48 +03:00
Wayne Stambaugh 402c139957 Change the bus selection behavior of the schematic net highlight tool.
[CHANGED] Bus highlight tool now supports toggling between highlighting
          only the bus objects and highlighting the bus and all of the
          bus member objects.

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

(cherry picked from commit f6c99816b2)
2023-11-17 07:56:38 -05:00
Alex Shvartzkop 31e79ef54f PDF plot: match mirror state between hidden and plotted text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16066
2023-11-12 00:48:18 +03:00
Mark Roszko 39788e7e6c Bump kicad-vcpkg repo for wx 3.2.4 2023-11-10 03:45:21 +00:00
jean-pierre charras 932c908075 3D viewer: Simplify polygons before triangulation.
It reduce the risk to create bad triangulation.
Fixes #15706
https://gitlab.com/kicad/code/kicad/-/issues/15706

(cherry picked from commit b1ed0529d7)
2023-11-10 00:30:31 +03:00
Alex Shvartzkop 443da9943a SVG plotter: fix hidden text orientation when plot is mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15422

(cherry picked from commit 556120554e)
2023-11-10 00:27:39 +03:00
Alex Shvartzkop cc1071fe7a Fix a crash in 3D viewer when changing preferences.
It was possible for OnMouseMove to come after ReloadRequest
but before DoRePaint.

Which meant m_3d_render_raytracing->Reload() has't been called yet,
thus the BVH contained invalid data.

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

(cherry picked from commit 5cd1a4674f)
2023-11-10 00:25:40 +03:00
Alex Shvartzkop 3ac4fd59c5 Use v6 code to read arcs from legacy symbol libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16048

(cherry picked from commit c048635484)
2023-11-07 23:20:56 +03:00
Alex Shvartzkop 5e93814283 Restore clearance cache usage in PNS::NODE::NearestObstacle.
This (and the other commit) restores router performance to pre-7.0.3 levels.
2023-11-07 23:15:23 +03:00
Seneral d29c07a663 Added a temporary item cache to improve router performance
Some items only used within algorithms were never cached
Because they are hard to manually clean up
But caching them does help the algorithms a lot
So this solution is the best I can think of
2023-11-07 23:15:23 +03:00
Simon Richter a558a67fbd Make output conditional 2023-11-07 13:31:54 +00:00
Mark Roszko 153e1190ea Fix build due to previous cli change 2023-11-07 11:20:18 +00:00
Marek Roszko a80a641427 Ensure output directory exists for drill files cli export
(cherry picked from commit 23676eb988)
2023-11-07 02:12:12 +00:00
Jeff Young acd7d5ad2f Don't clamp arc centers quite so aggressively.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16029

(cherry picked from commit 24ca7add42)
2023-11-06 17:00:37 +00:00
Jeff Young 81ba4fa9a6 Make sure to add enough wiggle room when MaxError is very large.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16024

(cherry picked from commit 1df5d9c48c)
2023-11-06 17:00:37 +00:00
Jeff Young 57f007c46e Don't get stuck cycling through invisible layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16019

(cherry picked from commit ac172b944a)
2023-11-06 17:00:37 +00:00
Jeff Young d513640572 Behave (or assert) when source or target are null or dirty.
(cherry picked from commit 7f8e397dfb)
2023-11-06 17:00:37 +00:00
Jeff Young 8c695e5044 Clean up references in RN_NETs when garbage collecting CN_ITEMs.
(cherry picked from commit fb59f83683)
2023-11-06 17:00:37 +00:00
Jeff Young 395a966802 When garbage collecting locally we also need to clear global references.
(cherry picked from commit d93bb464bf)
2023-11-06 17:00:37 +00:00
Jeff Young 643894c882 Assign textBox to correct unit & conversion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15994

(cherry picked from commit 972308b24b)
2023-11-06 17:00:37 +00:00
Jeff Young c7c28c0471 When presented with empty text we don't want to Normalize() the SIM_VALUE.
But we *do* need to update NUMERICAL_EVALUATOR::m_originalText by
calling NUMERICAL_EVALUATOR::Process().

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

(cherry picked from commit 6b29c346b9)
2023-11-06 17:00:37 +00:00
Mark Roszko 20ada81d43 Add the BTI C hint to libcontext arm64
(cherry picked from commit 2b3ad808ea)
2023-11-06 11:30:52 +00:00
jean-pierre charras 07736e59bd Eeschema, plot schematic: fix incorrect rotation of symbol text in textboxes.
Happened with rotated symbols.
From master branch
Fixes #16027
https://gitlab.com/kicad/code/kicad/-/issues/16027
2023-11-05 16:31:38 +01:00
jean-pierre charras 3195ba646f Pcbnew: fix Swap command that improperly rotates footprints when flipping.
Fixes #16025
https://gitlab.com/kicad/code/kicad/-/issues/16025
2023-11-05 16:31:37 +01:00
jean-pierre charras 2deee01592 Eeschema, print schematic: resolve text variables in symbol graphic text.
Variables in graphic text (body item) were resolved in plot, but not in print function.
Fixes #16026
https://gitlab.com/kicad/code/kicad/-/issues/16026
2023-11-05 16:31:37 +01:00
jean-pierre charras 890b09499e legacy library import: fix compatibility with some old symbol libraries (*.lib files). 2023-11-05 16:31:36 +01:00
Jon Evans 01c5fab84b Enforce symbol name not being empty
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15859


(cherry picked from commit e14e7e0bd9)
2023-11-05 15:10:44 +00:00
Jon Evans e9b7737692 Escape net names coming from aliases
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15212


(cherry picked from commit 24e613f60c)
2023-11-05 15:10:17 +00:00
Wayne Stambaugh fe1072a06b Begin version 7.0.10 development. 2023-11-05 08:23:09 -05:00
Wayne Stambaugh 59f308850e Tag release version 7.0.9. 2023-11-05 08:16:47 -05:00
jean-pierre charras e775a7581a pcb_calculator, MICROSTRIP::calcSynthesize(): fix incorrect init of a variable
It was initialized before other calculations, thus using a bad value.
From master branch
2023-11-01 17:31:16 +01:00
Wayne Stambaugh ec99e10b31 Tag stable version 7.0.9 release candidate 2. 2023-10-31 16:27:24 -04:00
Seth Hillbrand 240d7921ba Allow multiple strong drivers with same name
Multiple labels with the same name are allowed (and expected) so ensure
that we use a structure that allows duplicate names

(cherry picked from commit de0736863b)
2023-10-31 11:53:56 -07:00
Seth Hillbrand 9ac006b114 Don't use KiROUND when we should trunc
When calculating the viewport extents, we only need the maximum size
that can be represented.  Anything larger should be truncated.  We do
this in many other places (wx_view_controls, ruler_item,
ds_proxy_view_item, etc) and this brings pcb_selection_tool into
alignment with this, avoiding an unneeded warning message

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

(cherry picked from commit 6d957e9d65)
2023-10-30 09:43:45 -07:00
Seth Hillbrand c3fef1cae2 Update translations 2023-10-30 09:43:40 -07:00
Wellington Terumi Uemura ca1c99a0d1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-10-30 17:42:13 +01:00
Mert Gülsoy 06ae7a20df Translated using Weblate (Turkish)
Currently translated at 61.4% (4929 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-10-30 17:42:13 +01:00
Wellington Terumi Uemura f536ecdc00 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-10-30 17:42:13 +01:00
ZbeeGin a4bdd38367 Translated using Weblate (Polish)
Currently translated at 100.0% (8023 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-10-30 17:42:13 +01:00
Arend-Jan van Hilten 6fb6d3e444 Translated using Weblate (Dutch)
Currently translated at 83.9% (6736 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-10-30 17:42:13 +01:00
Toni Laiho a3952c37bf Translated using Weblate (Finnish)
Currently translated at 99.7% (8006 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-10-30 17:42:13 +01:00
dsa-t c24ee72fe3 Translated using Weblate (Russian)
Currently translated at 99.9% (8022 of 8023 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-10-30 17:42:13 +01:00
Wayne Stambaugh f988b807c4 Don't show integer overflow errors in release builds.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15529

(cherry picked from commit bfd3e71a88)
2023-10-30 10:09:35 -04:00
Alex Shvartzkop cb1a596b10 kicad manager: make extension change warning for Rename case-insensitive. 2023-10-29 22:01:50 +03:00
jean-pierre charras c41cd75b62 kicad manager: fix broken Rename file command.
From master branch.
2023-10-29 18:38:32 +01:00
Ian McInerney 0df48f3002 PCM: Fix use of variable after it was moved into the cache
(cherry picked from commit c52fb23d4f)
2023-10-29 13:40:08 +00:00
Jeff Young 2d58184080 We don't want to do collision testing against virtual vias.
(Which means they had better not have a hole.)

(cherry picked from commit f1efae1e05)
2023-10-25 18:51:14 +01:00
Jeff Young 1ef6e69d83 Don't run DRC checks against reference images.
fixes https://gitlab.com/kicad/code/kicad/-/issues/15932
2023-10-25 18:51:14 +01:00
jean-pierre charras dbd4af16c6 Gerber place files: do not quote strings (fields, pad name, pad function ...)
Double quotes have no special meaning, so adding them modify the texts
Fixes #15944
https://gitlab.com/kicad/code/kicad/-/issues/15944
2023-10-25 09:13:59 +02:00
Alex Shvartzkop 2263535d3a Add Python API compatibility for GetEffectiveTextShape. 2023-10-25 00:03:28 +03:00
Seth Hillbrand 3ce4a5bf7f Fix missing random sim command 2023-10-24 13:57:44 -07:00
Alex Shvartzkop f62c3431ff Semi-fix schematic text properties dialog on wx 3.2.3.
Based on https://gitlab.com/kicad/code/kicad/-/commit/d9b5257b9e90c53d1cba39499c76ea917344128f
2023-10-24 23:30:31 +03:00
Seth Hillbrand a652084922 Update translations 2023-10-24 12:11:15 -07:00
김랑기 ed30599db8 Translated using Weblate (Korean)
Currently translated at 99.6% (7993 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-10-24 21:09:50 +02:00
ZbeeGin d8752970e9 Translated using Weblate (Polish)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-10-24 21:09:50 +02:00
rtyuionoop 57a4c93cf5 Translated using Weblate (Vietnamese)
Currently translated at 14.8% (1189 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-10-24 21:09:50 +02:00
Tokita, Hiroshi a116f5783d Translated using Weblate (Japanese)
Currently translated at 99.9% (8021 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-10-24 21:09:50 +02:00
Jan Straka 2730098c42 Translated using Weblate (Czech)
Currently translated at 91.7% (7364 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-10-24 21:09:49 +02:00
Luc 836d17359f Translated using Weblate (German)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-10-24 21:09:49 +02:00
Marine Biologist a4406bb137 Translated using Weblate (Turkish)
Currently translated at 61.4% (4928 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-10-24 21:09:49 +02:00
Wellington Terumi Uemura bbb67b415a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-10-24 21:09:49 +02:00
dsa-t 0842360dbb Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-10-24 21:09:49 +02:00
Tokita, Hiroshi e58b23a54b Translated using Weblate (Japanese)
Currently translated at 99.9% (8021 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-10-24 21:09:49 +02:00
ZbeeGin 72342bd8a5 Translated using Weblate (Polish)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-10-24 21:09:49 +02:00
Wellington Terumi Uemura fa77fc3310 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-10-24 21:09:49 +02:00
Alex Shvartzkop 53fe2a7203 Set UNPACK_ALIGNMENT properly for RGB bitmaps.
(cherry picked from commit 00904e8e23)
2023-10-24 06:59:53 +03:00
Alex Shvartzkop 480dfafb4f Fix variable shadowing.
(cherry picked from commit 0e4553b1fa)
2023-10-24 04:26:02 +03:00
Alex Shvartzkop f5e13c5ceb Fix up ccc29e9776 for masked images.
(cherry picked from commit 977912dcd5)
2023-10-24 04:00:30 +03:00
Alex Shvartzkop eadc902f84 Don't draw PCB bitmaps on layers not visible in high-contrast mode.
(cherry picked from commit e6cf5e5e01)
2023-10-24 03:42:54 +03:00
Alex Shvartzkop b461a3b64d OpenGL: Improve logic when bitmap cache memory is exhausted.
Don't remove the front entry, as it will likely be needed for the next bitmap.
Instead, implement neuristics based on access times.

(cherry picked from commit 71d0c7f6af)
2023-10-24 03:42:45 +03:00
Alex Shvartzkop 75c758e5f4 Improve bitmap caching performance.
(cherry picked from commit ccc29e9776)
2023-10-24 03:42:24 +03:00
Jeff Young 05912b0381 Check vias before holes as we assume any hole is non-pushable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15840

(cherry picked from commit fb84f4592b)
2023-10-23 23:53:55 +01:00
Seth Hillbrand fb387a2c09 Don't leave deleted items in group
We filter out ref/value text in copies so we need to remove them from
the copied group (if any) as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15930
2023-10-23 13:34:15 -07:00
Seth Hillbrand 1380feef72 Compare bus local names
When running ERC, we want to check if bus members exist in the bus and
this should be done using m_local_name (i.e. the name it take from the
parent bus) not the resolved name as this will change depending on
connections
2023-10-23 12:54:31 -07:00
Seth Hillbrand 6c91a3022e Fix stdlib assertion
The assertion checks if an element has been added to vector.  Since we
are merely manipulating the allocated data, the number of elements does
not change and the assertion check fails.  Using the pointer to the
allocated data is a cleaner/clearer way of accomplishing this
2023-10-23 12:54:31 -07:00
Alex Shvartzkop e55989120e NanoSVG: parse 'class' attribute before 'style'.
(cherry picked from commit 64a64f5216)
2023-10-23 21:30:16 +03:00
Alex Shvartzkop 14f12ccf51 Add ngspice lib paths for when running from build dir.
(cherry picked from commit 71fb1afe4c)
2023-10-23 21:29:11 +03:00
jean-pierre charras 82a1b02b4a Plotters (especially DXF) add more precision when plotting arcs (and others)
- in DXF coordinates were using 6 digits for coordinate mantissa:
this is not enough for coord in inches. Now use 16 digits
- Arc( VECTOR2I& aCentre, EDA_ANGLE& aStartAngle, EDA_ANGLE& aEndAngle, ...)
was using integers for coord.
This creates significant errors for start point and end points of the arc.
Now the center is given in double, and its position is calculated from angle end points
(and radius) to do not generate a position error for these end points
(previously the error could be 20 ... 50 nm)
From master branch
Fixes #15056 https://gitlab.com/kicad/code/kicad/-/issues/15056
2023-10-23 17:59:31 +02:00
Jeff Young e99a2fbc56 Score initializing is done by LIB_TREE_NODE::ResetScore().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15875

(cherry picked from commit bc0fe74f72)
2023-10-23 13:28:14 +01:00
Alex Shvartzkop d3d23d18fb Fix footprints being difficult to select in high-contrast modes.
(regression)

(cherry picked from commit 97901c9ac5)
2023-10-23 06:10:23 +03:00
Alex Shvartzkop cbf1b2af47 HPGL plotting: fix random lines connecting to circles.
(cherry picked from commit 45791ff8d6)
2023-10-22 13:56:21 +03:00
Alex Shvartzkop 4f5fca4e67 HPGL plotting: write rects as polygons to prevent always filling.
(cherry picked from commit d9c123b1ec)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop e0158a8ed7 DXF plotting: write zero-sized rects and circles as points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 3e82e59c24)
2023-10-22 13:55:54 +03:00
Alex Shvartzkop 40e7ba67d1 PDF plotting: fix zero-sized or too thick rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15862

(cherry picked from commit 843bd4f79c)
2023-10-22 13:22:42 +03:00
Wayne Stambaugh e664605c90 Fix false positive DRC footprint parity test.
This fix removed the Euclidean normalization test and replaced it with an
arc center X and Y coordinate differential check.  The error epsilon was
increased to 200nm due to the arc center position calculation code using
the near 100nm position.

https://gitlab.com/kicad/code/kicad/-/issues/15917
2023-10-21 12:37:17 -04:00
Jeff Young 5a51a6b179 Make offset-zone check multi-layer aware.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15916

(cherry picked from commit b97d8ddef4)
2023-10-21 15:09:37 +01:00
Jeff Young eb7929ccb6 Fix layer handling for create similar zone.
(cherry picked from commit f18ce8c6de)
2023-10-20 22:22:27 +01:00
Jeff Young e85eec2e6b Don't leave deleted items in a group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15797

(cherry picked from commit 14d5a404b2)
2023-10-19 17:52:00 +01:00
Alex Shvartzkop 121394c0c0 vcpkg: Lock glm at 0.9.9.8#2
Version 2023-06-08 changed the default order of quaternion
values from xyzw to wxyz, which we don't support.

Fixes animations in the 3D viewer.

(cherry picked from commit a52ee04fc7)
2023-10-16 14:55:57 +03:00
jean-pierre charras 5ad74d58f8 pcb_calculator/transline/stripline: add missing conv from log to db.
From master branch
Fixes #15873
https://gitlab.com/kicad/code/kicad/-/issues/15873
2023-10-16 10:35:22 +02:00
Ian McInerney afe2516d57 Fix casing for gerber wildcards
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15877

(Cherry-picked from 55caa9c1e8)
2023-10-15 19:54:05 +01:00
Jeff Young ccf6e78cd5 It is legal to have nullptr zones in the m_CopperZoneRTreeCache.
(Though we might want to re-think this strategy....)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15853
2023-10-14 22:35:06 +01:00
Jeff Young fef91fc8b9 Fix merge breakage. 2023-10-14 15:33:00 +01:00
Jeff Young 4156587abe Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

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

(cherry picked from commit 62d959ed0e)
2023-10-14 15:33:00 +01:00
Jon Evans 629eccaf09 PNS: Allow for approximation error in hull clearance
Also revert to using exact hulls for non-compound shapes

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

(cherry picked from commit 96f9f2c658)
2023-10-14 15:33:00 +01:00
Jeff Young f89803eb64 Don't turn an empty string into a '0'.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15871

(cherry picked from commit 0b06a1376b)
2023-10-14 15:33:00 +01:00
Jeff Young da12746a3a Clear selection before deleting board layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15866

(cherry picked from commit 8d3047d6eb)
2023-10-14 15:33:00 +01:00
Jeff Young b023019b0d Include solder mask in STEP export stackup height.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15632

(cherry picked from commit b4986030da)
2023-10-14 15:33:00 +01:00
Jeff Young 1fdaa1083e Honour custom layer names for Layer_Top and Layer_Bottom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15835

(cherry picked from commit da5f5536c8)
2023-10-14 15:33:00 +01:00
Jeff Young 2f8e846b9e Adjust colours in appropriate direction depending on background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15841

(cherry picked from commit 3f0067cbaa)
2023-10-14 15:33:00 +01:00
Alex Shvartzkop e42db52d14 Fix a crash when using length tuning tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15874

(cherry picked from commit 61bdee027b)
2023-10-14 16:54:16 +03:00
Alex Shvartzkop d4ec455ce0 Fix loading thru-hole pads when drill token is missing.
(cherry picked from commit f7ed9cc5c7)
2023-10-14 15:52:57 +03:00
Alex Shvartzkop 0547c7ba91 Fix loading legacy (until 2009) schematic files.
(cherry picked from commit b87496b834)
2023-10-14 15:45:20 +03:00
Alex Shvartzkop 8f4b809599 Fix the insufficient privileges message in symbol remap dialog.
(cherry picked from commit 7b94ecdc01)
2023-10-14 15:44:52 +03:00
jean-pierre charras 8432fb4fea Pcbnew: when adding layers, do not change via layers.
Via layers are not defined by a LSET, and the code that used the new LSET
broke the Via start and/or end layers (for blind/buried vias)
From master branch
Fixes #15856
https://gitlab.com/kicad/code/kicad/-/issues/15856
2023-10-14 08:56:19 +02:00
Marek Roszko 84df2c86ae Fix ambiguous cast 2023-10-13 19:26:16 -04:00
Mark Roszko 49ced23ba8 Reduce the boost dependencies in vcpkg 2023-10-13 17:03:57 +00:00
jean-pierre charras 00bf2ca36f Pcbnew: rename ZONE* m_SolderMask to m_SolderMaskBridges
(It is a container to build bridges on solder mask layers by DRC, not real zone)
Disable also this special zone selection by adding it in
PCB_SELECTION_TOOL::itemPassesFilter
Do not display the outlines of this very special zone used by DRC
to show layer mask bridges created by DRC to show these bridges.
From Master branch
Fixes #15847
https://gitlab.com/kicad/code/kicad/-/issues/15847
2023-10-13 17:15:37 +02:00
Marek Roszko b92861c7e3 Bump the wxpython in vcpkg to fix build 2023-10-13 07:51:27 -04:00
Mark Roszko a189102628 Move vcpkg forwards for curl and wx 2023-10-12 23:22:28 +00:00
jean-pierre charras 58a6eb653b protect protect RC_ITEM::SetItems() against null pointer.
Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
2023-10-12 14:56:56 +02:00
Alex Shvartzkop 9159f5a004 Restore fill polygons on proper layers when flipping zones.
(cherry picked from commit 0ea85ec9f5)
2023-10-12 02:45:05 +03:00
jean-pierre charras f1c570d793 OPENGL_GAL: ensure 0 sized rect with thickness is shown (already shown by Cairo)
From master branch
Fixes #15850
https://gitlab.com/kicad/code/kicad/-/issues/15850
2023-10-11 20:08:15 +02:00
Marek Roszko 832af39f34 Unbind ACTION_MENU events in destructor
(cherry picked from commit d801037c93)
2023-10-11 00:17:03 +00:00
Seth Hillbrand 9260f58803 Fix memory leak in connection graph
When generating virtual connections to represent bus aliases, we need to
store the pointers for future deletion otherwise we will leak the memory
2023-10-06 09:14:07 -07:00
Seth Hillbrand 1a5c515e45 Improve pin-pin iteration in ERC checks
Rather than generating expensive classes to store in a set to check for
duplicate checks, we avoid double-checking elements in the vector.  For
large schematics this results in a substantial speed increase
2023-10-06 09:14:07 -07:00
jean-pierre charras 87c8688f70 genDrillMapFile: reduce the pen width used to plot oval shapes (better look)
From master branch
2023-10-06 09:33:57 +02:00
Alex Shvartzkop d13179f9e4 EAGLE PCB: fix a regression causing polygons not being imported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15829

(cherry picked from commit bf29b25190)
2023-10-06 01:16:43 +03:00
Seth Hillbrand 75de21314c Protect against subgraph loops
Optimize the subgraph processing to avoid repeated loops when multiple
items belong to the same subgraph.
2023-10-05 08:39:56 -07:00
Jeff Young 239f8e0905 Pull fixes back from master.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15813
2023-10-04 19:25:28 +01:00
Jeff Young f4ac624bb3 Make sure sorts are deterministic. 2023-10-04 18:52:39 +01:00
Jeff Young 2be0b98135 Make sure sort is deterministic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15336

(cherry picked from commit 0d51729537)
2023-10-04 18:51:59 +01:00
Jeff Young 36c5719535 Fix logic screw-up in earlier commit.
(cherry picked from commit f2c0f4c87f)
2023-10-04 18:51:37 +01:00
Jeff Young 1f870bf76c Handle justification when hit-testing fields.
This steals the algo used in SCH_PAINTER to get the right coords
for the text.

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

(cherry picked from commit 6fbbf981f0)
2023-10-04 18:51:33 +01:00
Jeff Young d5cc334e20 Clear render caches before plotting.
Also fixes a bug where text variables in LIB_TEXT weren't getting
expanded when plotting.

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

(cherry picked from commit 003acbd686)
2023-10-04 18:49:56 +01:00
Jeff Young fd98188ee4 Use netclass values when reaching netclass entry.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15774

(cherry picked from commit 904bdc3c66)
2023-10-04 18:49:03 +01:00
Jeff Young c3446f9c2d Handle flipped state when checkging item against viewport.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15768

(cherry picked from commit 3c1478367f)
2023-10-04 18:48:42 +01:00
Marek Roszko e6e29b6c4c Unbind events in DIALOG_PCM destructor
Maybe fixes KICAD-KR


(cherry picked from commit b00871ad77)
2023-10-02 00:20:46 +00:00
Marek Roszko 6096b5c4d8 Unbind event handlers in the DIALOG_SHIM destructor to prevent late event crashes
Fixes KICAD-1XF


(cherry picked from commit 3a567a3ae1)
2023-10-01 21:55:36 +00:00
jean-pierre charras 838eadd47f Eeschema: fix a crash when loading a schematic if a symbol in a sheet has
a lib_name containing {slash} instead of /
(related to commits #2f51d22b and b2bf28f5)
From master branch.
Fixes #15791
https://gitlab.com/kicad/code/kicad/-/issues/15791
2023-10-01 10:08:33 +02:00
jean-pierre charras afb43531e8 Eeschema: fix a crash when loading a schematic if a symbol in a sheet has
a lib_id containing {slash} instead of /
(related to commit #2f51d22b)
Fixes #15791
https://gitlab.com/kicad/code/kicad/-/issues/15791
2023-09-30 18:25:18 +02:00
Jon Evans 3533e8b119 DbLib: support columns with numeric data
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15662

(cherry picked from commit 6f9af10912)
2023-09-30 10:27:34 -04:00
Jeff Young 0e6ad13db8 Fix missing part of cherry-pick. 2023-09-30 14:12:54 +01:00
Jeff Young 0d725fcc2c Fix errors in calculating tuning length.
Fix mismatched parameter passing in TOPOLOGY::followTrivialPath()
and TOPOLOGY::AssembleTrivialPath().
Fix logic error in PNS::JOINT::IsLineCorner().
Handle VVIAs in PNS::JOINT::IsNonFanoutVia().

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

(cherry picked from commit be532e96d6)
2023-09-30 13:37:00 +01:00
Jeff Young 7e747085d3 Handle read-only libraries when saving symbol from canvas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15519

(cherry picked from commit 1fd3f4e375)
2023-09-30 13:36:13 +01:00
Jeff Young f1376396c2 Use original event position if it's available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15623

(cherry picked from commit e962615407)
2023-09-30 13:35:48 +01:00
Jeff Young 4eb9281f4d Tidy up shutdown of APPEARANCE_CONTROLS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15024

(cherry picked from commit c2c71facb1)
2023-09-30 13:35:22 +01:00
Jeff Young c895816cb0 Fix arg parsing in ExecuteFile.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15326

(cherry picked from commit 0f94b467ba)
2023-09-30 13:34:26 +01:00
Jeff Young 9f814c0f6a Repair standalone application 3D plugin path resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15322

(cherry picked from commit 04214983cf)
2023-09-30 13:34:09 +01:00
Jeff Young e14aef9bd5 Correct path of pcb drawing sheet file on saveAs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15551

(cherry picked from commit 722a90213c)
2023-09-30 13:31:16 +01:00
Jeff Young 2b106a2b34 Handle flipped horiz/vert justifications in FIELDS_GRID_TABLE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15677

(cherry picked from commit 6f62565093)
2023-09-30 13:27:28 +01:00
Jeff Young f6494d2980 Implement printing and plotting for directive-specific label shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15650

(cherry picked from commit 394ab8ccb1)
2023-09-30 13:26:59 +01:00
Jeff Young 78a6c1a909 Smarten the UpdateAllItemsConditionally() tests in SetActiveLayer().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15329

(cherry picked from commit 5842e9c57e)
2023-09-30 13:26:18 +01:00
Jeff Young c858643100 Collect comment lines into following spice unit.
This can't distinguish a header block comment in front of a file
with multiple spice units, and so will include that into the first
unit only.

Also fixes the pin assignments reference textbox to use a
fixed-width font as many .subckt's contain ASCII graphics for
pin definitions (not that it helps any with the test case from
the given bug).

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

(cherry picked from commit ede542f911)
2023-09-30 13:25:44 +01:00
Jeff Young 17b0bdc9fe Check value-follows-name case in symbol Save As.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15647

(cherry picked from commit 849a4656c8)
2023-09-30 13:24:32 +01:00
Jeff Young 2e0cdebb0c Do full high-contrast update of vias & pads if netnames are shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15657

(cherry picked from commit c7f69503c0)
2023-09-30 13:22:17 +01:00
Jeff Young a5f8955d78 Don't import Altium objects to disabled layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15586

(cherry picked from commit 962f79334f)
2023-09-30 13:21:16 +01:00
Jeff Young 0eca698a39 Update symbol editor's title bar when renaming the canvas symbol.
(cherry picked from commit 7d1dbb77c3)
2023-09-30 13:19:40 +01:00
Jeff Young 16f259da81 Only update value on rename if it previously matched the symbol name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15621

(cherry picked from commit ee724f6a2b)
2023-09-30 13:18:53 +01:00
Jeff Young c3ee477a1b Apply DC voltage source exception to current sources.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15626

(cherry picked from commit 4a59f0de43)
2023-09-30 13:18:17 +01:00
Jeff Young 33da35db04 Fix typo in arguments list to EvalRules().
Also fixes a bug where we weren't clearing the previous tabs from
the notebook.

(cherry picked from commit 31e30a5f56)
2023-09-30 13:16:39 +01:00
John Beard 533be1ec70 Port EDA_SHAPE arc tests to FP_SHAPE
These tests apply only to v7, since FP_SHAPE is removed
in master. But this checks that arcs in footprints get the
same winding treatment as EDA_SHAPE arcs (using the 0-suffix
functions).
2023-09-30 12:11:50 +00:00
John Beard b64573f5d4 Add regression test for arc winding
While the bug has been fixes, the winding handling in the
SetArcGeometry() function isn't tested. This adds a regression
test on EDA_SHAPE, which is where the logic now lives.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15694
Cherry-Pick: fb12db5f2c
2023-09-30 12:11:50 +00:00
John Beard 1d6caa9a35 Fix winding of FP_SHAPE arcs
Implement "0" versions of some arc calculations and fix some
initialisation bugs in the handling of FP_SHAPE arcs. Also
set m_endsSwapped.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15694
2023-09-30 12:11:50 +00:00
Mark Roszko c74b0943f3 StartPlot can fail and leave a broken file handle
Related #15782
2023-09-29 23:54:49 +00:00
Marek Roszko bb579294a0 Don't search when board is null (during board changes)
(cherry picked from commit 98685b37ff)
2023-09-29 23:53:02 +00:00
Josue Huaroto ad9f5f4dd7 Extend boundary size of PCB_VIEW
(cherry picked from commit 156288bfcf)
2023-09-29 12:12:03 -07:00
Josue Huaroto bf2e34f32e Change variable substitution for paths in Windows.
(cherry picked from commit 74695b0995)
2023-09-29 12:10:07 -07:00
Seth Hillbrand bd57957df7 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

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

(cherry picked from commit f3d65b5156)
2023-09-29 12:09:11 -07:00
Seth Hillbrand 093db600ff Fix cherry-pick issue with file locking 2023-09-29 11:15:59 -07:00
Seth Hillbrand 131013f291 Fix Portuguese(Brasil) translation naming
On case-sensitive systems, the country code needs to be capitalized for
the language to be correctly identified between two dialects.  Since
`br` was not capitalized, we fell back on european portuguese for Linux
and MacOS

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

(cherry picked from commit 2be87e4527)
2023-09-29 11:10:37 -07:00
Josue Huaroto 909d199379 Save flip board status in custom preset
(cherry picked from commit 2d54bc42cb)
2023-09-29 11:07:49 -07:00
Seth Hillbrand 5f16f4ab99 Focus back to the main window after dialog
Mouse actions would focus the window but we explicitly set it here to
allow keyboard shortcuts

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

(cherry picked from commit b2ef620ea6)
2023-09-29 11:06:44 -07:00
Seth Hillbrand fff95fa4e6 Disable non-KiCad import for project-mode
Adds warning if project schematic contains data

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

(cherry picked from commit b837aa823c)
2023-09-29 11:05:49 -07:00
Seth Hillbrand a38327a39c Ensure that layer names are unique when importing
Altium allows duplicate layer names but KiCad prefers to have unique
names for each layer.  This enforces a unique name for each layer when
importing

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

(cherry picked from commit c772d116b2)
2023-09-29 11:03:21 -07:00
Seth Hillbrand 686048dcce Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice

(cherry picked from commit 7fe83993cf)
2023-09-29 11:02:42 -07:00
Seth Hillbrand 330c0f86de Set pinmap after updating pins
When duplicating and existing symbol, we must set the pins before
setting the lib symbol as the lib symbol will generate a pin map that
will be broken by the shift to new pins

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

(cherry picked from commit 12ebb2bbfa)
2023-09-29 17:59:24 +00:00
Seth Hillbrand 83317f1b80 Don't destroy the pin cache in symbols
SCH_PIN pointers are used through KiCad and removing them without a
global refresh risks crashes.  A safer approach is to simply reuse the
SCH_PIN structures, updating the data to the revised library

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

(cherry picked from commit bdb7b99fc8)
2023-09-29 17:59:24 +00:00
Wayne Stambaugh a416eb2cf6 Fix schematic editor crash when updating symbols.
Some how symbol names that still have escaped '/' character get mixed with
symbol names that have '/' characters now that it is no longer an invalid
LIB_ID character.  This was causing derived symbols to loose the link to
the parent symbol.  This fix replaces any instances of "{slash}" with "/"
to convert symbol names to the proper escaping.

Thanks to JP for the inspiration for the fix.

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

Manually cherry picked from commit 2f51d22b3a.
2023-09-29 12:53:33 -04:00
Wayne Stambaugh 2959c94bd3 Begin version 7.0.9 development. 2023-09-29 12:26:05 -04:00
Wayne Stambaugh 063d9c8305 Tag release version 7.0.8. 2023-09-29 12:17:59 -04:00
Seth Hillbrand 5e97608fa5 Update translations 2023-09-29 08:58:00 -07:00
dsa-t 50dca2d02b Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-29 17:57:18 +02:00
Seth Hillbrand cd3785744c Update translations 2023-09-28 12:06:05 -07:00
Seth Hillbrand 357810a5d5 Revert "Translated using Weblate (Russian)"
This reverts commit 62044c2731.
2023-09-28 12:05:50 -07:00
Seth Hillbrand 1b71bc115d Revert "Translated using Weblate (Russian)"
This reverts commit 23ddb99026.
2023-09-28 12:05:50 -07:00
Seth Hillbrand de40286e81 Revert "Translated using Weblate (Russian)"
This reverts commit e7aa95d53d.
2023-09-28 12:05:49 -07:00
Seth Hillbrand 8d0ff95760 Revert "Translated using Weblate (Russian)"
This reverts commit a8bcf8c9e4.
2023-09-28 12:05:49 -07:00
Seth Hillbrand ffddf9fec3 Revert "Translated using Weblate (Russian)"
This reverts commit 3a35d96130.
2023-09-28 12:05:47 -07:00
Seth Hillbrand 3a35d96130 Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-28 20:59:28 +02:00
Marcel Hecko 8add678d87 Translated using Weblate (Slovak)
Currently translated at 65.1% (5223 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sk/
2023-09-28 20:59:28 +02:00
xXx a8bcf8c9e4 Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-28 20:59:28 +02:00
Hubert Hu 090374a1dc Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (8012 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-09-28 20:59:28 +02:00
xXx e7aa95d53d Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-28 20:59:28 +02:00
Toni Laiho f6ccf18cf5 Translated using Weblate (Finnish)
Currently translated at 99.8% (8006 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-09-28 20:59:28 +02:00
Marine Biologist 4542ce8c70 Translated using Weblate (Turkish)
Currently translated at 61.3% (4919 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-09-28 20:59:28 +02:00
Henrik Kauhanen f80287bc27 Translated using Weblate (Swedish)
Currently translated at 99.9% (8015 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-09-28 20:59:28 +02:00
ZbeeGin e10ab74917 Translated using Weblate (Polish)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-09-28 20:59:28 +02:00
xXx 23ddb99026 Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-28 20:59:27 +02:00
Henrik Kauhanen efbac9e128 Translated using Weblate (Swedish)
Currently translated at 99.9% (8015 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-09-28 20:59:27 +02:00
xXx 62044c2731 Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-28 20:59:27 +02:00
Wellington Terumi Uemura 7d1a38d46f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-09-28 20:59:27 +02:00
ZbeeGin d885bc14e1 Translated using Weblate (Polish)
Currently translated at 99.9% (8017 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-09-28 20:59:27 +02:00
Eryk Michalak 886937a3ea Translated using Weblate (Polish)
Currently translated at 99.9% (8017 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-09-28 20:59:27 +02:00
Tokita, Hiroshi 99eff43ab4 Translated using Weblate (Japanese)
Currently translated at 99.9% (8021 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-09-28 20:59:27 +02:00
Mark Hämmerling 880269780d Translated using Weblate (German)
Currently translated at 99.9% (8021 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-09-28 20:59:27 +02:00
Marek Roszko 7f1b891679 Save 470KB by not re-initializing lineTypeNames over a thousand cpp files it leaks into
I saved a bunch of money on my car insurance by switching to Extern


(cherry picked from commit 9deff07ca6)
2023-09-25 02:31:46 +00:00
Wayne Stambaugh ceced2a9a4 Tag stable version 7.0.8 release candidate 1. 2023-09-20 16:53:58 -04:00
Seth Hillbrand d3a8cb84a6 Make LIB_TREE_NODE sort irreflexive
std::sort requires explicit ordering of all elements.  It does not allow
for equality in its output

(cherry picked from commit 5c1b15f8e3)
2023-09-20 13:48:43 -07:00
Seth Hillbrand 6b43bb8fe3 Fix crash in incremental update and bus conn
We store our connectivity dirty flag with the SCH_ITEM but we generate
SCH_CONNECTION based on the SCH_ITEM and the SCH_SHEET_PATH.  For this
reason, we need to avoid clearing the connectivity dirty flag until
we've finished processing all instances of the SCH_ITEM in the graph

This also means that we need to allow getting the SCH_CONNECTION pointer
even when the connectivity is still dirty (getting SCH_CONNECTION
happens based on SCH_ITEM and SCH_SHEET_PATH, not just SCH_ITEM)

(cherry picked from commit 7d12e1c4f5)
2023-09-19 16:07:40 -07:00
jean-pierre charras a74cffac39 PANEL_SETUP_BOARD_STACKUP: save the m_HasDielectricConstrains BOARD_STACKUP member.
This member was not saved in the board stackup data.
From master branch.
Fixes #15690
https://gitlab.com/kicad/code/kicad/-/issues/15690
2023-09-19 18:05:42 +02:00
Marco Ciampa 83d2891cef Updated Italian translation 2023-09-19 11:32:43 +02:00
Seth Hillbrand 0faad370f9 Fix some stale pointers in incremental updates
Shared pointers contained stale references to the temporary graph.  When
merging, we need to ensure all references are updated to the final graph

(cherry picked from commit b52c43b933)
2023-09-18 21:27:22 -07:00
Seth Hillbrand 23fab89131 Properly handle incremental bus connections
- Incremental extraction needs the newly created items.  The modified
  items are already set in the connection graph but the newly created
  items don't exist yet, so we need to add those explicitly
- Bus parents need to ensure that the bus children exist because we
  iterate on the updates from the top of the graph down

(cherry picked from commit 9fc45eb08c)
2023-09-18 21:26:58 -07:00
jean-pierre charras 48189172ea Eeschema: fix crash if using ${FOOTPRINT_NAME} or ${FOOTPRINT_LIBRARY} as values
in fields, if no footprint defined for the symbol.
From master branch
Fixes #15676
https://gitlab.com/kicad/code/kicad/-/issues/15676
2023-09-18 09:33:25 +02:00
jean-pierre charras 0c9eda44d4 French translation update 2023-09-16 10:21:41 +02:00
Seth Hillbrand f0a9ce3ab4 Update translations 2023-09-15 15:58:04 -07:00
Li Yidong ea5878a0c9 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.8% (8005 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2023-09-16 00:57:34 +02:00
Li Yidong f67382612d Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8019 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-09-16 00:57:34 +02:00
Henrik Kauhanen 3fe7ae07ed Translated using Weblate (Swedish)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-09-16 00:57:34 +02:00
dsa-t 8bcfa81bea Translated using Weblate (Russian)
Currently translated at 99.9% (8019 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-09-16 00:57:34 +02:00
Jan Straka c17918d9c1 Translated using Weblate (Czech)
Currently translated at 91.8% (7363 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-09-16 00:57:34 +02:00
Ivan Chuba f752df0595 Translated using Weblate (Estonian)
Currently translated at 4.9% (400 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/et/
2023-09-16 00:57:34 +02:00
Ivan Chuba 0836b5b661 Translated using Weblate (Ukrainian)
Currently translated at 99.9% (8017 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-09-16 00:57:34 +02:00
ZbeeGin 2cefccf7bf Translated using Weblate (Polish)
Currently translated at 99.9% (8019 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-09-16 00:57:34 +02:00
Ivan Chuba 3dc86c5a4f Translated using Weblate (Estonian)
Currently translated at 4.9% (399 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/et/
2023-09-16 00:57:34 +02:00
ulikoehler 05ae712e77 Translated using Weblate (German)
Currently translated at 99.9% (8018 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-09-16 00:57:34 +02:00
Tokita, Hiroshi 04db374326 Translated using Weblate (Japanese)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-09-16 00:57:33 +02:00
Jan Straka e3558b7dcf Translated using Weblate (Czech)
Currently translated at 91.4% (7338 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-09-16 00:57:33 +02:00
Wellington Terumi Uemura 99e10c6112 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8020 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-09-16 00:57:33 +02:00
temizinsan 537934339e Translated using Weblate (Turkish)
Currently translated at 61.3% (4924 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-09-16 00:57:33 +02:00
Seth Hillbrand ee343e1263 Fix crash when duplicating symbol
Adding symbol to the screen can change the library reference.  But when
we are pasting, we want the library reference for annotation, so we need
to keep a map of old->new libsymbols and fixup the pasted symbols before
using

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15419
2023-09-15 15:43:50 -07:00
jean-pierre charras 6eeca9aa90 Pcbnew: fix some issues with very small arcs (size a few internal units)
these very small arcs do not allow to calculate a reliable center position,
and therefore a reliable radius.
So handle them as a very small segments to fix plotting/drawing issues.
From master branch.
Fixes #15639
https://gitlab.com/kicad/code/kicad/-/issues/15639
2023-09-15 17:47:21 +02:00
Alex Shvartzkop 86beb339b7 Improve error reporting when running Python action plugins.
Python error traceback is now logged to stderr.
On Windows, a console window will pop up if wxTheApp gets destroyed,
because message dialogs crash due to hooks that wxWidgets sets up.

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

(cherry picked from commit a9a2d4aa7a)
2023-09-15 13:33:28 +03:00
Jeff Young 67b5af23aa Run filled-test before degenerate-ring-test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15642

(cherry picked from commit 47dc86c1e2)
2023-09-13 23:45:27 +01:00
Roberto Fernandez Bautista 88f65f4e47 Fix loading of legacy zone fills in .brd files + Don't refill after board import
(cherry picked from commit 30a63b7b32)
2023-09-14 01:06:34 +03:00
Roberto Fernandez Bautista af5b6b0eba Fix import of legacy stroked zone fill + add parsing of segments fills
From master: 54f401c72c
2023-09-14 01:06:34 +03:00
Seth Hillbrand 57ef739404 Fix connectivity regression
We have a break somewhere in the connectivity that doesn't fully process
connections but the current code seems to catch these by forcing a
top-down & bottom-up calculation

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14818
2023-09-13 12:31:46 -07:00
Seth Hillbrand 584eb9f531 Remove extra nag/grid assertion
When editing the properties, if you accidentally make an extra line, you
should be able to remove the data and have it ignored.
2023-09-13 12:31:46 -07:00
Alex Shvartzkop 36a4d5a511 QA: refill zones in issue5990.kicad_pcb 2023-09-13 14:38:25 +03:00
Alex Shvartzkop 72737b20cd Fix reading legacy zone fills which were based on stroked polygons.
Ported from 448de72823
with InflateWithLinkedHoles
2023-09-13 03:40:23 +03:00
Jeff Young d05093e6f7 Don't throw the number box baby out with the bathwater.... 2023-09-12 17:39:34 +01:00
Jeff Young a7e6928f4e Don't go through a middle man when reading pad shape primitives.
They're both PCB_SHAPEs.

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

(cherry picked from commit 9f5a268f15)
2023-09-11 22:20:33 +01:00
Alex Shvartzkop 951fd2d693 Altium schematic: support Line dash styles and colors.
Master commit: a2b7bf97b9
2023-09-11 18:33:34 +03:00
Alex Shvartzkop be991cfcd6 Clear view before resetting schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15159

(cherry picked from commit cab0db76f8)
2023-09-11 18:28:05 +03:00
jean-pierre charras aab36d9b85 Gerbview, export to PCB: fix incorrect export of flashed shapes on non copper layers.
From master branch
Fixes #15613
https://gitlab.com/kicad/code/kicad/-/issues/15613
2023-09-11 15:04:55 +02:00
Alex Shvartzkop 3cd6935acb Work around wxGTK printing offset in eeschema.
Affects landscape Letter, Legal, A4 paper.

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

(cherry picked from commit 5da4dfd4a7)
2023-09-11 14:37:39 +03:00
Alex Shvartzkop 6daef080e3 Altium schematic: fix ISSOLID flag for text frames.
Fixed in master by 24d3df5416
2023-09-11 14:23:54 +03:00
Alex Shvartzkop 6ee909b958 Altium schematic: support custom sheet sizes.
(cherry picked from commit 16062bbe33)
2023-09-11 10:06:38 +03:00
Alex Shvartzkop c11ae8bd02 Fix a bug in RebuildBezierToSegmentsPointsList.
(cherry picked from commit 9f63820ed4)
2023-09-11 10:05:59 +03:00
John Beard c7a4ea97c3 Fix oval pad snapping
Previously the snap points computed for oval pads didn't get all the
points correct. This breaks out the "find snap points for ovals"
into a function, reworks the logic, adds some tests.

Also adds "extremum points" when the oval isn't exactly H/V.

(cherry picked from commit 78c8de9b08)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15594
2023-09-10 00:49:03 +01:00
John Beard 81ebb1030a Add forward declarations in pcb_grid_helper.h
(cherry pick of part of commit 0f781f328e)
2023-09-10 00:45:32 +01:00
Alex Shvartzkop 86ec36d183 Fix reading/writing thermal spoke angles for custom pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518
2023-09-10 17:32:22 +03:00
jean-pierre charras 207f2e568b drc_test_provider_text_dims.cpp: ensure glyphs to test are OUTLINE_GLYPH.
For non Kicad font texts with a overbar, the overbar is not a OUTLINE_GLYPH.
From Master branch.
Fixes #15604
https://gitlab.com/kicad/code/kicad/-/issues/15604
2023-09-09 10:37:58 +02:00
Alex Shvartzkop 19753719cb SVG import: skip shapes that are not stroked and not filled.
(cherry picked from commit bc846f5fca)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop 5f025dcd73 SVG import: skip invisible shapes. 2023-09-08 14:49:08 +03:00
Alex Shvartzkop c796eeaf8b NanoSVG: change preserveAspectRatio default to "xMidYMid meet".
(cherry picked from commit c64b44913c)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop bdbd7f0c9c NanoSVG: update image size to the actual size after scaling.
(cherry picked from commit 2c07866fff)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop b0e09327db NanoSVG: basic support for stylesheets.
Based on https://github.com/memononen/nanosvg/pull/175

(cherry picked from commit 2cd7c0636f)
2023-09-08 14:49:08 +03:00
Seth Hillbrand 96a3621b8e Update TestDanglingEnds to O(n) speed
The elements don't care which they connect to, so don't search for
points on the page, just collect them all and then test them all

Adjusts f3dd5b73

(cherry picked from commit c2fd2f42eb)
2023-09-07 01:37:42 +02:00
Josue Huaroto 8f259211e7 Change behavior of ZOOM_FIT_ALL and ZOOM_FIT_OBJECTS for PCB_EDITOR
(cherry picked from commit 91d8dabca3)
2023-09-06 16:56:27 +01:00
Josue Huaroto 0d9d8c28f1 Flip Viewport when Flip board is enabled
(cherry picked from commit a8e18e2d8c)
2023-09-06 16:56:01 +01:00
Jeff Young 058a0bbf93 Don't attempt to render degenerate 3D shapes.
Sentry KICAD-382

(cherry picked from commit 70bbaae670)
2023-09-06 16:33:31 +01:00
Jeff Young 4d46e0ceb7 Include underscore in word chars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14779

(cherry picked from commit 0dddb27408)
2023-09-06 16:33:02 +01:00
Jeff Young 123ff326d4 Don't include plating thickness when drawing hole clearance lines.
We don't include it in the router, and the code didn't
differentiate between plated and non-plated holes, and it confuses
users.

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

(cherry picked from commit 0cde8cff1d)
2023-09-06 16:31:46 +01:00
Jeff Young 14d4c38979 Honour override-individual-item-colors setting for filled shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15572

(cherry picked from commit d593257fbd)
2023-09-06 16:31:22 +01:00
Alex Shvartzkop 9c87a52b6e Altium PCB import: Polygon Cutout only cuts copper fill.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15587

(cherry picked from commit 4f303a8dc2)
2023-09-06 09:26:48 +03:00
Alex Shvartzkop 30c2028852 Revert "Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow."
This reverts commit 5b0d752e0c.
2023-09-06 08:03:00 +03:00
Marek Roszko 95e6be0e81 Prevent crash trying to load missing spice lib
(cherry picked from commit 4fe7c7a902)
2023-09-06 01:13:54 +00:00
jean-pierre charras 955313e97d GAL_OPTIONS_PANEL: replace 2 wxSpinCtrlDouble to try to fix a locale issue.
Sometimes the grid thickness setting does not work, depending on some locale setting.
Core developers are not able to reproduce this issue related to a double conversion.
So these wxSpinCtrlDouble are replaced by a wxSpinCtrl (using ints) and a wxChoice.

From master branch
2023-09-05 18:56:24 +02:00
Marek Roszko 32c2135047 Flip the RegisterSettings order to avoid legacy import crashes 2023-09-04 23:22:39 -04:00
Marek Roszko 702e08b083 Don't call .Load() and cause settings to reload from disk
RegisterSettings can load the new settings json as added by not turning off the load now parameter
2023-09-04 22:41:12 -04:00
jean-pierre charras 8f58e1a9e0 DIALOG_EXPORT_STEP_LOG: print the command line sent to kicad-cli in report window.
It can be useful in case of problems.


(cherry picked from commit 2bf8602912)
2023-09-05 00:26:43 +00:00
Mark Roszko 0cc25f10c6 Pull in ngspice 41 for vcpkg 2023-09-04 19:36:07 +00:00
Jeff Young 61ef88a0ac Don't allow duplication of footprint items outside of footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15487

(cherry picked from commit 9bba8e5956)
2023-09-03 22:44:17 +01:00
Jeff Young 02a95b958d Remove up/down buttons until we implement layer ordering.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14574

(cherry picked from commit d27413a032)
2023-09-03 22:43:41 +01:00
Jeff Young 5cd88dbd20 Bug fixes for paste margins on custom-shaped pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15125

(cherry picked from commit 60419f542a)
2023-09-03 22:32:40 +01:00
Jeff Young ec53ed6a37 Don't start a router drag when already in an EDIT_TOOL drag or move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15312

(cherry picked from commit 624203f2e1)
2023-09-03 22:12:43 +01:00
Jeff Young 242413a334 Don't start a pack&move when already in an EDIT_TOOL drag or move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15545

(cherry picked from commit a24a8aaca7)
2023-09-03 22:12:24 +01:00
Jeff Young f88dce1627 Don't return separate shapes from a custom-shaped pad.
It just confuses the hull generator.

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

(cherry picked from commit 43862d767e)
2023-09-03 22:11:15 +01:00
Jeff Young 5c456370d9 Add items to repeat_items after paste (or duplicate).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15556

(cherry picked from commit f6e238dc3f)
2023-09-03 22:10:38 +01:00
Jeff Young 93fdd35b31 Support SHORT_NET_NAME(pin_number) and friends on symbols.
While it's of debatable use in the schematic, some users want to
author them there so that they're then copied onto the board.

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

(cherry picked from commit d74e9ba040)
2023-09-03 22:07:11 +01:00
Jeff Young 70d5fccb54 {slash}-to-/ comparison special-cases need to run both ways.
(The library may be legacy format, or the document may be.)

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

(cherry picked from commit 86f96d544b)
2023-09-03 22:05:58 +01:00
Jeff Young 6ca7c3a3a1 Fix merge errors. 2023-09-02 11:18:34 +01:00
Jeff Young 88448ce746 Custom pads with round anchors in pre-7.0 files get 90 degree spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518

(cherry picked from commit 676c6e81a4)
2023-09-02 11:18:34 +01:00
Jeff Young 1fee2c626b Save ERC settings (including exclusions) when saving file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15274

(cherry picked from commit 10ed1d1a7f)
2023-09-02 11:18:34 +01:00
Jeff Young 480a9ac77d Implement undo/redo around Pad Edit Mode changes.
(cherry picked from commit 69a1b30b8a)
2023-09-02 11:18:34 +01:00
Jeff Young 889689e31a Stop trying to zero-out offset of custom-shaped pads.
It causes *way* to many issues.

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

(cherry picked from commit 68c839b214)
2023-09-02 11:18:34 +01:00
Jeff Young c8e49599ce Use STD_BITMAP_BUTTON for change symbols dialog.
(cherry picked from commit f3f57f77d9)
2023-09-02 11:18:34 +01:00
Jeff Young 351cb7e104 Re-run autoplacement after symbol replacement (when appropriate).
Also prevents an internal wxWidgets assert by clearing grid
selection before deleting rows.

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

(cherry picked from commit 377ffb00b0)
2023-09-02 11:18:34 +01:00
Adam Simpkins 5c5e41500a kicad-cli: add option to control oval drill export behavior
Add an argument to "kicad-cli pcb export drill" to control the oval
holes drill mode for the excellon output format.

The Generate Drill Files GUI dialog recommends the newer "route"
behavior by default.  Previously this option was not exposed in
kicad-cli.  This commit does not change the default kicad-cli behavior,
but simply adds an argument to control it.


(cherry picked from commit 9b69d84688)
2023-08-31 22:26:59 +00:00
jean-pierre charras 2e739e743d Gerber place file: change DCode size of pads others than 1 or A1 to 0.1 mm
Previously it was a round shape 0.0 mm (allowed but not visible)
Gerber Format rev 2023-08 changed it to 0.1 mm (still a round shape)
2023-08-31 16:44:14 +02:00
Jeff Young 1eee3d350b Fix merge errors. 2023-08-31 12:37:44 +01:00
Jeff Young d2d7e630bd Allow for offset custom-shaped pads with no holes.
(cherry picked from commit 0d39cd5e63)
2023-08-31 12:37:44 +01:00
Jeff Young d11cd173dc Fix previous fix for honouring pad offset.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494

(cherry picked from commit e0cf49e73c)
2023-08-31 12:37:44 +01:00
Jeff Young 12e0427038 Honour pad offset when creating custom pad anchors (and polygons).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494

(cherry picked from commit 300014177f)
2023-08-31 12:37:44 +01:00
Jeff Young 9bcb6f0adf Don't count pins of both De Morgan variants when matching to footprint pads.
(And remove un unused variable from grid settings dialog.)

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

(cherry picked from commit cb003d8ab4)
2023-08-31 12:37:44 +01:00
Jeff Young 09490e1f46 Don't snap a footprint (or group) to its children.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15535

(cherry picked from commit d161602e92)
2023-08-31 12:37:44 +01:00
Jeff Young f33120c540 Remember footprint library browsers liblist width.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15500

(cherry picked from commit a4d1b29b91)
2023-08-31 12:37:44 +01:00
Jeff Young 82ed223b02 Handle non-cardinal major-axis arcs when importing DXF.
(cherry picked from commit a946f7ab1b)
2023-08-31 12:37:44 +01:00
Jeff Young bfdbf969c2 Handle DXF arcs with a flipped coord system.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14905

(cherry picked from commit 75b160e83a)
2023-08-31 12:37:44 +01:00
Jeff Young 7d409b9404 Minor cleanup and removal of stale comments.
Also attempts to fix a focus-loss bug on GTK after zone dialog.

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

(cherry picked from commit 3f26b29aa2)
2023-08-31 12:37:44 +01:00
Jeff Young 7673f220a9 Minor cleanup and removal of stale comments.
(cherry picked from commit c48084bbbf)
2023-08-31 12:37:44 +01:00
Jeff Young 75daa1afec Don't presume all cached glyphs are outline glyphs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15508

(cherry picked from commit 949458bbe1)
2023-08-31 12:37:44 +01:00
Jeff Young 27657e00fe Handle dimensions and textboxes when plotting contours to DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11901

(cherry picked from commit 83fe3576c6)
2023-08-31 12:37:44 +01:00
Mark Roszko 26b8812f15 Fix 3d viewer rendering textbox borders that were disabled 2023-08-31 02:50:36 +00:00
jean-pierre charras 07e13c51d1 UNIT_BINDER: allows more room to show values (especially inches need room)
Fixes #15539
https://gitlab.com/kicad/code/kicad/-/issues/15539
2023-08-30 09:14:28 +02:00
jean-pierre charras f9b59b4fdf PANEL_SETUP_SEVERITIES: fix a missing init (m_severitiesPage) creating a crash.
PANEL_SETUP_SEVERITIES::ImportSettingsFrom(): ensure the option to set
actually exists before setting it.
2023-08-29 10:56:40 +02:00
Seth Hillbrand 76a3b3db97 Better handle many (MANY) duplicate refs
In large designs with thousands of duplicate elements (e.g. power
symbols), we need to be smart about vector management.  Removing all but
the first few items should be batched and not element at a time

Ref: KSC-885
(cherry picked from commit b43f037a91)
2023-08-28 17:08:42 -07:00
Seth Hillbrand 4b0416e92a Simplify logic when setting field vector
Previous logic could get stuck in infinite loop if removing element from
the middle of the vector

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

(cherry picked from commit 9636321c09)
2023-08-28 15:29:19 -07:00
jean-pierre charras 5d6bb4b04f Update Clipper2 to commit 7cf615c2799a9328ec32eb116f46b64ed34aecff.
(it fixes (or try to fix) an issue impacting Kicad)
2023-08-28 08:02:28 +02:00
Jeff Young 2764f292cb Don't store address of temp object.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15517
2023-08-27 19:02:57 +01:00
Marek Roszko 7ca59e24c6 Force fontconfig to look at the correct path for fonts.conf on windows
(cherry picked from commit 208d146a03)
2023-08-26 17:59:47 +00:00
Marek Roszko e1a2d60672 Don't call FcInitLoadConfigAndFonts after FcInit() already happened
We are only the default global FcConfig created by calling FcInitLoadConfigAndFonts inside FcInit().
Calling FcInitLoadConfigAndFonts does nothing but creating another FcConfig option that never gets disposed or used because we use the FcConfig functions with null


(cherry picked from commit 53bf7b71c6)
2023-08-26 17:59:28 +00:00
Alex Shvartzkop 9672390104 Fix a search pane crash when a row isn't in the hit list.
Fixes KICAD-Q7
Fixes KICAD-1A6

Cherry-picked from f071dd1406
2023-08-26 00:53:14 +03:00
Alex Shvartzkop 33c2005c18 EAGLE import: fix crash when loading unknown signal class name.
Fixes KICAD-3FA

Cherry-picked from 0fcf9e2c7d and 331176744c
2023-08-26 00:47:43 +03:00
Alex Shvartzkop 3e1309110e EAGLE import: fix crash when loading a polygon.
Fixes KICAD-TW

(cherry picked from commit bfb6269f0a)
2023-08-26 00:41:50 +03:00
Wayne Stambaugh aae7d94ffd Remove duplicate references from change symbol dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15480

(cherry picked from commit 1db9febcfe)
2023-08-25 14:28:13 -04:00
Alex Shvartzkop 5b0d752e0c Set reporter in DIALOG_SIM_MODEL::TransferDataToWindow.
It could've been set to point to local variable "reporter" in loadLibrary.

Fixes KICAD-15C

(cherry picked from commit 26f398a4b1)
2023-08-25 21:09:28 +03:00
jean-pierre charras 0f93752f14 Revert "Record hole knockouts in zone filler earlier"
This reverts commit 1ccaf45740.
Breaks sone thermal shapes.
Not needed after Clipper2 update.
2023-08-25 07:35:06 +02:00
jean-pierre charras 049ecc43e3 Update Clipper2 to commit 4ef91e99756f97cab23e7fa2cd78861deeb61338.
It fixes some of our issues.
However, Clipper issue 618 can create problems in zone filler, Clipper2
will be updated as soon as issue 618 is fixed.
Include also a fix for *nix
From Master branch
2023-08-25 07:35:06 +02:00
Marek Roszko 2209f5e93b Fix accidental plotting of disabled textbox borders
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15252
2023-08-24 21:14:27 -04:00
Marek Roszko a17cd9d054 Make VRML use board edge bounding box for parity with step
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15472
2023-08-24 20:42:58 -04:00
Alex Shvartzkop 4497aaa3fa Prevent crash when a python script tries to use pcbnew too early.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15414

(cherry picked from commit b1b66f66f4)
2023-08-25 00:17:03 +03:00
Jeff Young 00226ae40a Honour aAllowExtraText flag in LIB_FIELD::GetShownText().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15470
2023-08-21 19:20:00 +01:00
jean-pierre charras 45963a3443 Step export: fix incorrect Z position of holes, after code change.
Fixes #15467
https://gitlab.com/kicad/code/kicad/-/issues/15467
2023-08-21 14:48:48 +02:00
Jeff Young 4aa1a881f3 Pull back some more fixes from master.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15461
2023-08-20 19:08:29 +01:00
Jeff Young f3dd5b73f8 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

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

(cherry picked from commit c8e8b71198)
2023-08-20 18:44:40 +01:00
Jeff Young fd049ef510 Fix selection shadown drawing for global labels.
(The border should get shadowed, and the shape should get filled if
m_Selection.fill_shapes is set.)

(cherry picked from commit 1c13f5a0db)
2023-08-20 18:15:38 +01:00
Jeff Young 7d389f8024 Don't try to be smart about enabling the Clear Annotation button.
(At a minimum it would need to also handle when the scope changes, but
it's not clear we're adding anything by enabling/disabling it to start
with.)

(cherry picked from commit 2278f5dbca)
2023-08-19 20:09:47 +01:00
Jeff Young df63f47deb Save color settings after modification in Appearances Manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15390

(cherry picked from commit 1cbc6e33db)
2023-08-19 20:09:47 +01:00
Jeff Young c521efa35d Move checking for null parent higher.
(Otherwise we set the failure flag without telling the user why.

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

(cherry picked from commit 6a6e839cc4)
2023-08-19 20:09:47 +01:00
Jeff Young af1561b848 Don't double-offset effective text shapes.
Also fixes several bugs with intersheet ref fields.  (It's possible for
other fields to have an ID of 0.)

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

(cherry picked from commit eedf319ba4)
2023-08-19 20:09:47 +01:00
jean-pierre charras 691931f74d kicad-cli, export plot PDF and SVG: add missing option --drill-shape-opt.
It allows pad/via holes to ber plotted at actual size, small size, or not.
This option exists in GUI, but was missing in kicad-cli.

(cherry picked from commit f18feb2a46)
2023-08-19 10:56:32 -04:00
Marek Roszko da5e1de1c8 Add a workaround to Nahimic crapware
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11850


(cherry picked from commit 726f09f9ad)
2023-08-18 03:02:06 +00:00
Jeff Young 043892bdc6 Disable "Override individual item colors" on read-only themes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15426

(cherry picked from commit 88db775d32)
2023-08-17 11:49:58 +01:00
Jeff Young 34d2aeaac3 Update Eagle gold files for spoke angle fixes.
(cherry picked from commit f2a8c25084)
2023-08-17 11:49:58 +01:00
Jeff Young 4481e89046 Fix incorrect assumption about Eagle spoke rotation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428

(cherry picked from commit 25b9a9de7e)
2023-08-17 11:49:58 +01:00
Jeff Young 8120e47bfd Better fidelity for Eagle thermal spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428

(cherry picked from commit a58547dde5)
2023-08-17 11:49:58 +01:00
Jeff Young db526e581c Don't call driverName() unless we have a cache miss.
(That is, in fact, the whole purpose of this cache.)

(cherry picked from commit e48a96ecaf)
2023-08-17 11:49:58 +01:00
jean-pierre charras 246be732a1 Pcbnew, DIALOG_PAD_PROPERTIES: ensure the right spoke angle is displayed.
From master, commit d8ba6c07ac
2023-08-17 08:04:18 +02:00
Marek Roszko 27a0bd2535 Backport changes to merge distance for step export
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14910
2023-08-16 22:12:55 -04:00
Jon Evans 8f57fd82a0 DbLib: Provide more useful feedback when table is misconfigured 2023-08-15 16:45:10 -04:00
Jeff Young 1ef90c898e Don't allow selection of footprint dimensions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15418

(cherry picked from commit 750b92b17f)
2023-08-15 17:54:00 +01:00
Jeff Young cf133975c1 Avoid edge cases on very wide thermal spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15280

(cherry picked from commit 1cbef0157d)
2023-08-15 17:53:35 +01:00
Jeff Young c468b68c5a Better handling of dangling markers during bus unfold.
(cherry picked from commit c981c3668a)
2023-08-15 17:52:42 +01:00
Jeff Young acbddc904b Don't consider newly-added labels when looking for terminal items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15313

(cherry picked from commit 6cef504d2d)
2023-08-15 17:52:27 +01:00
Jeff Young 83624acfd2 Allow GetLayer() to be used with single-layer zones.
Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).

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

(cherry picked from commit 8bb895373a)
2023-08-15 17:51:52 +01:00
Jeff Young d915ddc647 Fix missing variable initialization.
(cherry picked from commit b401c214f5)
2023-08-15 17:30:38 +01:00
Jeff Young 61b741c34e Re-entrancy guard for length tuner tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15268

(cherry picked from commit 620b6b7169)
2023-08-15 17:30:02 +01:00
Jeff Young aa1910a834 Re-implement some commented-out hole clearance checking in router.
(cherry picked from commit 5e18287ff9)
2023-08-15 17:29:22 +01:00
Jeff Young dba36c07fe Only re-build the members grid when we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15320

(cherry picked from commit d3329a0781)
2023-08-15 17:26:14 +01:00
Jan Mrázek 8451e6dcf1 Fix failure on multiple DRC runs via scripting
(cherry picked from commit 2d010278ad)
2023-08-15 01:40:04 +00:00
Jon Evans 88dfe6eb9c Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

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


(cherry picked from commit 4c4bbdc8f3)
2023-08-15 01:39:09 +00:00
Wayne Stambaugh 800b697d06 Begin version 7.0.8 development. 2023-08-13 18:13:28 -04:00
Wayne Stambaugh 2176a654cd Tag release version 7.0.7. 2023-08-13 18:08:29 -04:00
Seth Hillbrand 2176788d1c Update translations 2023-08-13 14:56:51 -07:00
Milan Šalka 6389fa2d81 Translated using Weblate (Slovak)
Currently translated at 65.0% (5218 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sk/
2023-08-13 23:56:06 +02:00
Tokita, Hiroshi 8a0b64dd00 Translated using Weblate (Japanese)
Currently translated at 99.9% (8019 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-08-13 23:56:06 +02:00
Toni Laiho 79ac207532 Translated using Weblate (Finnish)
Currently translated at 99.8% (8010 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-13 23:56:06 +02:00
yangyangdaji c33e12b66f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-08-13 23:56:06 +02:00
Henrik Kauhanen 5d0dfb80d4 Translated using Weblate (Swedish)
Currently translated at 99.9% (8019 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-13 23:56:06 +02:00
dsa-t 7ebab92f16 Translated using Weblate (Russian)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-08-13 23:56:06 +02:00
Wellington Terumi Uemura 1a851f7c33 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-08-13 23:56:06 +02:00
ZbeeGin 74ee8bea5d Translated using Weblate (Polish)
Currently translated at 100.0% (8022 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-08-13 23:56:06 +02:00
Tokita, Hiroshi dec1748978 Translated using Weblate (Japanese)
Currently translated at 99.9% (8018 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-08-13 23:56:06 +02:00
Toni Laiho 4ef47e1040 Translated using Weblate (Finnish)
Currently translated at 99.8% (8010 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-13 23:56:05 +02:00
Henrik Kauhanen 42f242ce42 Translated using Weblate (Swedish)
Currently translated at 99.9% (8017 of 8022 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-13 23:56:05 +02:00
jean-pierre charras c4914a64bb PCB_GRID_HELPER::BestSnapAnchor() fix overflow due to use of int.
GRID_HELPER::GetVisibleGrid() needs double, does not work with int (overflow).
Fixes #15389
https://gitlab.com/kicad/code/kicad/-/issues/15389
2023-08-11 18:04:27 +02:00
Alex Shvartzkop 4aa05dfcf2 Altium PCB importer: fix custom pad local placement. 2023-08-08 17:03:30 +03:00
Jon Evans 255ff5d789 Manual cherry-pick of 256c7fa7
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15367
2023-08-07 11:36:36 -04:00
Chris Morgan 75f5186dec vcpkg.json - Explicitly depend on sqlite3 with a range of features that...
(cherry picked from commit d03c3d0f6d)
2023-08-06 22:51:17 +00:00
Wayne Stambaugh 0cf6d80705 Stable version 7.0.7 release candidate 1. 2023-08-04 17:01:17 -04:00
Seth Hillbrand 2d96c6ad22 Better fix for #15217
Rather than rely on a quirk, we avoid the modified structure

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

(cherry picked from commit 248404a0d1)
2023-08-04 13:59:23 -07:00
Seth Hillbrand ef7ec13861 Fix-up for previous commit
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15217

(cherry picked from commit 018d60eb40)
2023-08-04 13:59:23 -07:00
Seth Hillbrand 8008e09918 Change stale_bus_members to work around MSVC issue
Somehow, MSVC vector gets corrupted in certain cases.  While the
mechanism is unclear, using an unordered_set avoids this problem

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

(cherry picked from commit 7bd3992350)
2023-08-04 13:59:23 -07:00
Alex Shvartzkop 75ace76c6a Some router/DRC performance boost (ZONE::GetZoneName) 2023-08-04 23:56:02 +03:00
Seth Hillbrand 9de58a29e3 Avoid bulking drawing sheet polygons
On the drawing sheet, the polygons are always filled and shouldn't have
additional stroking

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

(cherry picked from commit e71422d2cf)
2023-08-04 13:51:38 -07:00
Jon Evans 56aff41b7e Database libraries performance improvements
Rework caching system and optimize queries


(cherry picked from commit 39a5929f33)
2023-08-04 17:57:46 +00:00
Jeff Young a8417a7e23 Use pre-existing strings for 7.0. 2023-08-04 16:27:22 +01:00
Alex Shvartzkop 582c9b7f08 CompoundFileReader: fix UTF16~wstring conversion on 16b wchar compilers
(cherry picked from commit c39dfb9f05)

CompoundFileReader: fix build error

(cherry picked from commit d40e34aebe)

UTF16ToWstring: stop at NUL input terminator.

(cherry picked from commit b784b44ed0)
2023-08-04 16:50:09 +03:00
Alex Shvartzkop 2eb6ca75a8 Altium PCB import: support dashed outlines (Region kind 2)
(cherry picked from commit 430da67222)
2023-08-04 16:50:09 +03:00
Alex Shvartzkop 4918ac6307 Improvements to Altium PCB/footprint importer:
- Support unicode footprint names
- Set default footprint text size and thickness to match KLC
- Position Reference at the top, Value at the bottom of fp bounding box

(cherry picked from commit 24452f41ad)
2023-08-04 16:50:09 +03:00
Alex Shvartzkop acc03e91f3 Altium PCB: support solder/paste mask expansion rules.
- Writes expansion values to board design settings
- Imports footprint regions on Cu layers as pads
- Adds support for holes in non-Cu polygons in footprints
2023-08-04 16:50:09 +03:00
Alex Shvartzkop 8e1466a35a Altium PCB import: import holes in non-Cu polygons.
(cherry picked from commit ef66fe88ac)
2023-08-04 16:50:09 +03:00
Alex Shvartzkop 5b73af668f Altium PCB import: remove more invalid polygons.
(cherry picked from commit eb6cd4cc5d)
2023-08-04 16:50:09 +03:00
Roberto Fernandez Bautista deb035c7fe Fix loading of via drill default sizes and other settings from *.brd kicad files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15350

(cherry picked from commit 573d2f94de)
2023-08-04 10:59:26 +02:00
Jon Evans 2075a99c9b PNS: Process holes as solids in shoveIteration
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12873
2023-08-03 20:22:48 -04:00
Roberto Fernandez Bautista 74b1f603df Ensure symbols in subsheets are added to multi-unit map before re-annotating
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14918

(cherry picked from commit 6d3f512e15)
2023-08-04 01:22:26 +02:00
Jon Evans ed1eb1c018 Fix PNS debug tool 2023-08-03 18:49:37 -04:00
Jon Evans 4bed2e57cb Fix msvc being unhappy
(cherry picked from commit ca4d6e8d1d)
2023-08-03 20:16:16 +00:00
Jon Evans 0629f502b5 PNS: Improve behavior of dragging vias
- Fall back to walkaround when drag fails
- Properly check collisions with holes

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


(cherry picked from commit cc7d470f8b)
2023-08-03 20:16:06 +00:00
Seth Hillbrand fd93873cc1 Update translations 2023-08-03 11:30:31 -07:00
turkce dbd58dbbc6 Translated using Weblate (Turkish)
Currently translated at 61.3% (4924 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-08-03 20:23:03 +02:00
Henrik Kauhanen b2edf61588 Translated using Weblate (Swedish)
Currently translated at 99.9% (8017 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-03 20:23:03 +02:00
Tokita, Hiroshi 96b6975deb Translated using Weblate (Japanese)
Currently translated at 99.9% (8017 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-08-03 20:23:03 +02:00
Tokita, Hiroshi 9449dab0b7 Translated using Weblate (Japanese)
Currently translated at 99.9% (8017 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-08-03 20:23:02 +02:00
Rigo Ligo 6da9dbcc53 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-08-03 20:23:02 +02:00
Tokita, Hiroshi d1bdea21b4 Translated using Weblate (Japanese)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-08-03 20:23:02 +02:00
Toni Laiho 5ea0f3253f Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:02 +02:00
Mark Hämmerling b1e5c02e0c Translated using Weblate (German)
Currently translated at 100.0% (8020 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-08-03 20:23:02 +02:00
Hubert Hu f48d97ab04 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-08-03 20:23:02 +02:00
Hubert Hu 8f85e04d61 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-08-03 20:23:02 +02:00
Jan Straka 1eab9b34fe Translated using Weblate (Czech)
Currently translated at 91.4% (7337 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-08-03 20:23:02 +02:00
Djamel Dellaa 13a3c44b61 Translated using Weblate (Arabic)
Currently translated at 1.2% (101 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ar/
2023-08-03 20:23:02 +02:00
Andrey Fedorushkov f6b106598c Translated using Weblate (Russian)
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-08-03 20:23:02 +02:00
Li Yidong f6aed13605 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-08-03 20:23:01 +02:00
Elias Sjögreen 62dd8e67df Translated using Weblate (Swedish)
Currently translated at 99.9% (8017 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-03 20:23:01 +02:00
Luc ba7620e0ee Translated using Weblate (German)
Currently translated at 99.9% (8012 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-08-03 20:23:01 +02:00
Toni Laiho 931f6a35dd Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:01 +02:00
aris-kimi d3394733b1 Translated using Weblate (Greek)
Currently translated at 99.6% (7989 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/el/
2023-08-03 20:23:01 +02:00
turkce 0f5d175b09 Translated using Weblate (Turkish)
Currently translated at 49.6% (3982 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-08-03 20:23:01 +02:00
Henrik Kauhanen c93111bf4b Translated using Weblate (Swedish)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-03 20:23:01 +02:00
ZbeeGin adb0f0a46f Translated using Weblate (Polish)
Currently translated at 100.0% (8020 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-08-03 20:23:01 +02:00
Henrik Kauhanen 60454c0c39 Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:01 +02:00
Toni Laiho de35de9e00 Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:00 +02:00
Henrik Kauhanen d5d91ae592 Translated using Weblate (Swedish)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-03 20:23:00 +02:00
Ivan Chuba 9c852af5b7 Translated using Weblate (Ukrainian)
Currently translated at 99.6% (7993 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-08-03 20:23:00 +02:00
ZbeeGin 24fcfd125c Translated using Weblate (Polish)
Currently translated at 100.0% (8020 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-08-03 20:23:00 +02:00
Toni Laiho 1ad42519d6 Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:00 +02:00
ZbeeGin 3052dcc95a Translated using Weblate (Polish)
Currently translated at 99.9% (8018 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-08-03 20:23:00 +02:00
Henrik Kauhanen 17089d8316 Translated using Weblate (Swedish)
Currently translated at 99.9% (8016 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-08-03 20:23:00 +02:00
Wellington Terumi Uemura ce919632be Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8020 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-08-03 20:23:00 +02:00
ZbeeGin f3168c3603 Translated using Weblate (Polish)
Currently translated at 99.9% (8015 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-08-03 20:23:00 +02:00
Toni Laiho a6ca88b5ac Translated using Weblate (Finnish)
Currently translated at 99.8% (8008 of 8020 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-08-03 20:23:00 +02:00
jean-pierre charras 8625a59d4c Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:44:57 +02:00
jean-pierre charras cb4289fd19 Eeschema: fix position of shadow shape of graphic texts in a footprint.
From master branch
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-08-03 15:44:39 +02:00
Jon Evans 9ac5f837f7 Properties: disable pad y-size when circular
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038


(cherry picked from commit 39073642a7)
2023-08-03 13:07:52 +00:00
Jon Evans 033ab9ac71 DbLib: Remove slashes from table display names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15074


(cherry picked from commit 0e617774dd)
2023-08-03 13:07:25 +00:00
Jon Evans 228fe71eb4 Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

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


(cherry picked from commit 7804c2177c)
2023-08-03 13:06:37 +00:00
Ian McInerney 80462cf559 Remove temp items from its group before deleting them
The 1st level items being copied don't have their group information
copied, and we assert that it has been removed from the group on
deleting it, so we just reset the group membership to prevent the
assert.

Fixes sentry KICAD-22S
(Cherry-picked from 753cc6679b)
2023-08-02 23:32:45 +01:00
Ian McInerney e5df16ba2b Pass proper parent to symbol viewer frame when changing symbols
Fixes sentry KICAD-1Z9
Fixes sentry KICAD-22J

(Cherry-picked from 1f5719ef3a)
2023-08-02 23:29:04 +01:00
Ian McInerney b0f4d56de1 Remove group association before plotting board outline in drill map
The plotter doesn't care about the grouping, and we expect the item to
have no group on deletion, so temporary items like this shouldn't be
part of one.

(Sentry issue KICAD-24Y)
(Cherry-picked from 137640ac28)
2023-08-02 23:26:35 +01:00
Ian McInerney 7bc0f8731f Remove group reference when exporting individual footprints
(Cherry-picked from d923b871d7)
2023-08-02 23:21:36 +01:00
Ian McInerney b4b49a4296 Don't skip loading the wxWidgets message catalogs
The wxWidgets message catalog contains translations for strings that are
in the wx-provided dialogs, and these strings aren't contained in our
message catalog.

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

(Cherry-picked from 5e740c354e)
2023-08-02 23:20:21 +01:00
Ian McInerney 507054e9cd Remove temporary footprint from pcb group before deletion
Bounding box computation uses a temporary footprint, but the clone
operation keeps the group information. We can't delete a footprint if it
has group information, so just delete the group information.

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

(Cherry-picked from b8e9544828)
2023-08-02 23:17:03 +01:00
Johannes Maibaum 342b8b157b Add KICAD_BUILD_{NIGHTLY_,}FLATPAK CMake options to 7.0 2023-08-02 22:14:25 +00:00
jean-pierre charras 74fc8f6db0 APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in
a User preset, and use the last defined object visibility when switching to
a builtin preset
From master branch
Fixes #15282
https://gitlab.com/kicad/code/kicad/-/issues/15282
2023-08-02 14:01:43 +02:00
Jon Evans 04bb3dfe9d A BOARD may not always have a project
For example, if it's the footprint editor model

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


(cherry picked from commit 2459949d0d)
2023-08-01 21:26:01 +00:00
jean-pierre charras 7fb15269d1 PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
From master branch
Fixes #15288
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:59:53 +02:00
jean-pierre charras 49772d2539 Gerber export X3: fix an incorrect keyword ("route" must be "rout") 2023-07-27 20:18:16 +02:00
jean-pierre charras 0f4bd34bce Eeschema: Export symbols to New Library: Fix Cancel button not working
This bug can crash Eeschema.
Fixes #15278
https://gitlab.com/kicad/code/kicad/-/issues/15278
2023-07-27 15:16:33 +02:00
Seth Hillbrand 2451cbddec Consolidate Maximum clearance calculation
We were calculating the same thing in three locations and we missed
adding the clearance from the footprints in, resulting in bad fills and
missed drc errors (see QA addition)

(cherry picked from commit 96a34e5b57)
2023-07-26 13:16:32 -07:00
Kuba Sunderland-Ober b7363225da Ensure the bitmap exported to the clipboard is valid.
Fixes #14808
https://gitlab.com/kicad/code/kicad/-/issues/14808

(cherry picked from commit e852d04043)
2023-07-25 11:14:36 -07:00
Josue a9c0756da4 Improve calculation of min and max zoom
From master branch.
Fix: https://gitlab.com/kicad/code/kicad/-/issues/15078
2023-07-25 13:48:46 +02:00
Seth Hillbrand 2652068933 When routing, check for board-level clearances
If the board-level clearance exceeds the max pad/track clearance, we end
up missing collisions in the router.

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

(cherry picked from commit 000998ccae)
2023-07-24 15:19:59 -07:00
Seth Hillbrand 022105cdba Fix QA for new fills in 7.0 2023-07-21 11:09:18 -07:00
Seth Hillbrand 2fa05ed245 Sort the bus alias set by name
If we place pointers in a set, they are sorted by the pointer value in
memory, not the data, so we need a custom comparator

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

(cherry picked from commit f7f67c6d53)
2023-07-21 09:04:46 -07:00
Seth Hillbrand 124be52411 Remove check for existing hole
Does not exist now that we've refilled zones
2023-07-20 21:26:11 -07:00
Seth Hillbrand 6f8272718d Update connectivity python test
Previous test depended on which track was first.  Re-saving the board
changed the track order, so there was no pad connected.  It was still in
the connectivity database, just not at the first track

(cherry picked from commit 2485e9a38a)
2023-07-20 15:57:04 -07:00
Jeff Young bac1fb18f0 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008

(cherry picked from commit d9a77e6a64)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15231
2023-07-20 12:45:38 -07:00
Seth Hillbrand 391204ea0d Update QA boards' fills 2023-07-20 12:08:24 -07:00
jean-pierre charras 810f3efcbb PANEL_PREVIEW_3D_MODEL: Always shows the footprint not flipped, and rot 0.
Otherwise, setting the 3D shapes rotation/position is not so easy.
From master branch
2023-07-20 19:05:58 +02:00
Seth Hillbrand e4a80d887a Refill legacy zone fills on open
Previous check only looked for the existence of a new (as of v6) flag
that controlled which strategy we took.  Previous versions did not write
this flag and so will not hit the check. This works around a missing
version bump from when the feature was introduced.

(cherry picked from commit 6a09cf3551)
2023-07-19 14:52:28 -07:00
Alex Shvartzkop 45d496bd01 Altium PCB: fix orientation of polygons and non-Cu pads in footprints.
Fixed in master by bbd6c80507
2023-07-20 01:14:34 +05:00
Ian McInerney 20a5b2d4c4 Don't try to enable sequential mode on non-existant files on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15222

(Cherry-picked from c26863cc1e)
2023-07-18 21:04:16 +01:00
jean-pierre charras cc2637b310 Symbol editor, DIALOG_FIELD_PROPERTIES: fix missing initialization of font.
In Symbol editor, trying to change the font of a field did nothing.
From master branch
2023-07-18 19:41:56 +02:00
Mark Roszko 3fc404cd25 Add missing imm32 lib link 2023-07-17 10:37:17 +00:00
Mark Roszko e016fa913f Backport change to block IME on the canvas itself 2023-07-17 02:07:07 +00:00
Jeff Young e1c6f4f58f Repair new switch-based Global Update Text & Graphics.
We were forgetting to handle wire and bus labels.
2023-07-16 20:24:20 +01:00
Jeff Young c50888fc79 Use loaded colours for DNP symbol.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15203

(cherry picked from commit 89e2cb0b85)
2023-07-16 20:06:41 +01:00
Jeff Young 7c0a911e9f Override FOOTPRINT::GetCenter() to ignore text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209

(cherry picked from commit c2e7827774)
2023-07-16 20:06:23 +01:00
Jeff Young 0562776b7a Fix logic errors in DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem().
(We can't exit out if it doesn't match a particular type as we haven't
checked the other types yet.  Use a switch to prevent this.)

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

(cherry picked from commit a16033f624)
2023-07-16 20:04:43 +01:00
Jeff Young 9cf79ffb5a Pick up snapped item's line properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15192

(cherry picked from commit 89780d353a)
2023-07-16 20:03:03 +01:00
Jeff Young 63b0ef65e0 Try both ends to see if one is a wire.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15178

(cherry picked from commit 5f8583cd25)
2023-07-16 20:02:29 +01:00
Jeff Young 62bf6a9d57 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896

(cherry picked from commit df63ca0189)
2023-07-16 20:01:26 +01:00
Jeff Young 4ad6244d8d Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153

(cherry picked from commit 5bf257cdf6)
2023-07-16 19:45:13 +01:00
Mark Roszko b2f72020bd Add policy to alter curl revoke settings on windows 2023-07-14 00:06:42 +00:00
Marek Roszko d73f96e3d8 Add support for enum based policies
(cherry picked from commit b0fa2561b6)
2023-07-14 00:04:31 +00:00
jean-pierre charras f8210e4a2a Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
From Master branch
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 11:09:59 +02:00
Seth Hillbrand 1ccaf45740 Record hole knockouts in zone filler earlier
Spokes are placed across an entire pad when filling, so the hole
knockouts need to knocked out prior to deflating

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

(cherry picked from commit 3030c80de7)
2023-07-12 11:18:40 -07:00
jean-pierre charras d268ccea5b PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.
Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
From Master branch
2023-07-12 16:42:19 +02:00
jean-pierre charras 10efb6e55a PCB_TEXT::TransformTextToPolySet() fix a typo that can creates a *lot* of
segments in polygon.
Fixes #15161
https://gitlab.com/kicad/code/kicad/-/issues/15161
2023-07-11 13:12:47 +02:00
Marek Roszko 171c44507a Add env variable to turn on curl verbose 2023-07-10 21:40:50 -04:00
Alex Shvartzkop 9514f057dc Non-Windows uses libs3d_plugin prefix for S3D plugins.
https://gitlab.com/kicad/code/kicad/-/issues/12871
(cherry picked from commit e43c8fcf6b)
2023-07-10 20:18:47 +05:00
Alex Shvartzkop e154857aca Filter S3D plugins by name when running from build dir.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12871

(cherry picked from commit 0781d8c175)
2023-07-10 20:18:47 +05:00
Alex Shvartzkop 59c06bcaf1 OpenGL GAL: fix reserved vertices calculation in drawSegmentChain.
(cherry picked from commit 6a123e2381)
2023-07-10 20:18:47 +05:00
Jeff Young 17f02b2ff0 Disable positioning tools when a move is in progress.
Also fixes a typo in EDIT_TOOL::doMoveSelection().

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

(cherry picked from commit 7ed5963b4f)
2023-07-09 22:01:06 +01:00
Jeff Young 6316b78a5e Add SHORT_NET_NAME processing to footprint variable resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15095

(cherry picked from commit def1a9f39c)
2023-07-09 21:56:22 +01:00
Jeff Young e53269c37f Don't DisplayCurrentSheet() if we're already on it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14305

(cherry picked from commit efac777f28)
2023-07-09 21:55:54 +01:00
Jeff Young a43adf7d4f Allow routing to a free pad (even if it has a hole).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15093

(cherry picked from commit 6da71e5d24)
2023-07-09 21:55:21 +01:00
Jeff Young 16d24d4b43 Tailor inspector text properties for dimension objects.
(cherry picked from commit 50da4e483e)
2023-07-09 21:54:52 +01:00
Jeff Young 4a3ae82748 Don't process SCINTILLA_TRICKS onCharHook when autocomplete is active.
(ESC being the exception that proves the rule.)

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

(cherry picked from commit c2f2247ae3)
2023-07-09 21:54:00 +01:00
Jeff Young 60fe2ce30e Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash.

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

(cherry picked from commit 3bdc66d3ed)
2023-07-09 21:53:32 +01:00
Jeff Young b294530716 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 21:39:18 +01:00
Jeff Young 0652267d00 Don't reset page unless we have to.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15033

(cherry picked from commit f892194be4)
2023-07-09 21:08:52 +01:00
Jeff Young b857374aa2 Don't consider a group to be on a copper layer.
Its members can be on copper layers, but the group itself isn't on any
layer.

Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes.  (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)

Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.

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

(cherry picked from commit 40abb013ec)
2023-07-09 21:08:52 +01:00
Jeff Young 480ce08d39 Clear arcs before deflating area outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15007

(cherry picked from commit 4473ebb02d)
2023-07-09 21:08:52 +01:00
Jeff Young 63f33a42e3 Don't trip over null strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989

(cherry picked from commit ecb2fcd559)
2023-07-09 21:08:51 +01:00
Jeff Young f6d1baa50a Refine track dangling test.
Turns out Clean Up Tracks and Vias wants a different answer from DRC.

(cherry picked from commit fb40c202a1)
2023-07-09 21:08:51 +01:00
Jeff Young 0df1ec8765 Track not dangling if entirely covered by pad.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14211

(cherry picked from commit 4e3730f653)
2023-07-09 21:08:51 +01:00
Jeff Young 19e128041b Handle some Mac-standard keyboard shortcuts in Scintilla.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973

(cherry picked from commit b3235ce667)
2023-07-09 21:08:51 +01:00
Jeff Young 76f8b3df22 Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

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

(cherry picked from commit ef6866757e)
2023-07-09 21:08:51 +01:00
jean-pierre charras e1e791fc75 *.wks files: always save text font when it is not the default font.
From Master branch
Fixes #15154
https://gitlab.com/kicad/code/kicad/-/issues/15154
2023-07-09 11:51:58 +02:00
Alex Shvartzkop bbf59a731d EAGLE PCB import: fix footprint text alignment.
(cherry picked from commit a80ac8286d)
2023-07-09 05:46:12 +05:00
Alex Shvartzkop 803bcbbea0 Altium PCB import: fix text positioning when not bottom-left aligned.
(cherry picked from commit 536744d37a)
2023-07-09 05:46:12 +05:00
Alex Shvartzkop 6f384c8802 Altium schematic: import net label justification.
(cherry picked from commit 37772ac29e)
2023-07-09 05:46:11 +05:00
Alex Shvartzkop d6eb66c738 PDF plotting: Fix "Show Page" in Foxit PDF Reader.
pageNum is an Integer. Acrobat seems to convert automatically.

(cherry picked from commit 698fffb128)
2023-07-09 05:46:11 +05:00
Alex Shvartzkop 7078381175 Eeschema printing: fix bg fill when paper orientation or size differs.
(cherry picked from commit 86458ae582)
2023-07-09 05:46:11 +05:00
Alex Shvartzkop 0ffef66cb6 Fix bitmap transparency in Cairo GAL.
Cairo ARGB32 format needs alpha pre-multiplied with color.

(cherry picked from commit f286015bc7)
2023-07-09 05:46:11 +05:00
Alex Shvartzkop dfc17244d4 Perf: don't search for niluuid items when moving cursor in eeschema.
Reduces CPU usage by 60% in some cases.

(cherry picked from commit 55b31030c0)
2023-07-09 05:46:11 +05:00
Mark Roszko ecb9f607ed Move kicad-vcpkg forward to pickup new opencascade 2023-07-08 14:18:19 +00:00
Mark Roszko 35126ba22c const bool is just bool
(cherry picked from commit e53e571d2d)
2023-07-08 01:04:30 +00:00
Simon Richter 5cdf03ff6d Do not fail formatting test when reusing a build env 2023-07-08 00:18:18 +00:00
Seth Hillbrand d128b30279 Move some DRC regression tests
The RegressionZoneFillTests handle issues that are resolved by the zone
filler, so Clipper2 problematic fill belongs there.  Otherwise, the
remaining tests should not refill the zones before running DRC because
we expect the DRC to catch errors without needing a refill

(cherry picked from commit 998e749918)
2023-07-07 12:12:13 -07:00
Seth Hillbrand cadea90109 Check for zone-zone overlap
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps

(cherry picked from commit 954b265839)
2023-07-07 12:03:58 -07:00
Marco Ciampa 90d1695bbc Updated Italian translation 2023-07-07 10:25:11 +02:00
jean-pierre charras 713cb032b5 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
From master branch (commits 355575e4, 1698fb66 and 965aaa21)
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-07-06 19:57:49 +02:00
Marek Roszko 24ed144200 Fix EDA_TEXT creation that worked due to implicit cast
A leftover from the units object rework and I forgot to double back. The DEFAULT_SIZE_TEXT is set inside the constructor now


(cherry picked from commit b5e420c33c)
2023-07-05 13:16:10 +00:00
Simon Richter ebc584b2a7 Fix keyword order in include setup (Closes: #15081)
The SYSTEM keyword can only be used before a visibility keyword, so
"PUBLIC SYSTEM" declares an include directory named "SYSTEM".
2023-07-05 12:16:24 +00:00
Wayne Stambaugh dcef21676d Begin version 7.0.7 development. 2023-07-05 08:03:53 -04:00
Wayne Stambaugh ff2da496af Tag release version 7.0.6. 2023-07-05 08:01:08 -04:00
Steven A. Falco 9d5f85634c Allow python 3.12
(Cherry-picked from 2c983155a4)
2023-07-05 10:45:23 +01:00
Wayne Stambaugh 7efda5fbbd Tag stable release candidate 7.0.6-rc3. 2023-07-02 07:25:23 -04:00
Jeff Young 60696a895c Add DRC testing for copper graphic to zone fill collisions. 2023-06-30 11:56:40 +01:00
Seth Hillbrand 8b26f50003 SIM_VALUE stores significants in 64-bit
stol isn't neccesarily 64-bit though, so we use stoll and catch the
overflow if we have bad input data

Fixes KICAD-2EF

(cherry picked from commit 7779a01d48)
2023-06-29 10:45:29 -07:00
Fabien Corona bf78ac7a6c IBIS: model type should not be case sensitive
Fixes #15068


(cherry picked from commit 8abb701727)
2023-06-28 21:03:49 +00:00
Seth Hillbrand f9e9ed53f9 Update translations 2023-06-27 15:33:46 -07:00
Seth Hillbrand d727063036 Reset turkish translation to Mar 18 2023-06-27 15:33:27 -07:00
Jan Straka 26f69bccef Translated using Weblate (Czech)
Currently translated at 91.5% (7334 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-06-27 15:31:00 -07:00
Jan Straka 95f991b5de Translated using Weblate (Czech)
Currently translated at 91.3% (7323 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-06-27 15:30:59 -07:00
Wellington Terumi Uemura 2a4b72246b Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-06-27 15:30:09 -07:00
Allan Nordhøy e62c9d89b1 Translated using Weblate (Norwegian Bokmål)
Currently translated at 61.1% (4900 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nb_NO/
2023-06-27 15:29:42 -07:00
Seth Hillbrand 3926173dfe Fix zone fill issue with net ties
A mistake in the cherry-pick for a previous commit prevented footprint
graphics from being knocked out in the zone fill.  This sets the default
to knockout, allowing the assertion from the polygon generation routine
to catch invalid codes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15069
2023-06-27 12:35:42 -07:00
Seth Hillbrand 9098a7c128 Add QA test to guard net ties
The QA checks that net-ties correctly knock out the zone fill underneath
them.
2023-06-27 12:27:34 -07:00
Wayne Stambaugh d77de385f0 Tag stable release candidate 7.0.6-rc2. 2023-06-26 16:05:47 -04:00
Seth Hillbrand 7bcd3e2262 Cherry-pick part of 14f6e32
This brings EDA_DRAW_FRAME::LockFile into compliance with the lockfile.h
status code.  This was part of a larger commit in the master branch but
the return code checking is needed for v7
2023-06-23 14:11:23 +02:00
Tomasz Wlostowski 2f35d97b27 router: when no collision search context is provided, assume differentNetsOnly is true
(cherry picked from commit a0a68d198c)
2023-06-23 07:55:50 -04:00
Tomasz Wlostowski 152dc56df4 router: provisional fix for 14926
(cherry picked from commit bd5954242e)
2023-06-22 12:54:22 -04:00
Seth Hillbrand 32930319ea Check for directory locking not file
When creating a new file lock, we need to check if the containing
directory can be written, not if the file (which may not yet exist) can
be written

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

(cherry picked from commit 6896148a10)
2023-06-21 14:53:33 +02:00
Seth Hillbrand 2e54232181 Fix LOCKFILE fallback
`throw` needs to provide an actual std::exception or it will not be
caught

(cherry picked from commit 844226e6b9)
2023-06-21 14:53:33 +02:00
Seth Hillbrand 8648017b42 Prevent ro directories from showing lockfile error
(cherry picked from commit d94fd5f979)
2023-06-21 14:53:33 +02:00
jean-pierre charras f974c8259e spice_library_parser: catch an exception thrown when a spice model cannot be built.
Fixes #15012
https://gitlab.com/kicad/code/kicad/-/issues/15012
2023-06-20 10:34:50 +02:00
jean-pierre charras f6f99e45b9 Pcbnew, graphic importer: convert arc with large radius to segment.
Arcs having a too large radius cannot be safely handled.
The criteria (not perfect) is radius < INT_MAX/2 to use arcs
Fixes #14210
https://gitlab.com/kicad/code/kicad/-/issues/14210
2023-06-19 10:46:30 +02:00
Seth Hillbrand 414fca0664 Update Translations 2023-06-18 15:39:30 +02:00
turkce 2641a0d98e Translated using Weblate (Turkish)
Currently translated at 71.9% (5764 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-06-18 15:37:56 +02:00
Henrik Kauhanen 53e8d68878 Translated using Weblate (Swedish)
Currently translated at 99.9% (8010 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-06-18 15:37:56 +02:00
ZbeeGin 7a6d0c3432 Translated using Weblate (Polish)
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-06-18 15:37:56 +02:00
Toni Laiho b049902925 Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-06-18 15:37:55 +02:00
turkce a8289c3223 Translated using Weblate (Turkish)
Currently translated at 57.9% (4647 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-06-18 15:37:55 +02:00
Julian Daube e46d742d6c Translated using Weblate (German)
Currently translated at 99.6% (7986 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-06-18 15:37:55 +02:00
Jan Straka 24d996c8c4 Translated using Weblate (Czech)
Currently translated at 91.3% (7322 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-06-18 15:37:55 +02:00
Tokita, Hiroshi 8b2cdc434b Translated using Weblate (Japanese)
Currently translated at 99.9% (8010 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-06-18 15:37:55 +02:00
ZbeeGin a7c4f15fea Translated using Weblate (Polish)
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-06-18 15:37:55 +02:00
김랑기 05b0cc9e76 Translated using Weblate (Korean)
Currently translated at 99.8% (8001 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-06-18 15:37:55 +02:00
Hubert Hu 495aaa4c56 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-06-18 15:37:55 +02:00
Bas Wijnen b57ba269a6 Translated using Weblate (Dutch)
Currently translated at 84.1% (6742 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-06-18 15:37:54 +02:00
ZbeeGin 4948eb0d45 Translated using Weblate (Polish)
Currently translated at 99.8% (8000 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-06-18 15:37:54 +02:00
Bas Wijnen e5e6b9e820 Translated using Weblate (Dutch)
Currently translated at 83.8% (6721 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-06-18 15:37:54 +02:00
Tokita, Hiroshi 1c2b236c86 Translated using Weblate (Japanese)
Currently translated at 99.9% (8007 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-06-18 15:37:54 +02:00
Toni Laiho 6ca66a04da Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-06-18 15:37:54 +02:00
Karl SCHUH 2595be63a1 Translated using Weblate (German)
Currently translated at 99.6% (7984 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-06-18 15:37:54 +02:00
Hubert Hu c31b36975d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-06-18 15:37:54 +02:00
Hubert Hu 73a2fcd301 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8012 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-06-18 15:37:54 +02:00
Wellington Terumi Uemura 00b0a7c811 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-06-18 15:37:53 +02:00
Jan Straka 2ef93cad44 Translated using Weblate (Czech)
Currently translated at 91.1% (7306 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-06-18 15:37:53 +02:00
Seth Hillbrand d3aa304556 Fix MSW and OSX kiplatform io libs
Takes fixes from master branch.  Includes ff072feeb4
2023-06-18 15:35:21 +02:00
Wayne Stambaugh 228927b4e9 Tag stable release candidate 7.0.6-rc1. 2023-06-17 19:33:44 -04:00
Seth Hillbrand 6fc393c7db Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

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

(cherry picked from commit 122be418bb)
2023-06-18 01:06:40 +02:00
Seth Hillbrand 361fdcce1b Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

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

(cherry picked from commit 48ecd742eb)
2023-06-18 01:06:14 +02:00
Jeff Young 12cf696097 Tab-order fix provided by aris-kimi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:34:52 +01:00
Jeff Young e7ae6cd190 Recompute intersheet refs while printing.
Also fixes a bug where the schematic offset wasn't being added to
intersheet refs when printing.

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

(cherry picked from commit e3eb0abc5f)
2023-06-17 18:12:44 +01:00
Jeff Young 61dfe4ef07 Don't leave selection lying around when swapping out footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14971

(cherry picked from commit da558f57d4)
2023-06-17 17:30:24 +01:00
Jeff Young d3099ecf75 Don't create 22.5-degree gateways if we're not cardinal or diagonal.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14984
2023-06-17 16:05:07 +01:00
Jeff Young c183e3f342 Cleanup. 2023-06-17 16:04:56 +01:00
Alex Shvartzkop a5ded3341a Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).

(cherry picked from commit d3be62f644)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop bb15c56a2d PAGED_DIALOG: make sure the dialog is big enough to contain page.
(cherry picked from commit 6ace80700e)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop c61931996a PAGED_DIALOG: allow setting initial size in ctor.
(cherry picked from commit f5da58e17d)
2023-06-17 15:19:26 +03:00
Alex cb6c91be06 Center calculator grid cells, sync font styles with fbp.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14743

(cherry picked from commit d945b76c65)
2023-06-17 15:19:26 +03:00
Alex bfcdec47c1 Move bitmap setup to ctor in eeschema annotation options.
(cherry picked from commit 26c25c5475)
2023-06-17 15:19:25 +03:00
Jeff Young c0445ed857 Reset session drawing props after Board Setup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14932

(cherry picked from commit 9ed2458f00)
2023-06-17 13:04:48 +01:00
Wayne Stambaugh 4e79d1ecdd Command line PCB gerber export fix and improvement.
The --board-plot-params argument was never parsed so it was always ignored.

[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
        file extension (gbr) instead of the Protel gerber file extensions.
2023-06-16 07:14:37 -04:00
jean-pierre charras 4306af3ef3 Plot Solder mask layer: do not add items on edge_cut, but not on mask layer
it happened only when creating a solder mask plot with a minimum thickness.
This was a legacy option, incorrect now.
Fixes #14960
https://gitlab.com/kicad/code/kicad/-/issues/14960
2023-06-16 10:01:29 +02:00
Jeff Young a01f9f99f4 More protection around an exceedingly dangerous hack.
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).

(cherry picked from commit 46564055f4)
2023-06-14 13:57:27 +01:00
Alex Shvartzkop 08186f4131 Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.
Assert handler is already being called from wxCHECK.


(cherry picked from commit dfb05c4f4b)
2023-06-14 04:46:06 +00:00
jean-pierre charras bdc9807dee Pcbnew: fix crash when selecting a footprint due to a not initialized pointer 2023-06-13 11:37:12 +02:00
Marco Ciampa d77180d9b5 Small fix in Italian translation 2023-06-12 14:32:55 +02:00
Jeff Young b0bcaa971e BoardDesignSettings are owned by FOOTPRINT_EDITOR_SETTINGS in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14925
2023-06-12 10:08:09 +01:00
jean-pierre charras 4294202074 gr_basic.cpp: ensure a pen with width = 0 is transparent.
Setting its color to COLOR4D::UNSPECIFIED (i.e. opacity = 0) is not enough
for all  platforms (i.e. Windows)
From master branch
Fixes #14915
https://gitlab.com/kicad/code/kicad/-/issues/14915
2023-06-12 08:45:01 +02:00
Jeff Young 1e013274c2 Fix broken build. 2023-06-11 22:35:54 +01:00
Jeff Young 39c7024f12 Make sure infobar gets created earlier.
(restoreLastFootprint() might want it.)

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

(cherry picked from commit 3159391e28)
2023-06-11 22:32:05 +01:00
Jeff Young 375f3a7164 Remove double call to Destroy() for DISPLAY_FOOTPRINTS_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928

(cherry picked from commit bae8a077b9)
2023-06-11 22:31:27 +01:00
Jeff Young 370bdef8d0 Clear the playerFrame lookup cache when closing frames.
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....

This is an attempt to fix KICAD-39.

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

(cherry picked from commit d6aefc458c)
2023-06-11 22:31:24 +01:00
Jeff Young 7b1e75e6ed Don't accidentally add NULL ptrs to the LibSymbols cache.
Operator[] will add a blank element if it isn't found in the map.

Probably Sentry KICAD-23Y.

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

(cherry picked from commit 96073402ce)
2023-06-11 22:31:18 +01:00
Jeff Young 5c1a089981 Re-create missing exclusion markers if DRC was cancelled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14919

(cherry picked from commit 93789e75b9)
2023-06-11 22:31:13 +01:00
Jeff Young cfb59094fe Make sure infobar gets created earlier.
restoreLastFootprint() might want it.

(cherry picked from commit 4fc6047f91)
2023-06-11 22:30:43 +01:00
Jeff Young 7d30a2bc54 Make FOOTPRINT_PREVIEW_PANEL a FPHOLDER.
Also makes sure it get its user_units set up.

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

(cherry picked from commit d18b0c62f6)
2023-06-11 22:30:16 +01:00
Jeff Young 472879e95a Check for proxy references and values in Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14911

(cherry picked from commit 111d0a2c14)
2023-06-11 22:07:26 +01:00
CraftedNightmare 7027d02f94 Fix Search pane not remembering docking sizes and positions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120


(cherry picked from commit d94e9b31b1)
2023-06-11 20:24:41 +00:00
Salvador E. Tropea 561441b48a Adds the missing plot formats to kicad-cli sch export 2023-06-11 13:56:24 -04:00
Jon Evans fe5c7a60ab Net Inspector: clear sort ordering during rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697


(cherry picked from commit 3a2cc8f56f)
2023-06-11 17:16:57 +00:00
Alex Shvartzkop 1a3dc72af8 Avoid deadlock when OpenGL context can't be created.
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.

(cherry picked from commit eaf65f7d53)
2023-06-11 20:12:22 +03:00
Nils VAN ZUIJLEN c919694f37 cli: add an option to the pcb exports for plotting negative svg and pdf
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-10 14:50:27 -04:00
Jeff Young 6fbdf8f0e2 Handle Altium dimension angles and non-unit suffixes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13751

(cherry picked from commit 97cf7c874e)
2023-06-10 10:57:14 +01:00
Jeff Young 4060ec3038 Treat canvas item as current when tree view contains no selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702

(cherry picked from commit 1528f4700c)
2023-06-10 10:57:14 +01:00
Jeff Young 32626970a0 Prevent Sentry KICAD-MM crash.
It'd be nicer to know what happens, but we don't have a reproducible
case, so this "fix" will at least prevent that particular crash.

(cherry picked from commit 0091b9f897)
2023-06-10 10:57:14 +01:00
Jeff Young bc0a53a226 Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.

(cherry picked from commit f3d3ade1dc)
2023-06-10 10:57:14 +01:00
Jeff Young b6a044111b Exclude redraws during closing (particularly of RATSNEST_VIEW_ITEM).
(cherry picked from commit 7a3a8b67c1)
2023-06-10 10:57:14 +01:00
Jeff Young 3c4286c98b Force re-word-wrapping of PCM package descriptions on Mac.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13328

(cherry picked from commit c7730eae3f)
2023-06-10 10:57:14 +01:00
Jeff Young 6d996e31b8 Don't dim SCH_FIELDs when selecting them.
(They were only getting drawn on top of the selection shadow when
drawn by their parent symbol because LIB_FIELD was correctly
setting the view layers but SCH_FIELD was not.)

(cherry picked from commit 2300b0d2a3)
2023-06-10 10:57:14 +01:00
Jeff Young ec4faad589 Don't allow setting a pad width or height of 0.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14278

(cherry picked from commit ddd2cb005b)
2023-06-10 10:57:14 +01:00
Alex 13820bc002 Support --mirror option in "kicad-cli pcb export pdf"
(cherry picked from commit 2450435131)
2023-06-10 04:58:07 +03:00
Alex 6ad9f25e7d Enable support for KICAD_SANITIZE_ADDRESS CMake flag on MSVC.
(cherry picked from commit d5edde799c)
2023-06-09 23:10:44 +00:00
Jeff Young a348fde7d1 Assertion checking for hole/parent ownership mismatch.
(This mismatch is the root of the problem in issue #14852.)
2023-06-10 01:05:00 +02:00
Tomasz Włostowski d25017dd5b router: can't add a clone of a VIA's hole when adding the via to INDEX - this will result in bogus colliding objects
This commit partially reverts deb3cbf8. VIA and SOLID operator='s introduced in it do a good job but the cloning of holes in addHole() causes bogus collisions.
2023-06-10 01:04:49 +02:00
Jeff Young 9b965f367a Prevent use-after-free crashes by not fighting over who owns a HOLE.
The diff-pair placer creates DIFF_PAIRs on the stack, which have
VIAs in them, which have HOLEs in them.  The HOLEs get put in the
NODE's index, and we then crash later when doing a collision after
the stack variable has gone out of scope.

The stack variable is also copied while doing a search for "best",
and without the operator= definitions the "best" and the "original"
both think they own the HOLE.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14852
2023-06-10 01:04:37 +02:00
Tomasz Wlostowski adca34ac6a router: invalidate items freed by PNS::NODE in the clearance cache
This was causing intermittent shove hiccups/freezes as RULE_RESOLVER::GetClearance() could return a bogus clearance value, taking
a cached value for an item that does not exist anymore. If the allocator/stack accidentally reclaimed such item's address - we were getting
very nasty and difficult to reproduce misbehaviours of the shove algorithm. Hopefully this patch fixes this. More info in the comments.

Note to self - I'm still not fully convinced I want PNS::ITEM pointers as the cache key, probably a unique counter would be better here.
2023-06-10 01:04:25 +02:00
Tomasz Wlostowski 51a4a92ec4 router: fix use-after-free crash in drag walkaround mode 2023-06-10 01:04:13 +02:00
Tomasz Wlostowski ae8ea3b938 router: correctly assign owner via/pad to its hole when committing the world state
fixes #14852
2023-06-10 00:27:38 +02:00
jean-pierre charras b57d77dd0b kicad-cli, STEP export: fix incorrect unit when user origin is specifed.
They are specified in mm (or inches), but must be stored in board units in code.
From master branch
2023-06-09 13:43:12 +02:00
Seth Hillbrand d5cbb56160 Fix builds for non-MSW 2023-06-07 08:26:27 -07:00
Seth Hillbrand e97c2a6864 Update Clipper2 to 9d946d7
Fixed a number of smaller issues as well as overlapping segment
cleaning.

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

(cherry picked from commit fe62a3f985)
2023-06-07 08:22:47 -07:00
Marek Roszko 41447e9b44 Experiment with sentry breadcrumbs to footnote kiway events to provide more crash context
(cherry picked from commit 5b5176f104)
2023-06-07 11:02:23 +00:00
David Holdeman 7aa368c2c5 use same flag, fix inversion 2023-06-06 18:20:24 +00:00
David Holdeman 6a00eaa4a3 naively add option 2023-06-06 18:20:24 +00:00
Jeff Young 9240566167 Support shape collisions between SHAPE_POLY_SET and other shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14890

(cherry picked from commit 0f8c5a96b2)
2023-06-06 13:41:37 +01:00
Jeff Young 9eaa5f90e0 Replace larger text bboxes now that we're not using them for knockouts.
(cherry picked from commit 570978fa7f)
2023-06-06 11:19:41 +01:00
Jeff Young 214f785c97 Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).

(cherry picked from commit c71cf21e2f)
2023-06-06 11:19:41 +01:00
Jeff Young ae0534cbb4 Account for changes to mimic 6.0 text positioning in bounding boxes.
This is only a partial fix as knockout text is still busted....

(cherry picked from commit dacf0b2b96)
2023-06-06 11:19:41 +01:00
Jeff Young f3c5c458c6 Formatting.
(cherry picked from commit 6b0bff2f4f)
2023-06-06 11:19:41 +01:00
Marek Roszko d6fd5598ab Use the correct printf format for the move individually status text
Fixes sentry KICAD-1ZT


(cherry picked from commit b41606ecf7)
2023-06-05 13:55:52 +00:00
Mike Williams c41b334f0a LibTree: add numpad enter as enter
Written by Andrej Valek
2023-06-05 09:22:04 -04:00
Mike Williams c3a6bf3d40 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-06-05 08:58:50 -04:00
Jeff Young cb7aa5143b Correctly handle hidden columns when pasting into grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14844

(cherry picked from commit f9fd37c4ca)
2023-06-04 21:24:35 +01:00
Jeff Young 8942abfc64 Handle through-hole via walls along with pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14757

(cherry picked from commit cb7f314f4b)
2023-06-04 21:22:37 +01:00
Jeff Young e5ef973d52 Trim solder paste (and other layers) to holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8484

(cherry picked from commit b53bc1ae38)
2023-06-04 21:22:31 +01:00
Jeff Young 0bd45f691e Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)

(cherry picked from commit c36b0fcda7)
2023-06-04 21:22:19 +01:00
Jeff Young 117c70ed7d Don't double-up FUTURE_FORMAT_ERROR problem strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14780

(cherry picked from commit e82e4af483)
2023-06-04 21:21:18 +01:00
Jeff Young d09f88d53b Every time I search for SCH_TEXT* it doesn't work....
(cherry picked from commit b8986709bf)
2023-06-04 21:15:36 +01:00
Jeff Young 06f17d9415 Don't call OnPageSettingsChanges on Undo/Redo.
It's incredibly expensive (multiple seconds on a document with
lots of text in an outline font).

(cherry picked from commit 81d7428fd2)
2023-06-04 21:15:30 +01:00
Jeff Young c1d8e979f3 Spread the error-bar move evenly around justified text.
(cherry picked from commit 3ab9175553)
2023-06-04 21:15:22 +01:00
Jeff Young 16f286735d Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

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

(cherry picked from commit f35a88ce0b)
2023-06-04 21:11:06 +01:00
Jeff Young 45c7490180 Outline font performance improvements.
1) Don't fracture font glyphs when generating them; we're going
   to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
   It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.

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

(cherry picked from commit 4ed267394a)
2023-06-04 20:57:14 +01:00
Jeff Young 1566b357cb Improve appearance of stroked knockout text.
(cherry picked from commit ff37ebe61a)
2023-06-04 20:56:05 +01:00
Seth Hillbrand 7d9222926a Connectivity: Correct alias-based bus resolution
Aliases in bus resolution were being resolved without a path, making
them effectively global nets.  This applies the corrected path to the
bus members and adds a QA to catch this error
2023-06-02 14:25:26 -07:00
Alex b957d5176e Fix view shifting when infobar is shown.
(cherry picked from commit df4fefeb20)
2023-06-02 18:07:48 +03:00
Jeff Young e76a520c19 Bug fixes for handling boolean flags in DRC rules.
(cherry picked from commit cb53a18ee3)
2023-06-02 00:20:11 +01:00
Jeff Young f0d205fed9 Don't use GetValueFieldText from within text var resolution.
(It resets the recursion checker.)

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

(cherry picked from commit 5114d3b8c3)
2023-06-02 00:17:35 +01:00
Marek Roszko 42811d0602 Fix blank symbol svg export file names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14857


(cherry picked from commit c2d56eefb9)
2023-06-01 00:56:40 +00:00
jean-pierre charras b54c03f89e Cvpcb: the footprint viewer use the settings of pcbnew, and the code in _pcbnew.dll/so
So ensure they are loaded before creating the footprint viewer.
Fixes #14850
https://gitlab.com/kicad/code/kicad/-/issues/14850
2023-05-30 20:11:15 +02:00
jean-pierre charras 5596790a6e Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is
used to enable/disable the DeMorgan option and tool in toolbar
Fixes #13739
https://gitlab.com/kicad/code/kicad/-/issues/13739
2023-05-29 20:41:35 +02:00
jean-pierre charras e55263be00 Pcbnew: fix crash when trying to save a board with a text with overbar and
using a non Kicad font
PCB_PLUGIN::formatRenderCache() was considering all shapes in cache are polygons,
but this is not true: some items can be stroke shapes.
From stable branch
Fixes #14804
https://gitlab.com/kicad/code/kicad/-/issues/14804
2023-05-29 20:41:35 +02:00
Wayne Stambaugh 441c2b50b9 Fix potential stale pointer bug in schematic highlight connection code.
SCH_CONNECTION objects are temporary and can become stale any time the
connectivity is updated.  Keeping them around to reference later is a
bad idea.  Even if the object pointer is still valid in an SCH_ITEM in
the undo/redo buffers, comparing the pointer against another pointer as
a test to see if they are the same connection is not valid.  Saving the
connection name is safe and ensures the connection is the same even if
the pointers differ.

(cherry picked from commit 831a6d55fc)
2023-05-29 13:55:07 -04:00
jean-pierre charras 0a3f5b65bf Fix last changes in io.cpp for msys2.
- use the same code for msys2 and msvc
- add an option to use a fallback for msys2 if the common code does not compile
2023-05-29 13:38:52 -04:00
Marek Roszko 93c29ad15e Add a sequential read flagged fopen helper
Trying to squeeze out some kind of gain by informing the OS we will read a file sequentially.
In particular our FILE_LINE_READER just uses fgetc until the end
2023-05-29 13:36:06 -04:00
Marek Roszko 8f565ef7f0 Replace the exception handler in another spot 2023-05-28 22:31:29 -04:00
Marek Roszko d97de297af Move 3 more blocks to the common ex handler 2023-05-28 22:31:18 -04:00
Marek Roszko 18ac4c2288 Handle OnKifaceStart exceptions without crashing 2023-05-28 22:30:07 -04:00
Marek Roszko 0c6eb6dec3 Create a central exception handler we can also use to generate sentry events
(cherry picked from commit c5d5450f55)
2023-05-29 02:27:21 +00:00
Jeff Young 4a274709e7 Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

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

(cherry picked from commit 5a9ed66cfd)
2023-05-28 19:19:50 +01:00
Jeff Young c6e4f18d99 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777

(cherry picked from commit 14f004d2a5)
2023-05-28 18:46:39 +01:00
Wayne Stambaugh 0e5155ae2f Fix clipped combobox entry in board editor text box dialog.
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched.  Setting the minimum width
resolved the issue.  This may have been a GTK only issue.

(cherry picked from commit a13a49f45a)
2023-05-28 18:43:32 +01:00
Jeff Young aa78abc649 Manual reimplementation of 84c72b087c
(cherry picked from commit 7cc55d2d3a)
2023-05-28 19:38:27 +02:00
Jeff Young 1c62fc868d Fix more SPICE case-insensitivity bugs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793

(cherry picked from commit 03486443c7)
(cherry picked from commit e5d5335701)
2023-05-28 19:38:27 +02:00
Mark Visser f9c2f03a44 fix bug whereby spice params with capital letters no longer cause an error and data loss
Spice parameters were converted to lower-case before comparison. This is incorrect, as it
is legal and common for spice parameters to contain capital letters (e.g. potentiometers
typically use Rt and SET as their parameters).
Spice parameters are not case sensitive, so the correct behaviour is to instead do a
case-insensitive comparison on the parameter name.

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

(cherry picked from commit 0d235ac64b)
(cherry picked from commit 888a35bbde)
2023-05-28 19:38:27 +02:00
Jeff Young dfd11b7596 Reconcile PNS router with DRC.
Hole-to-hole is only for drilled holes.
NPTH slots also get EDGE_CLEARANCE applied.

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

(cherry picked from commit df763eaf88)
(cherry picked from commit ad9109cad4)
2023-05-28 19:38:27 +02:00
Jeff Young 98796f6250 Reset button applies to resolved page, not lazy page holder.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786

(cherry picked from commit 1057483983)
(cherry picked from commit 232d0e8b6b)
2023-05-28 19:38:27 +02:00
Jeff Young b728251bcc STL is your friend... until it's not.
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.

Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.

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

(cherry picked from commit 7e51077992)
(cherry picked from commit 0d94532df9)
2023-05-28 19:38:27 +02:00
Jeff Young d894faaeaa Pin preferences dialog size.
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.

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

(cherry picked from commit cbf83c4161)
(cherry picked from commit 799302cd6d)
2023-05-28 19:38:27 +02:00
Jeff Young 8b114c81c5 Fix issue with colours in the new lazy-loaded preference panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14784

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

(cherry picked from commit d4c9d9d60a)
(cherry picked from commit c33b3fd314)
2023-05-28 19:38:27 +02:00
Jeff Young 97ffb60f23 Don't consider shorted items when opitmizing ratsnest.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715

(cherry picked from commit 80aef37cc4)
(cherry picked from commit dc50b7b065)
2023-05-28 19:38:27 +02:00
Jeff Young 41b7182661 Lazy loading of stackup UI widgets.
(cherry picked from commit 9481a218c7)
(cherry picked from commit 00a82905ec)
2023-05-28 19:38:27 +02:00
Jeff Young 19e5a231a7 Don't run onPageChanged() event handler during initialization.
(cherry picked from commit 3f44c811c7)
(cherry picked from commit f35ed59868)
2023-05-28 19:38:27 +02:00
Jeff Young 01fcb2276b Move remainder of Board Setup to lazy loading.
(cherry picked from commit 03c9b1c202)
(cherry picked from commit 3cd87c2a44)
2023-05-28 19:38:27 +02:00
Jeff Young 19b4e98ee7 Lazy loading of Schematic Setup panels.
(cherry picked from commit ddc6ecf7be)
(cherry picked from commit 6cbc10db81)
2023-05-28 19:38:27 +02:00
Jeff Young 77c76bbc8a Insta-prefs.
(cherry picked from commit 9ae8255202)
(cherry picked from commit 4c28070449)
2023-05-28 19:38:27 +02:00
Jeff Young 00bb1636da Don't store sizes in panels. Let them auto-lay-out.
(cherry picked from commit 6bf43588bb)
(cherry picked from commit bf4f6cff3c)
2023-05-28 19:38:27 +02:00
jean-pierre charras 50ec496c54 Step exporter: export circular board outlines as cylinder
From master branch, commit 66651327.

(cherry picked from commit 5db9a6af9d)
2023-05-28 19:38:27 +02:00
jean-pierre charras 2b8ad1b65c Eeschema: fix block mirroring of fields attached to labels (all types)
Fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Similar to commit 898d88cc, but for block mirroring.
Fixes #14758
https://gitlab.com/kicad/code/kicad/-/issues/14758

(cherry picked from commit b968bac318)
2023-05-28 19:38:27 +02:00
Wayne Stambaugh 5c5f077a4a Begin version 7.0.6 development. 2023-05-26 08:36:00 -04:00
Wayne Stambaugh b05f6f1614 Tag release version 7.0.5. 2023-05-26 08:35:08 -04:00
Tomasz Wlostowski 0180cb380f router: prevent pushout/bogus collision of via with is own hole (or copper) when dragging
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
2023-05-24 19:47:20 -07:00
Jeff Young 882e48b457 Don't allow collisions with self.
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE.  When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.

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

(cherry picked from commit b442d769fd)
2023-05-24 08:54:27 -07:00
Seth Hillbrand fa56b17c88 Revert "Fix clipped combobox entry in board editor text box dialog."
This reverts commit 7ea907c343.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 6b1c2da867 Revert "Eeschema: fix block mirroring of fields attached to labels (all types)"
This reverts commit b968bac318.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 84eacd13a1 Revert "Step exporter: export circular board outlines as cylinder"
This reverts commit 5db9a6af9d.
2023-05-24 08:54:16 -07:00
Seth Hillbrand b6bd1a9373 Revert "Don't store sizes in panels. Let them auto-lay-out."
This reverts commit bf4f6cff3c.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 7e39411910 Revert "Insta-prefs."
This reverts commit 4c28070449.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 2f3659e7ac Revert "Lazy loading of Schematic Setup panels."
This reverts commit 6cbc10db81.
2023-05-24 08:54:16 -07:00
Seth Hillbrand c0567aa011 Revert "Move remainder of Board Setup to lazy loading."
This reverts commit 3cd87c2a44.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 9b310ab955 Revert "Don't run onPageChanged() event handler during initialization."
This reverts commit f35ed59868.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 5226855158 Revert "Lazy loading of stackup UI widgets."
This reverts commit 00a82905ec.
2023-05-24 08:54:16 -07:00
Seth Hillbrand ee19354484 Revert "Don't consider shorted items when opitmizing ratsnest."
This reverts commit dc50b7b065.
2023-05-24 08:54:16 -07:00
Seth Hillbrand e967020ebe Revert "Fix issue with colours in the new lazy-loaded preference panels."
This reverts commit c33b3fd314.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 7b0d45402a Revert "Pin preferences dialog size."
This reverts commit 799302cd6d.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 714250d9f6 Revert "STL is your friend... until it's not."
This reverts commit 0d94532df9.
2023-05-24 08:54:16 -07:00
Seth Hillbrand b4e3ce1166 Revert "Reset button applies to resolved page, not lazy page holder."
This reverts commit 232d0e8b6b.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 1958cafbdf Revert "Reconcile PNS router with DRC."
This reverts commit ad9109cad4.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 248de56fb0 Revert "fix bug whereby spice params with capital letters no longer cause an error and data loss"
This reverts commit 888a35bbde.
2023-05-24 08:54:16 -07:00
Seth Hillbrand 89349c1084 Revert "Fix more SPICE case-insensitivity bugs."
This reverts commit e5d5335701.
2023-05-24 08:54:16 -07:00
Seth Hillbrand e2c0c6362f Revert "Manual reimplementation of 84c72b087c548829908d7fbbecfd2fa5968cc98b"
This reverts commit 7cc55d2d3a.
2023-05-24 08:54:16 -07:00
Jeff Young 7cc55d2d3a Manual reimplementation of 84c72b087c 2023-05-23 09:40:32 +01:00
Jeff Young e5d5335701 Fix more SPICE case-insensitivity bugs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14793

(cherry picked from commit 03486443c7)
2023-05-23 09:40:32 +01:00
Mark Visser 888a35bbde fix bug whereby spice params with capital letters no longer cause an error and data loss
Spice parameters were converted to lower-case before comparison. This is incorrect, as it
is legal and common for spice parameters to contain capital letters (e.g. potentiometers
typically use Rt and SET as their parameters).
Spice parameters are not case sensitive, so the correct behaviour is to instead do a
case-insensitive comparison on the parameter name.

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

(cherry picked from commit 0d235ac64b)
2023-05-23 09:40:32 +01:00
Jeff Young ad9109cad4 Reconcile PNS router with DRC.
Hole-to-hole is only for drilled holes.
NPTH slots also get EDGE_CLEARANCE applied.

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

(cherry picked from commit df763eaf88)
2023-05-23 09:40:32 +01:00
Jeff Young 232d0e8b6b Reset button applies to resolved page, not lazy page holder.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14786

(cherry picked from commit 1057483983)
2023-05-23 09:40:32 +01:00
Jeff Young 0d94532df9 STL is your friend... until it's not.
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.

Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.

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

(cherry picked from commit 7e51077992)
2023-05-23 09:40:32 +01:00
Jeff Young 799302cd6d Pin preferences dialog size.
While unfortunate (we generally frown on having fixed sizes in
favour of having everything auto-layout), in this case it's a
cost of lazy-loading the panels.

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

(cherry picked from commit cbf83c4161)
2023-05-23 09:40:32 +01:00
Jeff Young c33b3fd314 Fix issue with colours in the new lazy-loaded preference panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14784

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

(cherry picked from commit d4c9d9d60a)
2023-05-23 09:40:32 +01:00
Jeff Young dc50b7b065 Don't consider shorted items when opitmizing ratsnest.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715

(cherry picked from commit 80aef37cc4)
2023-05-23 09:40:32 +01:00
Jeff Young 00a82905ec Lazy loading of stackup UI widgets.
(cherry picked from commit 9481a218c7)
2023-05-23 09:40:32 +01:00
Jeff Young f35ed59868 Don't run onPageChanged() event handler during initialization.
(cherry picked from commit 3f44c811c7)
2023-05-23 09:40:32 +01:00
Jeff Young 3cd87c2a44 Move remainder of Board Setup to lazy loading.
(cherry picked from commit 03c9b1c202)
2023-05-23 09:40:32 +01:00
Jeff Young 6cbc10db81 Lazy loading of Schematic Setup panels.
(cherry picked from commit ddc6ecf7be)
2023-05-23 09:40:32 +01:00
Jeff Young 4c28070449 Insta-prefs.
(cherry picked from commit 9ae8255202)
2023-05-23 09:40:32 +01:00
Jeff Young bf4f6cff3c Don't store sizes in panels. Let them auto-lay-out.
(cherry picked from commit 6bf43588bb)
2023-05-23 09:40:32 +01:00
jean-pierre charras 5db9a6af9d Step exporter: export circular board outlines as cylinder
From master branch, commit 66651327.
2023-05-23 10:25:58 +02:00
jean-pierre charras b968bac318 Eeschema: fix block mirroring of fields attached to labels (all types)
Fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Similar to commit 898d88cc, but for block mirroring.
Fixes #14758
https://gitlab.com/kicad/code/kicad/-/issues/14758
2023-05-23 09:47:29 +02:00
Wayne Stambaugh 7ea907c343 Fix clipped combobox entry in board editor text box dialog.
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched.  Setting the minimum width
resolved the issue.  This may have been a GTK only issue.

(cherry picked from commit a13a49f45a)
2023-05-22 12:06:13 -04:00
Jon Evans b71d66de94 Specctra: remove grouped tracks from group before cleaning up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14763


(cherry picked from commit 27afd22bbf)
2023-05-22 14:58:56 +00:00
Wayne Stambaugh 06043b4a14 Begin version 7.0.5 development. 2023-05-21 16:36:43 -04:00
Wayne Stambaugh d836d7187e Tag release version 7.0.4. 2023-05-21 16:35:11 -04:00
Alex b0ecb5b62d Fix opening boards with deprecated features.
(cherry picked from commit 9d452a6097)
2023-05-20 08:29:23 +03:00
Seth Hillbrand 09febce4ce Update translations 2023-05-18 11:58:33 -07:00
Henrik Kauhanen c5621ff44b Translated using Weblate (Swedish)
Currently translated at 99.9% (8010 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-18 20:53:23 +02:00
dsa-t d58f3114cc Translated using Weblate (Russian)
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-05-18 20:53:23 +02:00
Wellington Terumi Uemura e1caaed3cf Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-05-18 20:53:23 +02:00
Henrik Kauhanen 11959f5023 Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-18 20:53:23 +02:00
Toni Laiho 197e5f920d Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-18 20:53:23 +02:00
Ulices e1300a9342 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-05-18 20:53:23 +02:00
Miklós Márton 524d2572aa Translated using Weblate (Hungarian)
Currently translated at 0.2% (23 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/hu/
2023-05-18 20:53:23 +02:00
Henrik Kauhanen 340bab73f5 Translated using Weblate (Swedish)
Currently translated at 99.9% (8010 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-18 20:53:23 +02:00
dsa-t 8d1529cc48 Translated using Weblate (Russian)
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-05-18 20:53:23 +02:00
Wellington Terumi Uemura c501a73251 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-05-18 20:53:22 +02:00
István Farkas 6b1c02526f Translated using Weblate (Hungarian)
Currently translated at 0.1% (6 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/hu/
2023-05-18 20:53:22 +02:00
Toni Laiho d8d7284c35 Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-18 20:53:22 +02:00
jean-pierre charras a5a8b93a2e Eeschema, directive labels: fix some issues:
- honor mirroring of fields attached to labels (all types)
- fix incorrect orientation of the graphic shape of SCH_DIRECTIVE_LABEL items
after mirroring the item.
Form master branch
Fixes #14758
https://gitlab.com/kicad/code/kicad/issues/14758
2023-05-18 11:22:36 +02:00
jean-pierre charras a72fd0ebdd Simulator: Ensure connectivity is up to date (incremental mode) before building netlist
also: SIM_PLOT_FRAME::onShowNetlist(): verify all symbols are annotated.
2023-05-18 10:45:52 +02:00
Seth Hillbrand d5bd1f5aea Cleanup text alignment between version 6 and 7
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.

This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.

This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes.  The source of these
offsets is atm unclear.

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

(cherry picked from commit 0de24bfd59)
2023-05-17 15:29:49 -07:00
Ian McInerney 17c27d1176 Fix GitLab URLs to point to the correct project page
GitLab 16.0 removes support for URLs that don't contain /-/ after the
repository name, so the report bug feature and various links we had in
the source (including the git-fixes script) would lead to a 404 error.

See GitLab docs for deprecation/removal notice:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=16.0#legacy-urls-replaced-or-removed

(Cherry-picked from 20ec8ed303)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14759
2023-05-17 13:42:48 +01:00
jean-pierre charras df698b9433 NETLIST_EXPORTER_SPICE: add space to the not allowed chars in netnames
Not allowed chars are replaced by '_'
From master branch
Fixes #14724
https://gitlab.com/kicad/code/kicad/issues/14724
2023-05-16 19:50:24 +02:00
Mark Roszko 2ea59ac83a Update file doxygen.yml 2023-05-15 14:28:27 +00:00
Marco Ciampa 4264e5bee3 Updated Italian translation 2023-05-15 10:19:32 +02:00
Jon Evans 411bcc58c5 Use the right path for recursing in text var resolution
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14720


(cherry picked from commit 3686c5b371)
2023-05-14 23:12:30 +00:00
Jon Evans f02cd717bc PNS: Collision search context may be null
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14741


(cherry picked from commit 94130716a5)
2023-05-14 21:21:19 +00:00
Alex 91f40ac779 Make sure text bounding box exists when syncing PNS world.
Based on d790865549

Fixes https://gitlab.com/kicad/code/kicad/issues/14733
2023-05-14 15:37:45 +03:00
Wayne Stambaugh 04ffee8e82 Begin version 7.0.4 development. 2023-05-12 18:28:52 -04:00
Wayne Stambaugh 54253ba8a3 Tag release version 7.0.3. 2023-05-12 18:26:28 -04:00
Seth Hillbrand ddd533ee9c Update translations 2023-05-12 12:57:57 -07:00
taotieren 46133c76b2 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (8011 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hant/
2023-05-12 21:55:02 +02:00
taotieren d4e9ace354 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-12 21:55:02 +02:00
Miklós Márton 88dd914a31 Translated using Weblate (Hungarian)
Currently translated at 37.1% (2976 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/hu/
2023-05-12 21:55:02 +02:00
Toni Laiho ca68d32a47 Translated using Weblate (Finnish)
Currently translated at 99.8% (8002 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-12 21:55:02 +02:00
Ulices 3c86dbe28c Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8013 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-05-12 21:55:02 +02:00
taotieren 400bac868e Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8006 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-12 21:55:02 +02:00
Hubert Hu 7e765db562 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.8% (7998 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-12 21:55:02 +02:00
Jan Straka a993e179ab Translated using Weblate (Czech)
Currently translated at 90.9% (7285 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-12 21:55:02 +02:00
Henrik Kauhanen 5253ff35f1 Translated using Weblate (Swedish)
Currently translated at 99.8% (7998 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-12 21:55:01 +02:00
Wellington Terumi Uemura cba0ec4de5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8014 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-05-12 21:55:01 +02:00
Toni Laiho ed0354dd06 Translated using Weblate (Finnish)
Currently translated at 99.8% (7998 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-12 21:55:01 +02:00
Ettore Atalan d255d6aeeb Translated using Weblate (German)
Currently translated at 99.5% (7981 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-12 21:55:01 +02:00
Ulices 94abd0ee79 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.9% (8013 of 8014 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-05-12 21:55:01 +02:00
dsa-t 6a3cd9c0d7 Translated using Weblate (Russian)
Currently translated at 99.9% (8012 of 8015 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-05-12 21:55:01 +02:00
Seth Hillbrand 81be16d058 Adjust stroke font output to match v6 output
Many minor tweaks were added that changed the output of the stroke font
from v5/v6.  These offsets changed the gerber output expected.  This
reverts the changes to something much closer to the v6 output.  It is
not pixel-perfect but gets very close on most texts.

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

(cherry picked from commit 72267cf9b0)
2023-05-12 12:53:32 -07:00
Alex 3efdc963d8 Revert string change.
String changed in 9466624f9d
2023-05-12 21:26:16 +03:00
Seth Hillbrand a4525bf88c Test for schematic type when changing
The schematic editor undo list may hold page layout types as well

(cherry picked from commit 2ffb58a7e2)
2023-05-12 08:44:22 -07:00
Alex d7c7ff3dad Fix pre-commit symlink
(cherry picked from commit fe2e5cbfa6)
2023-05-12 13:12:50 +00:00
Alex 987aec3fd6 Revert change in git pre-commit hook.
(cherry picked from commit 28fd5f75c8)
2023-05-12 12:51:07 +00:00
Alex d5661c24bd Prevent axes settings from affecting angles in properties panel.
Fixes https://gitlab.com/kicad/code/kicad/issues/14168


(cherry picked from commit f7f15e1ddf)
2023-05-12 12:50:25 +00:00
Alex c3ee1111f9 Fix double negative signs in mask/paste margin overrides.
(cherry picked from commit efbd360440)
2023-05-12 12:45:09 +00:00
Salvador E. Tropea 9c1509b8c3 Provide some degree of compatibility for GetShownText in Python
This patch keeps the new API for GetShownText (argument order inverted), but also allows calling the member without parameters.
2023-05-11 23:39:09 +00:00
Steve Bollinger 1020cdd7a6 pcbnew: switching track posture may not work on first attempt
If you drag a track out and connect to a pad then press the hotkey
to switch the track posture it may not switch because the track
posture selected when the pad was reached is different than the one
that the mouse trail placer drew. As the aspect switching is done
in the mouse trail placer it does not know that the line placer
already override the track.

To correct this, in LINE_PLACER::FlipPosture() if the aspect is not
currently manually forced then copy the current aspect from the
line placer to m_mouseTrailPlacer before calling the FlipPosture()
method of m_mouseTrailPlacer. This will only be done once per
dragging session as once the aspect is manually forced it remains
manually forced. This seems to fix the issue with no undesirable
side effects.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12369
(cherry picked from commit 85f4f0d6c8)
2023-05-11 16:36:21 -07:00
Seth Hillbrand bff2f53996 Correct alpha blending in PDF plot
We fake the alpha channel by pre-multiplying but we forgot to account
for the downscaling of the input channel value in addition to correcting
the alpha * white.  This led to clipping when the values overflowed

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

(cherry picked from commit d405fff1d8)
2023-05-11 16:27:15 -07:00
Seth Hillbrand d5bf831f60 Ensure that even open paths with fills are filled
SVG paths that are "open" can still have a fill internally, so avoid
dropping fills for these non-standard polygons

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

(cherry picked from commit b56db30019)
2023-05-11 16:27:15 -07:00
Seth Hillbrand 6c423be36f Don't consider saving SCH_MARKERs
These are ephemeral, view-only elements, so don't include them in our
save map

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

(cherry picked from commit 7eb728ca12)
2023-05-11 16:27:15 -07:00
Seth Hillbrand 3c33e2c046 3dviewer: Show footprint board regardless of proj
The settings for the project in terms of visibility should not impact
our ability to preview the 3d model of a footprint

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

(cherry picked from commit d7a6875b0b)
2023-05-11 16:27:15 -07:00
Jon Evans 253ff41819 PNS: make sure context options are used in collideSimple
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14659


(cherry picked from commit 89aae88e96)
2023-05-11 20:48:56 +00:00
Jon Evans 24d95b410d PNS: Don't use clearance epsilon for calculating shove distances
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14707


(cherry picked from commit 2e60315959)
2023-05-11 20:48:46 +00:00
Graham Keeth db5aacf984 sim: fix diode model default breakdown voltage
(Cherry-picked from 2970d97bf2)
2023-05-11 13:15:37 +01:00
Graham Keeth 111a56dd8a sim: fixup some diode parameter units
(cherry picked from commit df3560ab8e)
2023-05-11 01:15:52 +00:00
qu1ck d1d0d61b4f Add usable PCB_GROUP::GetItems() swig wrapper
(cherry picked from commit 9b58f50c68)
2023-05-11 01:15:17 +00:00
Martin Thierer 640f279abe Pcbnew: Fix rotating bitmaps
Fixes rotating bitmaps with "rotate counterclockwise",
"rotate clockwise" and "move exactly" commands.

Only rotation by 0, 90, 180 and 270 degrees is supported
for bitmaps. Other values are rounded to the nearest 90
degree multiple.

There is a different bug that this commit doesn't address,
which is that BITMAP_BASE::Rotate() got its CW/CCW logic
reversed ("m_image->Rotate( false )" should rotate CW, but
does not).

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


(cherry picked from commit 45b94a4b3e)
2023-05-11 01:14:34 +00:00
qu1ck 874191bd8d Don't disable reload button in action plugins preferences
(cherry picked from commit a86aa6fc3e)
2023-05-11 01:13:42 +00:00
Salvador E. Tropea 2066af9f28 Fix wxWidgets compilation issue.
wxFileName::GetAbsolutePath was introduced in 3.1.6:
https://docs.wxwidgets.org/3.2.2/classwx_file_name.html#a5ca18cc7b7af3d88a850fad22f993061

This patch is equivalent to the current code:
https://github.com/wxWidgets/wxWidgets/blob/d39aac0fa8882f4a192e760ef2f20c06fe27ce09/include/wx/filename.h#L390
2023-05-10 16:34:46 +00:00
Jon Evans ef7b3c1715 Use constraints to determine netclas width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14190


(cherry picked from commit 61d30ee5bc)
2023-05-10 16:10:30 +00:00
Jon Evans 6eb96851f9 Don't try to open files multiple times
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14703


(cherry picked from commit 09e8f72196)
2023-05-10 16:09:32 +00:00
jean-pierre charras a42ef9de77 Navlib: Ensure a pointer is initialized. 2023-05-10 09:36:51 +02:00
jean-pierre charras fb23fe3084 fix a minor compil warning. 2023-05-10 09:36:51 +02:00
Seth Hillbrand 57f0150a23 Ensure _changed_ netlist is propagated
The propagation is currently (maybe not needed) limited to the global
name that is the source of the change.  We also need to propagate the
global name that is changed in case the global is set in a tree leaf and
not the root

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

(cherry picked from commit 6e4de18e15)
2023-05-09 12:13:30 -07:00
Seth Hillbrand 9b31a986b6 Update translations 2023-05-09 10:38:20 -07:00
Jeff Young 8fa46a1f9e Simplify previous fix to not include new strings. 2023-05-09 18:20:42 +01:00
Jeff Young d805f5ceff De Morgan conversions are equivalences, not additional items to simulate.
Fixes https://gitlab.com/kicad/code/kicad/issues/14230

(cherry picked from commit fdcc97e604)
2023-05-09 18:12:02 +01:00
Seth Hillbrand b4242e562d Update translations 2023-05-09 10:08:45 -07:00
Ivan Chuba 2effa810c1 Translated using Weblate (Ukrainian)
Currently translated at 99.9% (8008 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-05-09 18:49:27 +02:00
Tokita, Hiroshi a78af6acc2 Translated using Weblate (Japanese)
Currently translated at 99.9% (8008 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:27 +02:00
Toni Laiho fc084c84f4 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:27 +02:00
Ulices a846ab7443 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-05-09 18:49:27 +02:00
Ken Ovo 9f53272d34 Translated using Weblate (German)
Currently translated at 99.7% (7993 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-09 18:49:27 +02:00
Hubert Hu aa53aac7be Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-09 18:49:27 +02:00
Tokita, Hiroshi db984fcad9 Translated using Weblate (Japanese)
Currently translated at 99.9% (8008 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:27 +02:00
CloverGit 607713cdae Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-09 18:49:26 +02:00
김랑기 7de0a61de3 Translated using Weblate (Korean)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-05-09 18:49:26 +02:00
Ivan Chuba 1838460c38 Translated using Weblate (Ukrainian)
Currently translated at 99.9% (8008 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-05-09 18:49:26 +02:00
김랑기 3a4e00d0f5 Translated using Weblate (Korean)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-05-09 18:49:26 +02:00
Tokita, Hiroshi a9bd82150b Translated using Weblate (Japanese)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:26 +02:00
Jan Straka de5c3733d0 Translated using Weblate (Czech)
Currently translated at 91.0% (7295 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:26 +02:00
boonchai k 3ff662e710 Translated using Weblate (Thai)
Currently translated at 89.8% (7199 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/th/
2023-05-09 18:49:26 +02:00
dsa-t 669571799b Translated using Weblate (Russian)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-05-09 18:49:25 +02:00
Allan Nordhøy 81a98fc0d3 Translated using Weblate (Norwegian Bokmål)
Currently translated at 61.2% (4906 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nb_NO/
2023-05-09 18:49:25 +02:00
Tokita, Hiroshi f10157fb24 Translated using Weblate (Japanese)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:25 +02:00
Henrik Kauhanen 7d94508257 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:25 +02:00
Jan Straka 262a8607d0 Translated using Weblate (Czech)
Currently translated at 90.7% (7267 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:25 +02:00
Jan Straka fd44a9552a Translated using Weblate (Czech)
Currently translated at 90.4% (7244 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:25 +02:00
Henrik Kauhanen 8e2d6d8cb2 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:25 +02:00
minsu kim (0xGabriel) 13b73cb51f Translated using Weblate (Korean)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-05-09 18:49:25 +02:00
Arnau Llovet Vidal 5f730ba360 Translated using Weblate (Catalan)
Currently translated at 58.0% (4653 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ca/
2023-05-09 18:49:25 +02:00
Andrey Fedorushkov 79dbbadf2d Translated using Weblate (Russian)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-05-09 18:49:24 +02:00
Henrik Kauhanen cd150c265f Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:24 +02:00
Tokita, Hiroshi 7a50a91eab Translated using Weblate (Japanese)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:24 +02:00
Henrik Kauhanen b5561ee5d4 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:24 +02:00
ssantos 8dcda7fe35 Translated using Weblate (Portuguese)
Currently translated at 99.8% (7999 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt/
2023-05-09 18:49:24 +02:00
Mark Hämmerling 9b679cc8dd Translated using Weblate (German)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-09 18:49:24 +02:00
Ivan Chuba 674f8cc936 Translated using Weblate (Estonian)
Currently translated at 4.9% (396 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/et/
2023-05-09 18:49:24 +02:00
Nguyễn Ngọc Khánh 51a43ef45b Translated using Weblate (Vietnamese)
Currently translated at 14.6% (1171 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-05-09 18:49:24 +02:00
Jan Straka acc55d588a Translated using Weblate (Czech)
Currently translated at 90.3% (7241 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:23 +02:00
Ettore Atalan d4990b30e9 Translated using Weblate (German)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-09 18:49:23 +02:00
Jan Straka 920a8d34ea Translated using Weblate (Czech)
Currently translated at 90.4% (7242 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:23 +02:00
Ivan Chuba c8dfcf4b39 Translated using Weblate (Ukrainian)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-05-09 18:49:23 +02:00
Ivan Chuba aa93632707 Translated using Weblate (Estonian)
Currently translated at 4.8% (386 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/et/
2023-05-09 18:49:23 +02:00
Luc cc55262cbc Translated using Weblate (German)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-09 18:49:23 +02:00
Nguyễn Ngọc Khánh f887b62a85 Translated using Weblate (Vietnamese)
Currently translated at 14.6% (1170 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-05-09 18:49:23 +02:00
Toni Laiho 5b20781080 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:23 +02:00
Nguyễn Ngọc Khánh 98a1efc123 Translated using Weblate (Vietnamese)
Currently translated at 14.5% (1169 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/vi/
2023-05-09 18:49:22 +02:00
Hubert Hu a628c1f5e4 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-05-09 18:49:22 +02:00
minsu kim (0xGabriel) 6588e8fabf Translated using Weblate (Korean)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-05-09 18:49:22 +02:00
turkce 52d349538e Translated using Weblate (Turkish)
Currently translated at 49.7% (3982 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-05-09 18:49:22 +02:00
Henrik Kauhanen aad2b3a492 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:22 +02:00
Henrik Kauhanen 93180abf7b Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:22 +02:00
Toni Laiho e30c8d8949 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:22 +02:00
Henrik Kauhanen a90c5d71ad Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:22 +02:00
Toni Laiho 54f56813a5 Translated using Weblate (Finnish)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:22 +02:00
Henrik Kauhanen 8d29229c0f Translated using Weblate (Finnish)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:21 +02:00
Henrik Kauhanen dc498128be Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:21 +02:00
Henrik Kauhanen 6d5b71b663 Translated using Weblate (Finnish)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:21 +02:00
Ulices 122fcbb40b Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-05-09 18:49:21 +02:00
Ivan Chuba 4fc28bb65e Translated using Weblate (Ukrainian)
Currently translated at 99.9% (8008 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-05-09 18:49:21 +02:00
turkce a7f92a3187 Translated using Weblate (Turkish)
Currently translated at 47.8% (3832 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-05-09 18:49:21 +02:00
boonchai k dd16b68623 Translated using Weblate (Thai)
Currently translated at 89.8% (7198 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/th/
2023-05-09 18:49:21 +02:00
Henrik Kauhanen df24d87245 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-05-09 18:49:20 +02:00
ssantos 6000e04c78 Translated using Weblate (Portuguese)
Currently translated at 99.8% (7999 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt/
2023-05-09 18:49:20 +02:00
ZbeeGin 87181a8ecb Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-05-09 18:49:20 +02:00
johanneswilkens 7d0731754c Translated using Weblate (Dutch)
Currently translated at 83.8% (6720 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-05-09 18:49:20 +02:00
Tokita, Hiroshi 962e63ab52 Translated using Weblate (Japanese)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-05-09 18:49:20 +02:00
Toni Laiho 9f4b43f3f2 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-05-09 18:49:20 +02:00
Ettore Atalan ef722200c9 Translated using Weblate (German)
Currently translated at 99.9% (8007 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-05-09 18:49:20 +02:00
Jan Straka 784f47fa86 Translated using Weblate (Czech)
Currently translated at 90.1% (7220 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-05-09 18:49:20 +02:00
turkce 90cdc28707 Translated using Weblate (Turkish)
Currently translated at 43.9% (3521 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-05-09 18:49:19 +02:00
turkce 62844b321c Translated using Weblate (Turkish)
Currently translated at 42.4% (3397 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-05-09 18:49:19 +02:00
Wellington Terumi Uemura 8a6c7f5538 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-05-09 18:49:19 +02:00
Jeff Young 8c3eeb5201 Support for De Morgan variants in symbol plotting CLI.
(cherry picked from commit 8cd1f8d905)
2023-05-09 13:11:06 +01:00
Jeff Young 5998fabadd Formatting.
(cherry picked from commit 4e420f3cf6)
2023-05-09 13:10:31 +01:00
Jeff Young 97be02356f CLang can't do a dynamic_cast across the KiWay.
Rely on DRC for text readability instead.

(Fixes Sentry KICAD-R4 on Mac, and the assert when opening
Preferences from a non-PCBNew-module window.)

(cherry picked from commit 245c3ba6e4)
2023-05-09 11:15:00 +01:00
Jeff Young e59867d479 Add backspace modifier handling to SCINTILLA_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13910
2023-05-08 18:41:13 +01:00
Jeff Young 8e1bcaed37 Holes need a parent.
SetHole() handles all this for us.  Make sure it's called.

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

(cherry picked from commit 5b3798a370)
2023-05-08 14:51:47 +01:00
Jon Evans f3c864c178 PNS: Remove holes when removing items with holes
Related to https://gitlab.com/kicad/code/kicad/-/issues/14702


(cherry picked from commit b06f90335b)
2023-05-08 02:48:55 +00:00
Jeff Young 947923509e Fix a typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14515

(cherry picked from commit 6059e895d7)
2023-05-08 03:32:32 +03:00
Jeff Young 4e0f77c0f4 Don't allow thickness of 0 in case of an empty stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/10790
2023-05-07 22:30:01 +01:00
Jeff Young 6f0505f19c Field bounding boxes no longer contain interline spacing.
That's entirely done through FIELD_PADDING now.

Fixes https://gitlab.com/kicad/code/kicad/issues/14127
2023-05-07 22:30:01 +01:00
Marek Roszko 98bf66cb25 Use _fgetc_nolock with msvc
(cherry picked from commit 5dcc221950)
2023-05-07 21:28:59 +00:00
Jon Evans f9b641b24d Allow for settings to be added during load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14691

(cherry picked from commit 2ab47ee1e9)
2023-05-07 23:48:26 +03:00
jean-pierre charras 3894314ab2 DIALOG_SHIM: fix missing aEvent.Skip() in DIALOG_SHIM::onChildSetFocus().
This method was added in commit a914f6e9.
Missing Skip() created issues on Windows (text edit cursor not shown in dialogs)

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

(cherry picked from commit e208685f85)
2023-05-07 19:16:41 +03:00
Marek Roszko edc9d38680 Change the spacemouse driver flag to true for windows by default
(cherry picked from commit b92f62337f)
2023-05-07 16:12:57 +00:00
Seth Hillbrand ce5f72207e Cleanup printf bits
(cherry picked from commit 990641d2eb)
2023-05-07 19:02:02 +03:00
Marek Roszko ff8d009022 Add missing footprint load progress, usually in schematic editor
(cherry picked from commit c7eaef2d13)
2023-05-07 15:17:27 +00:00
Jeff Young 589c33ec05 Fix capitalization of text vars for Eagle importer.
Also fixes the test gold files to expect the correct variable
references.

(cherry picked from commit 8bd21edd8a)
2023-05-06 23:53:18 +01:00
Jeff Young 28fe5b0df5 Expand solder mask for pads *defined* to be on copper layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/14693
2023-05-06 21:29:18 +01:00
Jeff Young 5a3dfe598f Handle Eagle user-defined attributes.
(We map these to text variables.)

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

(cherry picked from commit 8fe02ee83c)
2023-05-06 21:11:16 +01:00
Jeff Young d0c132ccd4 Defense in depth for "mouse stuck in canvas".
Fixes https://gitlab.com/kicad/code/kicad/issues/12653

(cherry picked from commit 49655ae742)
2023-05-06 11:29:05 +01:00
Jeff Young 826541548c Make sure mouse isn't captured when dialog is raised.
Fixes https://gitlab.com/kicad/code/kicad/issues/14685

(cherry picked from commit c016bea020)
2023-05-06 11:29:01 +01:00
Jeff Young e3adc76a72 Rewrite linebreaking algorithm.
Previous version was overly simplistic to deal correctly
with multiple spaces or textruns not separated by spaces.

Fixes https://gitlab.com/kicad/code/kicad/issues/14683
2023-05-05 22:32:03 +01:00
Wayne Stambaugh 2ae2d7ee1a Verify parent symbol shared pointer is still valid in symbol editor.
(cherry picked from commit 51fd7ca5ed)
2023-05-05 13:50:06 -04:00
Jeff Young e28b50e8d6 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).

(cherry picked from commit b41d446f58)
2023-05-05 18:02:59 +01:00
Wayne Stambaugh 9c78d86f58 Don't include power symbol pin when exporting netlist.
The netlist exporter was never updated to exclude symbols that are
tagged as power symbols.  Only the legacy power symbol name prefix
('#') was used as the power symbol check.  Power symbols no longer
require the '#' name prefix.

(cherry picked from commit fb6b8eaeea)
2023-05-05 11:36:39 -04:00
Marek Roszko a6b23a751e Add env var to force logging on msw
(cherry picked from commit 18dd623122)
2023-05-05 00:59:41 +00:00
Seth Hillbrand 34d5f1f9fe Fix a28d590b9b
Needs to be static, so keep the reference from the associated symbol and
not the SCH_SYMBOL instance.  Both will likely have the same prefix,
which is all we care about here

(cherry picked from commit 2cac992801)
2023-05-04 15:53:15 -04:00
Seth Hillbrand 43ad15dc0e Force not-on-board symbols to NONE priority
Symbols that are not on the board should not affect the arbitrary names
assigned to unlabeled nets.

(cherry picked from commit a28d590b9b)
2023-05-04 15:52:57 -04:00
Jeff Young d20147c79f Use correct sheetpath when exporting netlist.
(cherry picked from commit c20ef06f56)
2023-05-04 14:28:40 +01:00
Jeff Young 7cc014cf9e Be careful of infobar outliving symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/14680
2023-05-04 11:52:02 +01:00
Jeff Young 9e735fc940 First <ESC> after an edit in a textEdit cancels the edit.
(Second will exit the dialog.)

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

(cherry picked from commit a914f6e992)
2023-05-04 11:52:02 +01:00
Jeff Young 4fecf6c50d Add select-all to TEXT_ENTRY_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/14237

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

(cherry picked from commit 9252793fdb)
2023-05-04 11:52:02 +01:00
Jeff Young c31c14e46b Don't call BuildInitialTrace() for entry gateways.
We're going to call it to connect the entry and target gateways
anyway, so all we need are gateways at 22.5 degrees to setup entry
at +/- 45 degrees from the current direction.

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

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

(cherry picked from commit 507a25f150)
2023-05-04 11:52:02 +01:00
jean-pierre charras 349dbb98a6 bom_csv_grouped_by_value_with_fp.py: fix compatibility with python < 3.9
From master branch
2023-05-04 08:54:55 +02:00
Jeff Young f4fa5bb0fc Don't store resolved values in symbol fields table editor dataStore.
We're going to use the dataStore to update the symbol, so
if we store resolved values it will nuke any text variables
even if the field wasn't edited.

Not sure if the BOM generator has a separate resolve-variables
step or not.  But it will need one as the code removed here
only worked for Values and Footprint fields anyway.
2023-05-04 00:08:18 +01:00
Seth Hillbrand 4cdf75dc72 Remove matching parents/neighbors in subgraphs
This ensures that when bus elements or labels matching bus elements are
removed that the stale neighbor/parent references are similarly removed
2023-05-03 13:35:51 -07:00
Seth Hillbrand 53eb39e033 Avoid NaNs when applying fillets
Segments that are inline with each other will create NaNs when
filleting.  This double check prevents NaN points from being added to
the polygon

(cherry picked from commit b72c6e5cb0)
2023-05-03 11:50:47 -07:00
Mark Roszko 57ae43890c Update 5 files
- /eeschema/CMakeLists.txt
- /eeschema/eeschema.cpp
- /pcbnew/pcbnew.cpp
- /qa/qa_utils/pcb_test_frame.cpp
- /qa/unittests/eeschema/test_module.cpp
2023-05-03 17:32:55 +00:00
jean-pierre charras 1c59574cbf FOOTPRINT_EDIT_FRAME: do not delete settings when closing the frame.
They now are read when starting kicad, and must be not deleted.


(cherry picked from commit 0c544f1f45)
2023-05-03 17:27:28 +00:00
Seth Hillbrand 7ddef03aba Initialize settings for SINGLE_TOP
(cherry picked from commit 82ba67db82)
2023-05-03 17:26:57 +00:00
Seth Hillbrand 4258738b89 Remove extraneous symbol editor settings
(cherry picked from commit 2cd861dbd5)
2023-05-03 17:26:26 +00:00
Seth Hillbrand 594864e117 Remove extraneous includes
(cherry picked from commit 892e4536b0)
2023-05-03 17:26:13 +00:00
Seth Hillbrand a5698ce480 Remove locks from settings
Settings should be initialized on start-up.  This removes the option of
lazily loading the settings from file and instead requires all settings
needed to be loaded on KiFACE start before requesting data from the
settings object


(cherry picked from commit e6ab9a88ce)
2023-05-03 17:25:17 +00:00
Seth Hillbrand 1a2c9011e6 Rework Copper Sliver check
Adds QA checks to copper sliver tests.  Adds the following checks:
- Dot product between two arms (quickly avoids checks for >90°)
- Checks the sliver is convex (area test)
- Eliminates minor slivers with angles that are approximately 0 and ones
  with the opposite side width beneath a configurable level
- Updates Clipper2 to fix a couple of jagged edges on inflate
- Adds simplify during zone fill inflation to limit jaggies

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

(cherry picked from commit f7f52d77e4)
2023-05-03 10:22:49 -07:00
Jeff Young 600ac72a3d Add missing property to footprint texts table.
Fixes https://gitlab.com/kicad/code/kicad/issues/14357
2023-05-03 17:58:29 +01:00
jean-pierre charras 1118eed080 Use operator at() instead of [] to access a std::array item
It helps debug.
From Master branch
2023-05-03 17:21:36 +02:00
jean-pierre charras e42c66bd0e Pcbnew: fix crash when loading a file having vias on connected layers only.
It was due to an access out of bounds in a std::array
Fixes #14668
https://gitlab.com/kicad/code/kicad/issues/14668
2023-05-03 17:18:28 +02:00
Jeff Young ff8fae377c Pass aEvent by value.
It will have changed by the time CallAfter() is executed.

Fixes https://gitlab.com/kicad/code/kicad/issues/12475
2023-05-03 12:27:45 +01:00
Jeff Young 6931252ed9 Pull back more sheetPath fixes from master. 2023-05-03 12:04:46 +01:00
Mike Williams ef8e549d86 PCB Search Pane: show Board Setup / Net Classes on net activation
(cherry picked from commit bc8f81b14d)
2023-05-03 11:55:50 +01:00
Mike Williams a5470029a8 PCB Search Pane: activate item opens properties dialog
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12475
(cherry picked from commit 71b687622b)
2023-05-03 11:55:14 +01:00
Mike Williams 13fb23d59d Search Pane: add Activation (enter/double click) event support
(cherry picked from commit d915cb780e)
2023-05-03 11:54:49 +01:00
Jeff Young a3197578d6 Tighten lifecycle management of CN_ANCHOR/CN_ITEM.
In particular, when a CN_ITEM is freed set all its anchor's
item pointers to NULL.  (The anchors have a separate
lifecycle due to being std::shared_ptrs.)

Hopefully fixes Sentry KICAD-KV.

(cherry picked from commit 0eac5c6748)
2023-05-03 10:51:20 +01:00
Jeff Young ebc14b35f5 Commenting and formatting. 2023-05-02 14:14:05 +01:00
jean-pierre charras b0235a2805 3D viewer: use the right color theme (the one used in the board editor)
From Master branch
Fixes #14616
https://gitlab.com/kicad/code/kicad/issues/14616
2023-05-01 17:00:09 +02:00
jean-pierre charras d0069e0e1d specctra_export: fix unit conv PCB iu -> DSN
From Master branch, commit 28028c941e
Fixes #14656
https://gitlab.com/kicad/code/kicad/issues/14656
2023-04-30 20:58:12 +02:00
Jeff Young 878f136951 Extend Mac colour picker cursor fix to GTK.
(cherry picked from commit a3b741a126)
2023-04-30 18:12:04 +01:00
Jeff Young bf364bf74c Go back to winner-takes-all lib-tree scoring algorithm.
(Because we sort alphabetically there's no way to see
what the second-highest scored item was.)
2023-04-30 12:32:19 +01:00
Jeff Young 03c2850c59 Record parent rule for DRC assertions.
(Particularly important if the rule specified a severity.)

Also fixes a bug looking up LSET layer names in the
GetStandardLayerNames array (which aren't the same).

https://forum.kicad.info/t/a-few-questions-about-custom-rules-syntax/40068/7
2023-04-29 21:17:56 +01:00
Jeff Young 4eddc7131d Add Grid Settings to PL_EDITOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/14612
2023-04-29 18:16:51 +01:00
Jeff Young 14be1935e8 Formatting and cleanup. 2023-04-29 18:14:24 +01:00
Jeff Young f08029354a Use wxFileName to resolve . and .. in documentation paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/14564

(cherry picked from commit 08c773a0bf)
2023-04-29 17:52:54 +01:00
Jeff Young c18600b67f Don't reset alpha when specified in hex value.
Also fixes a bug with colour picker cursor drawing on Mac.

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

(cherry picked from commit a817b4c1ff)
2023-04-29 17:52:50 +01:00
Jeff Young 2acc0a6844 Use Net() accessor uniformly; init hole parent in VIA::Clone()
Fixes https://gitlab.com/kicad/code/kicad/issues/14603

(cherry picked from commit 16e000f2b0)
2023-04-28 18:33:27 +01:00
Lucas Dumont 8ffba3a52f Update collide for hole
As hole don't keep track of the net, update the collide function to keep it working

(cherry picked from commit b1a4353c34)
2023-04-28 16:20:31 +01:00
Jeff Young 0fb2f35b10 Fix sheetPath handling in SPICE model generation.
(cherry picked from commit d5cb100f72)
2023-04-28 16:20:03 +01:00
Jeff Young f8270b9cec Tighten ownership model of PNS::ITEM.
In particular, ownership must be explicitly set.  It is
no longer inherited through copy/clone/etc.
2023-04-28 11:03:24 +01:00
Jeff Young d3311ee231 Implement better sheet-path awareness for label text var resolution.
(cherry picked from commit 4b0027a5d7)
2023-04-28 01:02:58 +01:00
Jeff Young 21eb2c8dad Simplify PNS::VIA construction.
(cherry picked from commit 9646e3c1c0)
2023-04-28 00:33:27 +01:00
Jeff Young a11fd7a792 Set currentSheet when exporting netlist.
Patch courtesy of Fernando Gomez.

(cherry picked from commit 5e21e94478)
2023-04-26 18:20:34 +01:00
Seth Hillbrand a2ad9f8b10 Handle multiple holes in footprints
Our basic logic for whether we have a hole or an outline in a footprint
checks if there is copper pads outside of the closed edge.  This misses
the case where the footprint is used to align multiple holes but has no
copper.  Since we do not support multiple outlines in a board, we can
safely assume that multiple, closed edges in a footprint represent holes
and not outlines

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

(cherry picked from commit 4b91c0c8ee)
2023-04-26 09:37:08 -07:00
Lucas Dumont 9a0e2f3395 Fix typo in QueryConstraint switch
(cherry picked from commit 2992d7c68b)
2023-04-26 14:21:38 +01:00
Jeff Young cd9196ddb9 Use fileds from flattened lib symbol when updating.
Fixes https://gitlab.com/kicad/code/kicad/issues/14577

(cherry picked from commit d816fb071f)
2023-04-26 13:04:05 +01:00
Jeff Young c10fe673a2 Don't let add-row processing intercept OK processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14579

(cherry picked from commit 5b56cb6bdb)
2023-04-26 13:04:05 +01:00
Wayne Stambaugh 105f8a1720 Do not close ERC dialog when first error is on a different sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14538
2023-04-26 07:51:32 -04:00
Seth Hillbrand 050f47daf1 Bug Fixes for new incremental connectivity
- Ensure that critical paths (ERC/netlister) are fully-rechecked
- Handle symbol/pin distinction in change markers
- Fully connect hierarchical pins in one pass descending

(cherry picked from commit 6e8a5acc66)
2023-04-25 11:32:59 -07:00
Seth Hillbrand 683abd2029 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

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

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

(cherry picked from commit a154571438)
2023-04-25 11:32:04 -07:00
Seth Hillbrand d08f937932 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes

(cherry picked from commit 2cd854af14)
2023-04-25 11:30:36 -07:00
jean-pierre charras 2f51742311 netlist exporter: export only the field value, even if field name is shown.
Previously, when the field name was visible, the exported field value was
prefixed by the field name, and this is incorrect.
From master branch
Fixes #14611
https://gitlab.com/kicad/code/kicad/issues/14611
2023-04-25 15:17:05 +02:00
Lucas Dumont b926d2f0bd Don't override clearance when routing
The default `m_overrideClearance = -1` used here was changed to 1.
Reseting it to -1 to solve linked issue

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

(cherry picked from commit e2e901de1d)
2023-04-25 10:21:13 +01:00
Jeff Young 89d1d36e79 Don't try to keep track of a HOLE's net.
Keep track of it's parentPadVia instead.

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

(cherry picked from commit 676a15df65)
2023-04-24 18:32:48 +01:00
Jeff Young 999cd8cd11 Simulator fixes.
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:55:34 +01:00
Jeff Young fd8b281731 Formatting. 2023-04-24 13:55:15 +01:00
Jeff Young d8481b4528 More robust file reading for simulator files. 2023-04-24 13:53:22 +01:00
jean-pierre charras 6d93fa046c pcb_calculator: add missing code to save Regulator Panel settings.
From master branch.
2023-04-24 09:14:31 +02:00
jean-pierre charras c75672fd44 OPENGL_GAL: draw BITMAP_BASE: fix incorrect rendering of mirrored bitmaps
The vertical mirror was not working.
2023-04-23 16:12:14 +02:00
jean-pierre charras 5484796745 BITMAP_BASE::Mirror() and ::Rotate(): fix an issue for bitmaps with ppi not 300
wxImage::Mirror() and wxImage::Rotate() transforms clear some parameters, especially
the PPI stored in the image. It creates bad size (bad ppi) when saving a BITMAP_BASE
in files.
These parameters are now restored after transform.
2023-04-23 16:12:14 +02:00
Marek Roszko 4ed45e0515 Fix gerbers and drill plot not logging errors
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/14437


(cherry picked from commit dbed94e4b1)
2023-04-21 03:40:28 +00:00
Marek Roszko 9956c04526 Load custom drawing sheets for pcb cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14171


(cherry picked from commit 9f64c7f354)
2023-04-21 03:18:27 +00:00
jean-pierre charras b74af71312 * Eeschema: save worksheet filename in project file.
The call to saveProjectSettings() was missing.
From master branch, commit b96f3d085c
Fixes #14219
https://gitlab.com/kicad/code/kicad/issues/14219
Fix also a minor compil warning
2023-04-20 09:22:33 +02:00
Jeff Young 44640422f2 Copy RC_ITEM fix to ERC_ITEM (where it's actually needed).
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 14:08:55 +01:00
Jeff Young be91f378ac Suppress newlines in RC_ITEM messages.
Fixes https://gitlab.com/kicad/code/kicad/issues/14569
2023-04-19 12:38:46 +01:00
Jeff Young bdca18cc9f Ensure item is gridded if there was no motion between clicks.
(cherry picked from commit f7a552a2b3)
2023-04-18 23:56:17 +01:00
Jeff Young 76cb15f545 Trim VRML export layers to board outline.
Fixes https://gitlab.com/kicad/code/kicad/issues/14557
2023-04-18 16:47:42 +01:00
Jeff Young 4f9e754a51 Ignore empty field-name-templates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14552
2023-04-18 13:46:08 +01:00
Jeff Young 955774a91a Amend overly aggressive assert. 2023-04-17 17:52:28 +01:00
Jeff Young e8a9485d5e Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:52:11 +01:00
Lucas Dumont 0736c141b9 pcbnew: Fix crash with differential routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537

(cherry picked from commit 469fe76994)
2023-04-17 09:48:18 +01:00
Jeff Young 204549f55b Fix merge error. 2023-04-16 23:22:49 +01:00
Jeff Young 82a5f307ed Pull fix back from master. 2023-04-16 23:06:36 +01:00
Jeff Young 7a4650a1a9 Double double-add items to the view.
(cherry picked from commit a540c01c61)
2023-04-16 23:05:24 +01:00
Jeff Young 518980d9ed Small improvements to lifecycle safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/14521

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

(cherry picked from commit cc4a8dcc89)
2023-04-16 18:49:53 +01:00
Jeff Young 5cc1e2e42d The symbol viewer handles its own message panel.
(cherry picked from commit 6fb8916798)
2023-04-16 18:49:53 +01:00
jean-pierre charras c599385c8b footprint wizards: fixes and enhancements
From master branch
2023-04-16 17:32:31 +02:00
Jeff Young 1d37d3fdf7 Performance.
(cherry picked from commit 2793bb1d68)
2023-04-16 15:38:32 +01:00
Jeff Young f3db64af05 Multi-threading safety.
(Possible fix for KICAD-74.)

(cherry picked from commit b76ef8c7e2)
2023-04-16 15:38:22 +01:00
Jeff Young 3217372720 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)

(cherry picked from commit 6f59740953)
2023-04-16 15:38:15 +01:00
Jeff Young 7a50654f3b Export rectangular aperture GBR_SEGMENTS as polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/14136
2023-04-15 22:31:49 +01:00
Jeff Young 9893921d76 Handle legacy libraries with escaped symbol names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14057

(cherry picked from commit b74d964bff)
2023-04-15 22:31:49 +01:00
Jeff Young 5574f35473 Apply symbol attributes from base symbol, not derived symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/13740

(cherry picked from commit d4b4abd001)
2023-04-15 22:31:49 +01:00
Alex fd42e493c0 Don't crash when canceling initial setup in Manage Footprint Libraries
(cherry picked from commit 21103924f4)
2023-04-15 16:25:12 +00:00
jean-pierre charras 7843e6a709 Python: re-add "def Duplicate(self)" with the correct call to C++ Duplicate().
From master branch.
2023-04-15 16:20:42 +02:00
Marek Roszko 4c129ec208 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855


(cherry picked from commit 8fd4909f86)
2023-04-15 13:19:32 +00:00
Jeff Young 1bf44561da Allow setting 0 to min width, min track width, min via annular width, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/13822

(cherry picked from commit 299c88cfec)
2023-04-15 13:22:52 +01:00
Jeff Young ad612864ce Update DRC exclusions model to match terminology.
DRC exclusions were originally written following the C++
pragma model (ie: allow this violation here).  However, the
"exclusion" terminology we used in the GUI suggests a model
model where the exclusions go away when the violation no
longer exists.

Fixes https://gitlab.com/kicad/code/kicad/issues/14351
2023-04-15 12:10:23 +01:00
Jeff Young 1707436cad Retire the lib-tree scoring algorithm.
It appears to cause more confusion than help.

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

(cherry picked from commit d01c023d5a)
2023-04-15 00:09:34 +01:00
Jeff Young b011d508f8 Clear board soldermask when undoing/redoing items that affect it.
Fixes https://gitlab.com/kicad/code/kicad/issues/13446

(cherry picked from commit 4a3f77cd9d)
2023-04-15 00:08:14 +01:00
Jeff Young f67a477f65 Pull some fixes from master. 2023-04-14 19:55:31 +01:00
Jeff Young 3573b97bfc Save library when it's selected in lib tree.
Fixes https://gitlab.com/kicad/code/kicad/issues/14220

(cherry picked from commit 05185ec81a)
2023-04-14 17:36:10 +01:00
jean-pierre charras 37a42a3fb7 ERC: set default setting ERCE_SIMULATION_MODEL to ignore
Most of projects do not manage spice settings.
From master branch
2023-04-14 17:29:42 +02:00
Jeff Young 2d13ddc70c Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries. 2023-04-14 10:59:10 +01:00
Jeff Young 0be01f3c24 Don't steal an existing via's hole.
(cherry picked from commit 6fb30398ca)
2023-04-14 10:09:03 +01:00
Jeff Young eb492724c7 Further simplify PNS::ITEM::collideSimple().
Also brings text_pns_basic's mocks into line with their "real"
counterparts.

(cherry picked from commit 2f198bdcb2)
2023-04-14 10:09:03 +01:00
Jeff Young 3b05d03220 Add PNS::ITEM::BoardItem() call.
About 1/3 of callers to Parent() don't care if they get the immediate
parent or not, about 1/3 want only the immediate parent, and about 1/3
want the hole parent's Parent().

I had earlier changed PNS::ITEM::HOLE to override Parent() and return
the hole parent's Parent(), but since the callers are pretty evenly
split I've reverted that and added BoardItem() for callers who want the
eventual BOARD_ITEM (whether a direct parent or a grandparent).

(Also removes a dead routine so I didn't have to figure out which of
the two it wanted....)

(cherry picked from commit 6f0d963683)
2023-04-14 10:09:03 +01:00
Jeff Young 4c04233a20 Unify most special-case processing to the clearance if-then-else.
This also allows us to support hole-to-hole clearance when dragging
a via near another via on the same net.

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

(cherry picked from commit 8a0c225efa)
2023-04-14 00:10:48 +01:00
Jeff Young 2b6d2fc117 Don't return holes that have a parent pad or via.
(While we don't currently have holes without a parent pad or via, you
could imagine using HOLEs in the future to represent a hole in a first-class
board outline, so better not to build this assumption in.)

(cherry picked from commit b18bf09208)
2023-04-14 00:10:43 +01:00
Jeff Young f64ef39687 Post-merge cleanup of holes-as-first-class-citizens.
(cherry picked from commit 4cc289c6fb)
2023-04-14 00:10:34 +01:00
Tomasz Wlostowski c1fb392333 router: hole as first-class-object, initial version of rewritten collision check routine
Rebased and modified by Jeff Young <jeff@rokeby.ie> 6 April 2023

(cherry picked from commit 1532a83330)
2023-04-14 00:10:07 +01:00
Tomasz Wlostowski de60d5467c router: further changes to the ownership model
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace

Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023

(cherry picked from commit d961cdce3f)
2023-04-14 00:10:01 +01:00
Tomasz Wlostowski c1274e24b0 router: hole as first class objects, wip
Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023

(Also includes a bug-fix for highlighting collisions with edge-cut
items.)

(cherry picked from commit bfbda978b8)
2023-04-14 00:09:56 +01:00
Tomasz Wlostowski 7f593d3999 router: rework ITEM ownership model.
- prerequisite for holes as first class objects code
- introduced the OWNABLE_ITEM interface that defines the owning container (NODE/other ITEM/ITEM_SET)
- simplified the ITEM_SET interface
- constified a lot of APIs (ownership/JOINT management) as a side effect

Rebased and cleaned up by Jeff Young <jeff@rokeby.ie> 5 April 2023
- some STL cover types removed

(cherry picked from commit 1283c4713f)
2023-04-14 00:09:49 +01:00
Tomasz Wlostowski 3a6a6097a7 router: pass collision query options in a structure
Selectively cherry-picked by Jeff Young <jeff@rokeby.ie> 4 April 2023
- Jon's user-clearance-epsilon algo kept intact
- Jeff's castellated-pad code kept intact

(cherry picked from commit eed05191a9)
2023-04-14 00:07:47 +01:00
Marek Roszko 69989e4e64 Fix build error pre wx 3.1.6
(cherry picked from commit 0eefde6046)
2023-04-13 22:21:35 +00:00
Wayne Stambaugh 88999b34d3 Begin version 7.0.3 development. 2023-04-13 16:29:47 -04:00
Wayne Stambaugh 582732918d Tag release version 7.0.2. 2023-04-13 16:27:39 -04:00
Lucas Dumont f1f69c607e Check KiFACE return value
Avoid segfault when cancelling initial global library setup

(Cherry-picked from 3c24017aa4)
2023-04-13 14:39:49 +01:00
Jeff Young 8e82fee494 Attempt to fix gcc compile error. 2023-04-13 13:57:14 +01:00
Jeff Young a51475a094 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)

(cherry picked from commit 8e29a054f3)
2023-04-13 13:47:21 +01:00
Jeff Young f25e2d48bd Search in label fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/14075

(cherry picked from commit a24a63e416)
2023-04-13 10:59:39 +01:00
jean-pierre charras 2bbff64a12 Fix compatibility of QA golden files with 7.0x version 2023-04-13 08:01:32 +02:00
Seth Hillbrand 70b4503187 Fix cherry-pick errors 2023-04-13 02:11:39 +02:00
Jeff Young 912bd4458f Don't trip over a uniquified-name in the schematic library-symbol cache.
Fixes https://gitlab.com/kicad/code/kicad/issues/14160
2023-04-12 18:35:27 +01:00
Ian McInerney d3f4494925 Make version info work without lsb-release installed
(Cherry-picked from 8351c8923a)
2023-04-12 16:13:51 +01:00
Ian McInerney 464467ae8b Fix nanodbc build with clang and gcc stdlib
This should really be fixed upstream somehow, but the upstream build
with clang is broken on Fedora 38 right now anyway due to header issues.

(Cherry-picked from 45b8dced92)
2023-04-12 16:10:20 +01:00
Ian McInerney 8e579ec8e0 Remove python-based board_item duplicate method
This method shadows the C++ method, and doesn't properly handle updating
the duplicated object's KIID to be unique.

Also add tests to ensure the KIIDs are unique after duplication.

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

(Cherry-picked from 5d0b5e16ff)
2023-04-12 16:07:00 +01:00
Ian McInerney 4ef6cbf4fb Add hack to speed up font choice box widget creation
There are problems internal to GTK that mean creating choice boxes with
a lot of items is a very slow process. This hack works around one of
those issues to make it faster to create and display the menu in the
choice box.

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

(Cherry-picked from a77e94d16f)
2023-04-12 15:24:25 +01:00
Seth Hillbrand 68dfcddbe9 Allow bus elements to connect
Previously, bus elements that were not instantiated as individual nets
could not connect to each other.  This caused issues for complex
schematics where busses needed to connect to other busses with elements
that resolved to the same net names.  Functionally, this means mixing
bus elements, which we will replace with first-class elements in version
8 but currently can only be accomplished either by using bus aliases and
  this patch or by individually instantiating each bus element as a
local label

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

(cherry picked from commit 16b4ec3c7e)
2023-04-12 16:10:50 +02:00
jean-pierre charras 907761f14e SCH_LABEL_BASE::SetPosition(): ensure field positions are also handled.
Fixes #14520
https://gitlab.com/kicad/code/kicad/issues/14520
2023-04-12 11:20:41 +02:00
jean-pierre charras be7917c8d8 LIB_TABLE_GRID_TRICKS, popup context menu: fix minor issues:
- add separator only if needed
- ensure selection parameters are up to date.
From master branch
2023-04-12 11:20:11 +02:00
jean-pierre charras 2e25f09ae4 French translation update 2023-04-12 09:47:43 +02:00
jean-pierre charras ea95d8604a Ensure we do not use a non existing pin in SIM_MODEL::MigrateSimModel()
From master branch
Fixes #14522
https://gitlab.com/kicad/code/kicad/issues/14522
2023-04-12 09:41:07 +02:00
Marek Roszko 35def3ab2e Prevent VIEW::UpdateItems and onShowTimer from firing repaints if GAL did not complete init
This appears to be a possible event race on startup

Fixes sentry KICAD-10A


(cherry picked from commit bfad8bb0d5)
2023-04-12 02:10:34 +00:00
Marek Roszko 5527c12a8d Fix crash due to extra right parens in pcad files
Fixes sentry KICAD-TA


(cherry picked from commit 37eaa29679)
2023-04-12 01:53:29 +00:00
Mark Roszko fb1cc72013 Don't crash on empty pcad polygons
Fixes sentry KICAD-103
2023-04-12 01:41:06 +00:00
Jeff Young 1f34883a27 Make symbol/footprint trees sensitive to language change.
(cherry picked from commit eef3492fc0)
2023-04-12 00:01:58 +01:00
jean-pierre charras 724262651f manage libraries dialog: show new state of widgets as soon as the context-menu
activate/deactivate changes their state
From master branch
Fixes #14517
https://gitlab.com/kicad/code/kicad/issues/14517
2023-04-11 18:55:51 +02:00
Alex d7b2247878 opengl_gal: Remove extra padding of bitmap textures.
Since the format has been changed to RGBA8, default (UN)PACK_ALIGNMENT = 4
works correctly, so the texture width padding to 4 is not needed anymore.

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


(cherry picked from commit e91b53fc39)
2023-04-11 04:32:42 +00:00
jean-pierre charras 372e7b6312 fix 2 issues related to SCH_GLOBALLABEL items:
- Ensure the first field in m_fields has id = 0 to be seen has hypertext
(it was not the case after reading a .kicad_sch file)
- when converting this item to another label/text, remove this special Field
from the copied field list to the converted label.
From master branch.
2023-04-10 10:02:50 +02:00
Jeff Young 323a2d83fa Ease acquisition of a target item.
pickSingleItem() had a two-attempt algorithm, but the second attempt
was never made because we'd check for no hits before throwing out the
aAvoidItems.

The second attempt would fail anyway because QueryHoverItems() ignored
the aUseClearance flag when not idle, and didn't factor in the actual
clearance.

(cherry picked from commit d040690f60)
2023-04-09 23:13:44 +01:00
Jeff Young 03c3393616 Handle more pad shapes when building diffpair gateways.
Fixes https://gitlab.com/kicad/code/kicad/issues/1883

(cherry picked from commit 1d19672054)
2023-04-09 23:07:38 +01:00
Jeff Young cbff011e3c Don't delete default intersheetrefs field from global labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/14493

(cherry picked from commit a226f7fc14)
2023-04-09 19:04:33 +01:00
Jeff Young 2ba6fad633 Centralize NPTH has-annulus processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/13437

(cherry picked from commit 3b63d70d01)
2023-04-09 19:04:33 +01:00
Mark Roszko bc4878d71e Update ngspice to 40 in vcpkg 2023-04-09 02:16:09 +00:00
jean-pierre charras e991ae504b DIALOG_IMAGE_PROPERTIES: fix some issues:
- add missing panel_image_properties_base.fpb file
- fix not displayed image.
From master branch
2023-04-08 17:04:02 +02:00
Seth Hillbrand c18181042f Simplify test for substantial nubs
Substantial elements following a divot should be at least as far in each
cardinal direction from the origin point in order to be considered
substantial.  This catches cases where the "substantial" element is
actually a straight segment away from the divot

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

(cherry picked from commit 914b5a4d21)
2023-04-07 16:41:11 -07:00
jean-pierre charras 3de80d3b20 Plot gerber: fix a too zealous plot of negative objects on the silkscreen layers,
when merging layers to silkscreen layers.
From master branch
2023-04-07 11:34:42 +02:00
Seth Hillbrand 39dcd0a352 Handle nested netclass assignments
Netclass directives should not be overriden, instead hold our error
checking for actually missing nets

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

(cherry picked from commit 012737593b)
2023-04-06 17:38:42 -07:00
Jeff Young 199e31ea3f Eagle template footprints don't actually belong to board.
Set their parent to nullptr before deleting (as the board may have
already been deleted).

Likely fix for Sentry KICAD-79.

(cherry picked from commit 13e79af8a0)
2023-04-04 14:21:19 +01:00
Jeff Young dce2247925 Improve scoping control of connetion members.
(The real bug here is that CONNECTION_GRAPH::assignNetCodesToBus() was
growing the bus aliases members list because it used a non-const
reference to it as a local storage list.  The const scoping of it will
prevent this type of error in future.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14269
2023-04-04 11:35:06 +01:00
Jeff Young 89e78c0276 Fix Mac crash-on-quit when timed infobar is up.
(cherry picked from commit b3e2cf218f)
2023-04-03 23:47:14 +01:00
Jeff Young 9a57c11348 Possible protection from acessing deleted window data.
(Long shot for Sentry KICAD-MM.)

(cherry picked from commit bd60f38569)
2023-04-03 23:47:09 +01:00
Jeff Young 1dbe8b2a79 Nullptr safety.
(This is a long shot for Sentry KICAD-MV, but you never know....)

(cherry picked from commit a4e8fa96d4)
2023-04-03 23:47:00 +01:00
Seth Hillbrand 29fd0caf58 Update translator contributions
Adds a number of missing contributors to our translations

(cherry picked from commit d135295ac8)
2023-04-03 13:07:33 -07:00
jean-pierre charras d30701ed59 Fix compil warnings.
(cherry picked from commit ac71227e75)
2023-04-03 10:14:14 -07:00
Seth Hillbrand e39550e77f Update to Clipper 1.2+
Updates to Clipper2 742614f, which includes bug fixes for specific KiCad
boards beyond Clipper2 itself

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

(cherry picked from commit 97558b62ec)

Fixes https://gitlab.com/kicad/code/kicad/issues/14475
2023-04-03 10:06:34 -07:00
Jeff Young a21e7a5eee Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.

(cherry picked from commit 9b4627e782)
2023-04-03 17:20:06 +01:00
Jeff Young 927b5ae707 Use enums for column ids.
(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
2023-04-02 15:28:11 +01:00
jean-pierre charras f59626004c PCB_TEXT::TransformTextToPolySet(): fix missing code for knockout texts.
From master branch
Fixes #14473
https://gitlab.com/kicad/code/kicad/issues/14473
2023-04-02 10:29:18 +02:00
Jeff Young 2ece2719d0 Naming conventions and nullptr usage. No functional changes. 2023-04-01 15:14:35 +01:00
Jeff Young 78ee542d8d Naming conventions. 2023-04-01 14:11:56 +01:00
Jeff Young cea9b38815 Update local coords after changing footprint item properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/14348

(cherry picked from commit 0f9a4ef7b7)
2023-04-01 13:57:47 +01:00
Jeff Young cb8f6db68d Add hole clearance to moutning hole keepouts for SPECCTRA.
Fixes https://gitlab.com/kicad/code/kicad/issues/14439
2023-04-01 13:57:47 +01:00
Seth Hillbrand 85038c2b46 Prevent PCB Editor from opening multiple board_setup
ShowBoardSetup can be called multiple times from multiple locations,
resulting in duplicate board setup dialog boxes.  This is confusing and
should be prevented.  We use the established patter from the symbol
picker to ensure that only one copy of the dialog is ever opened at a
time

(cherry picked from commit 7695d510d6)
2023-03-30 15:34:42 -07:00
Roberto Fernandez Bautista 1e8055f504 CADSTAR PCB Importer: Ignore construction layers on outer surfaces
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14443

7.0 version of d5bc223ff2 (no strings)
2023-03-31 00:17:06 +02:00
jean-pierre charras a7a5f20d1c Pcbnew: fix incorrect position of cached text shapes when moving a footprint.
when moving a footprint, the position of texts living in FP_TEXT_BOX was
not updated when the text shape was cached (non Kicad fonts).
From master branch.
Fixes #14452
https://gitlab.com/kicad/code/kicad/issues/14452
2023-03-30 17:33:44 +02:00
jean-pierre charras 0d744a4e74 kicad-cli, layer names: allows using both names used in GUI and in board files
From master branch
Fixes #14455
https://gitlab.com/kicad/code/kicad/issues/14455
2023-03-30 13:50:09 +02:00
jean-pierre charras 216ec60dc1 kicad-cli, export drill files: fix duplicate options and fix some others:
- remove --separate-files duplicate option
- change --units to --excellon-units (valid only for Excellon) and default to mm
- Gerber resolution: 5 -> 6 (default must be always the higher resolution)
From Master
Fixes #14454
https://gitlab.com/kicad/code/kicad/issues/14454
2023-03-30 10:35:46 +02:00
Roberto Fernandez Bautista 3d9047bec4 Revert "CADSTAR PCB importer: Fix incorrect position of overridden pads"
This reverts commit 5cab66fb18
2023-03-29 21:53:14 +00:00
Roberto Fernandez Bautista 08d65beb26 CADSTAR PCB importer: Fix loading of rounded rectangle pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14445


(cherry picked from commit aaeb8ca739)
2023-03-29 20:56:14 +00:00
Roberto Fernandez Bautista 5cab66fb18 CADSTAR PCB importer: Fix incorrect position of overridden pads
(cherry picked from commit 89441d807d)
2023-03-29 20:55:50 +00:00
jean-pierre charras 9466624f9d Footprint editor: always export the currently loaded footprint.
Previously, it was not always the edited footprint, but a footprint
selected from the library tree.
It was especially annoying when the footprint was loaded from the board editor:
The footprint was not the loaded footprint, but its copy from library.
From master branch
2023-03-29 20:30:25 +02:00
jean-pierre charras 80b842a704 Footprint viewer: ensure the footprint is updated after new library selection
Previously, if the first fp of the new lib has the same name as the old
displayed fp, the old fp was not replace by the new fp.
From master branch
2023-03-29 16:59:12 +02:00
Seth Hillbrand d513a9fe5c Locked shadow needs to be in shadow color
Otherwise, text shadow is stroked by text color

(cherry picked from commit f93fde15b7)
2023-03-28 13:02:18 -07:00
jean-pierre charras c98081cb04 QA test: disable Silk clearance test in solder mask bridge QA test.
the Silk clearance test has nothing to do with a solder mask bridge QA test
From master branch
2023-03-27 12:50:14 +02:00
Jon Evans 17a1dc18be Properties: Hide Net Class from GUI
It is confusing users who want to change the netclass of a net.

(cherry picked from commit 3f42e6b702)
2023-03-26 19:50:10 -04:00
Jon Evans b22ff229db DbLib: Get rid of some GCC warnings
(cherry picked from commit c35cefe1d5)
2023-03-26 19:48:58 -04:00
Jon Evans 23b03fd6ab Properties: Rename methods to better reflect their purposes
(cherry picked from commit 65193487a6)
2023-03-26 19:48:46 -04:00
Jeff Young 97b273905a Manual cherry-pick of a214ac0310. 2023-03-26 21:06:24 +01:00
Jeff Young e759c4d27a Only report on clearances where there was one defined.
If it's 0, it's just a straight-up collision.

(cherry picked from commit 9976b9ce8c)
2023-03-26 20:59:41 +01:00
Jeff Young 76685ae2d9 Run SILK_CLEARANCE rules on mask layer when testing silk-to-mask clearance.
This allows custom rules to be authored without firing the auto-generated
rule from Board Setup > Silk Item Clearance (which should be only for silk-
to-silk clearances).

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

(cherry picked from commit 0266d03f79)
2023-03-26 20:59:36 +01:00
Jeff Young 3fad3ceb35 Update allow-solder-mask-bridges when updating footprint from library.
Fixes https://gitlab.com/kicad/code/kicad/issues/14422
2023-03-26 16:25:54 +01:00
Jeff Young dede9e8549 Test silk/mask collisions on the correct layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/14417
2023-03-26 16:25:54 +01:00
Roberto Fernandez Bautista 97c018118d CADSTAR Sch: TERMATTR may have more than one attribute subnode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13526


(cherry picked from commit fc04f5135f)
2023-03-26 14:55:06 +00:00
jean-pierre charras 8b1ce36402 QA pcbnew: Add missing golden files and disable issue14294 that always fails.
It needs a Clipper2 update, not yet made in stable branch (made only in testing).
2023-03-26 15:09:35 +02:00
Jeff Young 7931f315b1 Manually cherry-pick some fixes back from master.
Fixes https://gitlab.com/kicad/code/kicad/issues/14424
2023-03-26 11:00:23 +01:00
Marek Roszko abb6404ab2 Move up a layer validity check to prevent crash
Fixes sentry crash KICAD-RF


(cherry picked from commit 604a7d69db)
2023-03-25 21:13:38 +00:00
Wayne Stambaugh c434542c65 Fix GCC compile error.
(cherry picked from commit a79108f102)
2023-03-25 17:35:39 +00:00
Marek Roszko 42b7aa6450 Use read/write locks in the settings_manager to avoid thread issues in some scenarios
Fixes sentry issue KICAD-90


(cherry picked from commit ab28650d57)
2023-03-25 17:35:31 +00:00
jean-pierre charras f2ce9cf857 Plot symbol graphic texts: fix incorrect position of texts in some rotations.
The plot code is now similar to the one for symbol fields
From master branch.
Fixes #14327
https://gitlab.com/kicad/code/kicad/issues/14327
2023-03-25 18:27:35 +01:00
jean-pierre charras 56134d0202 KICAD_CURL_EASY: fix compil warnings (avoid using deprecated functions) 2023-03-25 18:27:35 +01:00
Jeff Young f33bbe2d5d Add regression test for 14412.
(cherry picked from commit 30b3645e60)
2023-03-25 16:16:10 +00:00
Jeff Young 59a478bdc5 Allow solder mask bridges between net-tie-group pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/14412

(cherry picked from commit c5e66361db)
2023-03-25 16:15:46 +00:00
Jeff Young 141b332d4f Add regression test for 13988.
(cherry picked from commit 35ca3e7264)
2023-03-25 15:37:57 +00:00
Jeff Young d4a312d6cb Move separation of model name from params earlier in the process.
We need just the model name when we look for a match in the library file.

(cherry picked from commit 60aadfee40)
2023-03-25 15:37:57 +00:00
Jeff Young 31d688b34c Add regression test for 14334.
(cherry picked from commit e65a58b823)
2023-03-25 15:37:57 +00:00
Jeff Young fbef9ea600 Keep track of single-pad-islands so we can discount spokes to them.
(cherry picked from commit d6dd58fff9)
2023-03-25 15:37:57 +00:00
Marek Roszko 0688491e1b Fix typo
(cherry picked from commit eb90448247)
2023-03-24 23:55:24 +00:00
Marek Roszko 434161687e Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2


(cherry picked from commit 8a8589b9db)
2023-03-24 23:53:15 +00:00
Seth Hillbrand 4b3709b96b Revert "Update to Clipper2 1.2+"
This reverts commit 560717de76.
2023-03-24 12:30:11 -07:00
Seth Hillbrand 1fa993303d Revert "Undefine None for X11 after Clipper2 update"
This reverts commit 4f265a52a2.
2023-03-24 12:30:11 -07:00
Seth Hillbrand 01897e7755 Revert "Fix GCC 13 build error."
This reverts commit 00d1e01e12.
2023-03-24 12:30:10 -07:00
Seth Hillbrand 7040b2178d Revert "Update for Clipper 1.2"
This reverts commit e758391a23.
2023-03-24 12:30:09 -07:00
Seth Hillbrand edf23c4c18 Revert "Clean up various simplify steps"
This reverts commit 798e13f70d.
2023-03-24 12:30:06 -07:00
Jon Evans b0b9e66fad Move to requiring explicit action to save project settings
(cherry picked from commit 610e787ada)

Fixes https://gitlab.com/kicad/code/kicad/issues/14414
2023-03-24 11:49:50 -07:00
Seth Hillbrand 89488a43b9 Pins are case-sensitive
Cleanup should remove mis-matched cases

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

(cherry picked from commit 0984599624)
2023-03-24 11:35:20 -07:00
Seth Hillbrand 798e13f70d Clean up various simplify steps
Adds the option to simplify the output of Clipper ops that remove minor
detours from the output lines.  These detours are not substantive, so
removing them speeds up the rest of the system by removing unimportant
vertices.  This also prevents the introduction of inadvertant concave
points when unioning two, closely-sized rounded shapes
2023-03-24 09:42:01 -07:00
Seth Hillbrand e758391a23 Update for Clipper 1.2 2023-03-24 09:42:01 -07:00
Steven A. Falco 00d1e01e12 Fix GCC 13 build error.
See https://kicad.zulipchat.com/#narrow/stream/258851-Developer-Chat/topic/GCC.20Breakage
for more info.
2023-03-24 09:42:01 -07:00
Seth Hillbrand 4f265a52a2 Undefine None for X11 after Clipper2 update 2023-03-24 09:42:01 -07:00
Seth Hillbrand 560717de76 Update to Clipper2 1.2+
Updates to 303232e, which includes bug fixes for specific KiCad boards
beyond Clipper2 1.2 itself

Fixes https://gitlab.com/kicad/code/kicad/issues/14294
2023-03-24 09:42:01 -07:00
jean-pierre charras 0f40894317 Pcbnew, APPEARANCE_CONTROLS: do not change objects visibility, when changing
layers visibility using Preset layers widget.
Fixes #14381
https://gitlab.com/kicad/code/kicad/issues/14381
2023-03-24 15:06:06 +01:00
jean-pierre charras 3915e882a8 Gerbview: Aperture Macro: handle overwriting of variables
Gerbview did not handle redefinition of variable like $3 = $3 / 2
This redefinition is sometimes found in Gerber files.
This is a long standing issue now fixed.
From master branch
2023-03-24 12:02:49 +01:00
jean-pierre charras c5caa23a63 Manager teardrops on arcs. From master branch. 2023-03-24 11:46:11 +01:00
jean-pierre charras 36978d2ddc Gerber plotter: fix incorrect arcs in regions when using a plot offset.
The arc center in Gerber units was incorrectly calculated.
From master
Fixes #14402
https://gitlab.com/kicad/code/kicad/issues/14402
2023-03-24 11:37:26 +01:00
Marek Roszko 3f90c895b9 Prevent crash in color settings due to dropdown weirdness
Fixes sentry reported crash KICAD-R6


(cherry picked from commit c65e33ac13)
2023-03-23 23:47:13 +00:00
Jon Evans 2ada171806 Be more flexible about extracting booleans from database
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14376


(cherry picked from commit dd8b52af93)
2023-03-23 01:25:09 +00:00
Marek Roszko 5dc683c968 Fix crash editing footprint editor defaults
Missing one level of GetParent()....use a dynamic_cast to sanity check it in debug

Fixes sentry crash KICAD-R4


(cherry picked from commit d49562a7aa)
2023-03-22 22:41:57 +00:00
Jeff Young 7026cfe140 Split name from additional params only when model is a library reference.
(cherry picked from commit b8cf7cc080)
2023-03-22 14:12:42 +00:00
Jeff Young b7cd1dd764 Handle single-token flag parameters.
Also fixes a bug where all VDMOS instance parameters weren't marked as
instance parameters.

Also fixes a bug where VDMOS thermal models weren't supported (they
have two extra pins: Tj and Tcase).

(cherry picked from commit 5bda3b99f9)
2023-03-22 14:12:42 +00:00
Jeff Young 09bb8fc4f4 Don't include non-overridden parameters in Sim.Params.
Fixes https://gitlab.com/kicad/code/kicad/issues/14369

(cherry picked from commit 9dc16eb014)
2023-03-22 14:12:42 +00:00
jean-pierre charras 746ab49d36 Ensure 3D shapes are always shown in footprint settings dialog.
From master branch
Fixes #14371
https://gitlab.com/kicad/code/kicad/issues/14371
2023-03-22 08:53:42 +01:00
Jeff Young 1614dc975a Separate legacy model name from parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13988

(cherry picked from commit 39a801423e)
2023-03-21 13:31:20 +00:00
Alex ba7598d90d Fix clashing error dialogs when can't load dynamic library.
(cherry picked from commit 672c468342)
2023-03-21 09:57:46 +00:00
Alex 92fc4872e8 GTK: Fix settings import paths showing up twice.
(cherry picked from commit b89545e484)
2023-03-21 09:57:28 +00:00
jean-pierre charras 30dbfc33a4 step exporter: fix missing initialization of a member (m_pcbBaseName)
EXPORTER_STEP: rename m_pcbName to m_pcbBaseName.
From master.
2023-03-21 09:52:41 +01:00
Mark Roszko b3de5aa08e Put the project name back into the step pcb label.
Software like Solidworks and other CAD treat STEP labels as unique entries.
When you import multi STEP files into the same project, it'll start deduplicating your design by those name.
So two completely unrelated PCBs with the same "PCB" name will result in one being replaced by another.
2023-03-21 01:18:33 +00:00
Jeff Young ba4773e448 Orthogonal dimension are always cardinal, even when their start points are not.
Fixes https://gitlab.com/kicad/code/kicad/issues/13728

(cherry picked from commit bb2a0f825a)
2023-03-20 21:32:06 +00:00
Jeff Young a713ee852c Ignore extraneous LTSpice parameters for VDMOS models.
Also adds special case handling of VDMOS syntax to allow parens (or extra
spaces, linebreaks, etc.) between "VDMOS" and "NCHAN"/"PCHAN".

Fixes https://gitlab.com/kicad/code/kicad/issues/14299
2023-03-20 16:16:13 +00:00
jean-pierre charras a65accd412 EDA_SHAPE_DESC(): catch a std::runtime_error when emitted by
template<typename T> T Get( PROPERTY_BASE* aProperty ) to avoid a crash,
and displays in Debug mode the runtime error message.
From master branch.
Fixes #14347
https://gitlab.com/kicad/code/kicad/issues/14347
2023-03-20 16:21:54 +01:00
Jeff Young 1dc9583e06 Don't attempt to load unknown plot types. 2023-03-20 10:24:22 +00:00
Jeff Young 3afe02ac1f Make sure legend reflects gain/phase for AC small signal analyses.
Fixes https://gitlab.com/kicad/code/kicad/issues/14301

(cherry picked from commit ec6d709929)
2023-03-20 10:24:22 +00:00
Jeff Young 57aa61f1ba Formatting. (No functional changes.)
(cherry picked from commit 6f44b85c13)
2023-03-20 09:59:30 +00:00
Jeff Young 121ea14fe4 Filter Selected Items... is inclusive, not exclusive.
Fixes https://gitlab.com/kicad/code/kicad/issues/14273

(cherry picked from commit 897984aa22)
2023-03-19 21:31:08 +00:00
Jeff Young 9d457dc0ab Less nagging. (If we need a field name, then create one.)
Also cleans up empty fields when exiting the dialog.
2023-03-19 19:15:28 +00:00
Jeff Young befd836ab4 Clean up items which weren't pasted from clipboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/14335

(cherry picked from commit ad5d3d4eba)
2023-03-18 23:38:09 +00:00
Jeff Young 044c301d64 Remove accelerator keys from schematic find/replace dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14304

(cherry picked from commit afe813cae5)
2023-03-18 23:38:09 +00:00
jean-pierre charras 94fd0df2e2 BOARD_NETLIST_UPDATER: add missing count of warnings
From master branch
Fixes #14290
https://gitlab.com/kicad/code/kicad/issues/14290
2023-03-18 17:57:07 +01:00
Salvador E. Tropea e5087ca3db Load the global fp-lib-table before running the Python DRC
Without this we get parity errors for all the KiCad footprints
2023-03-17 21:00:41 +00:00
jean-pierre charras 819a9da599 Pcbnew: fix crash when loading a library with a ft containing a dimension.
(crash due to the use of a null pointer during loading)

(cherry picked from commit 5735a57504)
2023-03-17 16:00:34 +00:00
Jeff Young fb02e55424 Don't pass a REPORTER when checking for overrides.
It fails the unit tests (as it generates a message whenever no override
is found).
2023-03-17 15:30:24 +00:00
Jeff Young 70e86434ef Manual cherry-pick of much of 6d296038f3 2023-03-17 14:12:58 +00:00
Jeff Young c41b1e2f06 Manual cherry-pick of bug fix part of ee1d9c561c. 2023-03-17 13:35:23 +00:00
Jeff Young 64641c28ef Handle underscore in parameter names.
Fixes https://gitlab.com/kicad/code/kicad/issues/14308

(cherry picked from commit 222cd4d009)
2023-03-16 23:51:56 +00:00
jean-pierre charras 69e9f4ada2 DIALOG_LABEL_PROPERTIES, add global label: better filtering of candidates.
The list of candidates (names) must be restricted to existing global labels
and symbols creating a global net name: power symbols having only one power
input pin (a power output does not create net name).
Fixes #14319
https://gitlab.com/kicad/code/kicad/issues/14319
2023-03-16 16:01:18 +01:00
Wayne Stambaugh d28cf632e4 Coverity fixes and code cleaning.
(cherry picked from commit a1fb8e1b1d)
2023-03-16 10:59:05 -04:00
Alex b466bfa6c8 Improve anti-overflow in SEG::intersects.
Caused issues when testing against
A=( -INT_MAX, ... ), B=( INT_MAX, ... ) segments.

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


(cherry picked from commit 98e635869f)
2023-03-16 02:50:22 +00:00
Alex 1c06f4cf06 Don't create 0-length tracks when placing via in the middle of a track.
(cherry picked from commit 8fe78101db)
2023-03-16 02:49:54 +00:00
jean-pierre charras 25f40566ed Symbol editor: fix incorrect position of fields when loading a symbol from schematic.
In symbol editor, symbols are always shown not mirrored, not rotated.
So if the loaded symbol from schematic was rotated/mirrored, the position
of fields must be recalculated for the rotation 0, no mirror.
From master branch
2023-03-15 18:03:11 +01:00
Marco Ciampa e8fa2cbc4d Small fix in Italian translation 2023-03-15 13:35:38 +01:00
Marco Ciampa 779c441e0a Small fix in Italian translation 2023-03-15 13:31:29 +01:00
Marco Ciampa e33031ee7d Updated Italian translation 2023-03-15 10:18:07 +01:00
jean-pierre charras ae63313b55 PDF plotter: encode the letters ( and ) in strings with context CTX_JS_STR
They are separators and cannot be used in user strings.
Fixes #14302
https://gitlab.com/kicad/code/kicad/issues/14302
2023-03-15 09:36:01 +01:00
jean-pierre charras ae50b8d839 make QA link-able on msys2 (from master branch). 2023-03-14 18:05:18 +01:00
Jeff Young 10a27156c2 Defenses in depth for ratsnest drawing.
(cherry picked from commit e60837ec95)
2023-03-14 12:00:03 +00:00
Jeff Young 94057886a3 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233

(cherry picked from commit dc78797274)
2023-03-14 11:56:33 +00:00
Jeff Young 2d9bcb6e4f Select correct face from a .ttc file.
Fixes https://gitlab.com/kicad/code/kicad/issues/13314

(cherry picked from commit 7b3e01ce52)
2023-03-14 11:56:33 +00:00
Jeff Young 249bcd9e1a Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170

(cherry picked from commit a0adb59437)
2023-03-14 11:56:33 +00:00
Jeff Young b2679b7648 Swap pins for undo.
Fixes https://gitlab.com/kicad/code/kicad/issues/14100

(cherry picked from commit c266913ec7)
2023-03-14 11:56:33 +00:00
Seth Hillbrand 9995b8714b Check for dirtied items in the cluster
When drawing the ratsnest, we need to be careful to avoid accessing
CONN_ITEMs that have been changed by the underlying model.  Checking for
dirty items instead of valid items will prevent us looking at data that
are out of date

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

(cherry picked from commit 283770fc45)
2023-03-13 16:11:27 -07:00
jean-pierre charras 7b4dd2f7f5 DIALOG_BOARD_REANNOTATE: ensure indexes are not out of bound. 2023-03-13 20:25:54 +01:00
Seth Hillbrand cc6b01cf88 Force initialization of board units
Unitialized variables are the devil's playground

(cherry picked from commit f0892598a4)
2023-03-13 12:15:51 -07:00
Seth Hillbrand 3568ff72bf Avoid drawing null-arcs in 3d viewer
An arc with no radius or no angle is not visible and should be avoided

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

(cherry picked from commit 72ebe5a429)
2023-03-13 11:48:24 -07:00
Jeff Young e20614660b Fix qa gold value.
(cherry picked from commit 6eb73133f0)
2023-03-12 21:06:28 +00:00
Jeff Young c5a69f073c Added PSPICE/LTSPICE JFET model parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425

(cherry picked from commit 3bc5e3dd8a)
2023-03-12 21:05:06 +00:00
Jeff Young 3025671b1a Add missing command to SPICE directives list.
Fixes https://gitlab.com/kicad/code/kicad/issues/14215

(cherry picked from commit 6d29088668)
2023-03-12 21:04:50 +00:00
Jeff Young 74da0043b4 Move automatic dimension processing inside PCB_DIMENSION_BASE.
Also move dimension precision to an enum so it can get a proper dropdown
in the properties inspector.

(cherry picked from commit 461def2719)
2023-03-12 21:04:09 +00:00
Jeff Young c0ddca12df Add Property Inspector support for dimension objects.
Includes changing the class hierarchy so that dimension objects inherit
from PCB_TEXT rather than containing a PCB_TEXT member variable.

(cherry picked from commit 23accffc6d)
2023-03-12 21:03:58 +00:00
Jeff Young bf55e610b9 Handle plotting of text on solder mask layer.
Admittedly this is an odd thing to do, but we should still be internally
consistent, and it has come up in customers' files.

Fixes https://gitlab.com/kicad/code/kicad/issues/14226
2023-03-12 21:00:19 +00:00
Mark Roszko 4e775a4090 Move vcpkg forwards for newer curl and python 3.9.16 2023-03-12 02:18:35 +00:00
Jon Evans 9f7b31b5c5 Do not try to process invalid ratsnest nodes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254


(cherry picked from commit 8eaa3cfac9)
2023-03-11 21:12:33 +00:00
Simon Richter 279641df73 Avoid "suggest parentheses around assignment used as truth value" 2023-03-10 23:09:41 +01:00
Wayne Stambaugh 9e1fd16329 Coverity fixes and code cleaning.
(cherry picked from commit 4e99812145)
2023-03-10 11:21:19 -05:00
Wayne Stambaugh d6ff5f0239 Begin 7.0.2 development. 2023-03-09 17:03:32 -05:00
Wayne Stambaugh 3f5d3fa0c6 Tag release version 7.0.1. 2023-03-09 16:59:45 -05:00
Seth Hillbrand 51dc2b109e Handle fully-nested zones
The logic to handle divots needs to account for fully nested, same net
zones.  The process of subtracting led to us considering the inner zone
to be a zone knock-out (negative polygon).  To avoid this, we need to
check if the inner, higher priority zone has any connection to the outer
zone.  If it does not, then we can treat it as an isolated zone without
worrying about divots to the outer zone.

(cherry picked from commit 9146e38af4)
2023-03-09 09:25:20 -08:00
mitxela 2358ff6f07 Helper function to allow net.GetNetClassName()
(cherry picked from commit 734d3667a8)
2023-03-09 14:03:02 +00:00
mitxela 11788d2f39 Expose shared_ptr to swig
Possibly not the right way to go about it but technically works


(cherry picked from commit 182abd4652)
2023-03-09 14:02:48 +00:00
mitxela 541f7467c6 Fix python GetAllNetClasses
(cherry picked from commit 716328e511)
2023-03-09 14:02:34 +00:00
jean-pierre charras 411c9707ee specctra export: fix handling of multi-layer zones.
(from master branch)
2023-03-07 15:45:28 +01:00
Jon Evans ee0ba17c03 Improve HiDPI handling of appearance/layer controls
(cherry picked from commit 43d3a18b86)
2023-03-07 08:49:06 -05:00
Jon Evans 64bc850d8f Fix layer widget in HiDPI situations
(cherry picked from commit 89ef6b36f4)
2023-03-07 08:49:06 -05:00
Jeff Young 154f64dae3 Edge connectors shouldn't trigger edge clearance violations.
Fixes https://gitlab.com/kicad/code/kicad/issues/14199

(cherry picked from commit 33e7c78533)
2023-03-07 12:23:56 +00:00
Johannes Maibaum 7fa758358f Don't bracket KICAD_VERSION when using git describe
(Cherry-picked from 75424cb246)
2023-03-07 10:40:28 +00:00
Salvador E. Tropea f135881bd6 Use constants for the names of the built-in colors
- Avoid repetition and errors from typos
- Allow simple changes
- Simpler data type handling, the constants are wxString
2023-03-07 10:32:18 +00:00
Seth Hillbrand 839301f81e Revert "Consolidated ERC fixes"
This reverts commit 2127712115.

Version uses functions only available in the master branch.  Will revert
for 7.0.2 to allow targeted update
2023-03-06 21:22:55 -08:00
Seth Hillbrand 04f4ca9772 Update translations 2023-03-06 16:55:17 -08:00
Rigo Ligo 525328fba1 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-03-07 01:50:07 +01:00
boonchai k 471c125c1a Translated using Weblate (Thai)
Currently translated at 89.2% (7148 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/th/
2023-03-07 01:50:07 +01:00
Tokita, Hiroshi 8ef99137c6 Translated using Weblate (Japanese)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ja/
2023-03-07 01:50:07 +01:00
boonchai k 404cad062a Translated using Weblate (Thai)
Currently translated at 88.6% (7104 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/th/
2023-03-07 01:50:07 +01:00
dsa-t d4be813f2e Translated using Weblate (Russian)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ru/
2023-03-07 01:50:06 +01:00
Jonathan Haas ab3c0b2f03 Translated using Weblate (German)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-03-07 01:50:06 +01:00
CloverGit defcfc2962 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/zh_Hans/
2023-03-07 01:50:06 +01:00
Jan Straka 267cfdf54b Translated using Weblate (Czech)
Currently translated at 90.1% (7218 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-03-07 01:50:06 +01:00
turkce a7b0231b3c Translated using Weblate (Turkish)
Currently translated at 42.1% (3375 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-03-07 01:50:06 +01:00
turkce 7c19958840 Translated using Weblate (Turkish)
Currently translated at 41.3% (3310 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/tr/
2023-03-07 01:50:06 +01:00
ssantos 34c3bb7d2c Translated using Weblate (Portuguese)
Currently translated at 99.8% (8001 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt/
2023-03-07 01:50:06 +01:00
Toni Laiho b37545ee6c Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:05 +01:00
Henrik Kauhanen c1e924c894 Translated using Weblate (Swedish)
Currently translated at 99.9% (8007 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:05 +01:00
Tom Niesse 200e9e28ea Translated using Weblate (Dutch)
Currently translated at 82.8% (6638 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/nl/
2023-03-07 01:50:05 +01:00
Henrik Kauhanen b95f958890 Translated using Weblate (Swedish)
Currently translated at 99.9% (8007 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:05 +01:00
김랑기 fe9666bdaf Translated using Weblate (Korean)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-03-07 01:50:05 +01:00
Henrik Kauhanen 948de5dc79 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:05 +01:00
Toni Laiho 8800fd8250 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:05 +01:00
Henrik Kauhanen b1e5d8c915 Translated using Weblate (German)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-03-07 01:50:05 +01:00
Henrik Kauhanen 02aec8b091 Translated using Weblate (Swedish)
Currently translated at 99.9% (8005 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:04 +01:00
김랑기 50517f6aa6 Translated using Weblate (Korean)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/ko/
2023-03-07 01:50:04 +01:00
Henrik Kauhanen a752473280 Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:04 +01:00
Henrik Kauhanen 7e1972d483 Translated using Weblate (German)
Currently translated at 99.9% (8009 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-03-07 01:50:04 +01:00
Henrik Kauhanen de48bf04bc Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:04 +01:00
Henrik Kauhanen 228bf66cac Translated using Weblate (Finnish)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:04 +01:00
Jan Straka c986c1d26a Translated using Weblate (Czech)
Currently translated at 89.7% (7188 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/cs/
2023-03-07 01:50:04 +01:00
Henrik Kauhanen b0f7ea5b16 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:04 +01:00
Jan Sobków 8b2e2ff1f8 Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-03-07 01:50:03 +01:00
Toni Laiho d00166223f Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:03 +01:00
Toni Laiho 4701b4bfc2 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:03 +01:00
Ivan Chuba e4c74c727f Translated using Weblate (Ukrainian)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/uk/
2023-03-07 01:50:03 +01:00
Henrik Kauhanen f626ce29c4 Translated using Weblate (Swedish)
Currently translated at 99.9% (8006 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/sv/
2023-03-07 01:50:03 +01:00
Wellington Terumi Uemura 768d8e5811 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pt_BR/
2023-03-07 01:50:03 +01:00
ZbeeGin 2ac3a4a103 Translated using Weblate (Polish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/pl/
2023-03-07 01:50:03 +01:00
Toni Laiho bb512f3fc0 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:03 +01:00
Henrik Kauhanen d6e7a89c97 Translated using Weblate (Finnish)
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/fi/
2023-03-07 01:50:03 +01:00
Ulices a5455da909 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (8011 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/es_MX/
2023-03-07 01:50:02 +01:00
Henrik Kauhanen 8dadc698cc Translated using Weblate (German)
Currently translated at 99.9% (8010 of 8011 strings)

Translation: KiCad EDA/v7
Translate-URL: https://hosted.weblate.org/projects/kicad/v7/de/
2023-03-07 01:50:02 +01:00
James J 2127712115 Consolidated ERC fixes
- Consistent calculation of IsStacked() for pins across ERC checks
 - Correct placement of ERC marker for unresolved field variables
 - Add sheet-specific paths to two ERC check results

(cherry picked from commit 39e56485fc)
2023-03-06 16:38:11 -08:00
Mario Luzeiro d5b635027e 3D-Viewer: sort models and material models when rendering in transparent
Also enables transparency on model preview and small optimizations fixes

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

(cherry picked from commit 7bc976f3f4)
2023-03-06 16:24:24 -08:00
Graham Keeth 9b2aeda51e Fix column offset in BOM script
Debugged by @svk28

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

(cherry picked from commit cc110399ea)
2023-03-06 16:23:31 -08:00
Seth Hillbrand 5aba9b539f Revert font spacing/tabs to the v6 model
While convoluted, this model matches as best we have found so far, the
alignment with scintilla.  The spacing is character size for N-1 of the
characters in the 4-space tab stops.  The final character is sized for
the actual space character in the stroke font (0.761905)

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

(cherry picked from commit bce402a01c)
2023-03-06 16:23:06 -08:00
JamesJCode b82020722b Eeschema netlist output: Propagate NC across hierarchical schematics
Fixes #12580

Additionally does not export no_connect netlist annotation on pins
which are both connected to another pin and a NC item, unless all
connected pins are stacked at the symbol level.

Adds testing of pin types to netlist QA unit tests.

(cherry picked from commit 9dca70a773)
2023-03-06 16:22:25 -08:00
Seth Hillbrand b62a8fe65a Handle excessively large values when hatching
While unusual, ensure that hatched zones don't break KiCad if they are
close to the integer limit

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

(cherry picked from commit ffcc0e50b7)
2023-03-06 16:21:13 -08:00
Seth Hillbrand a5d85e3281 Bitmaps are not actually copper
We report bitmaps as being 'on' a copper layer because they are
associated with it but they are not actually physical parts so should
not be included in the DRC checks

Additionally, Bitmaps effective shape starts are the top left corner
rather than the center (unclear why that was there in the first place)

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

(cherry picked from commit 1b8b216ac8)
2023-03-06 16:20:44 -08:00
Seth Hillbrand e699bcf5a3 Use Chamfer lines when deflating
Rounded line ends when deflating leads to microscopic jags in the
outline that are not visible but add substantial computation time and
minor error when computing polygon offsets.

Instead, the chamfer deflate method prevents these jagged lines by
clipping angles < 90° by the error level.  This does not impact deflate
calls where we explicitly require the angles to be maintained

(cherry picked from commit af10878954)
2023-03-06 16:18:51 -08:00
Seth Hillbrand 7ef5e079fd Smarten connection width checker looking for splits
Fractured polygons are always fractured along the x-axis, so when
checking to see if a segment is a fracture point, we check if the y
coordinate is equal.  This avoids situations where there are multiple
fracture points between two inflection points

Additionally, we add a second check to ensure we don't hit spurious
blobs (all kinks should be symmetric and therefore be substantial in
each direction)

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

(cherry picked from commit 7653a2bf99)
2023-03-06 16:14:56 -08:00
Jeff Young 4076461347 Make SPICE netlist title explicit.
Fixes https://gitlab.com/kicad/code/kicad/issues/14183

(cherry picked from commit 6838de962b)
2023-03-06 23:09:51 +00:00
qu1ck d610486c1e Add vector3 to swig
Fixes regression in 7.0 making fp 3d model offsets not accessible in
python

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

(cherry picked from commit 88062c5fc3)
2023-03-06 11:23:09 -08:00
Christoph Moench-Tegeder 1891e2ad68 CMakeLists.txt: do not use -ffloat-store on clang
According to it's User Manual, clang does not know about -ffloat-store.
This is corrobated by the FreeBSD i386 build (using LLVM 13 and 15,
depending on the base system version) failing early with an error
message complaining about this parameter being unknown.

See
https://pkg-status.freebsd.org/beefy17/data/main-i386-default/pb27279cba1ca_sed03776ca7/logs/kicad-7.0.0,2.log
for an example of the failure, and
https://clang.llvm.org/docs/UsersManual.html#controlling-floating-point-behavior
for the available floating point options on clang.

(Cherry-picked from 46a59aa2c3)
2023-03-06 16:01:55 +00:00
aris-kimi f1e060902b Simulator: Fix RLGC c unit
(Cherry-picked from db2780090c)
2023-03-06 15:59:54 +00:00
Jeff Young 7dbd920912 Don't allow footprint editor pad tools to run outside footprint editor.
(They can get called if a user re-assigns hotkeys to them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14166
2023-03-06 14:43:20 +00:00
aris-kimi 05ab9e3836 Simulator: Fix diode ibv unit
(Cherry-picked from 5b43dc4e7b)
2023-03-06 14:20:33 +00:00
Jeff Young a4e0f1f7aa Support both wxWidgets APIs for excluded characters.
(Sadly they're mutually incompatible.)

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

(cherry picked from commit b5060d2951)
2023-03-06 14:17:11 +00:00
Jeff Young a8f27d13e6 Use name (even for fallback models) *if* it's specified in dropdown.
Fixes https://gitlab.com/kicad/code/kicad/issues/12425

(cherry picked from commit 7547e550aa)
2023-03-06 11:18:14 +00:00
Jeff Young 05d425ea88 Add 12505 to the regression test suite.
Fixes https://gitlab.com/kicad/code/kicad/issues/12505

(cherry picked from commit d96598c87c)
2023-03-06 10:27:46 +00:00
Jeff Young 3cb12b5a60 Allow others to also process units changed event.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156

(cherry picked from commit 6a5f305684)
2023-03-05 16:07:00 +00:00
Alex 8f1237e629 bom_csv_grouped_extra: use field-specific methods for data.
Fixes https://gitlab.com/kicad/code/kicad/issues/14129


(cherry picked from commit c1f4911d7e)
2023-03-05 00:26:46 +00:00
Wayne Stambaugh 2c7f44f78d Coverity fixes and code cleaning.
(cherry picked from commit 789bf6455a)
2023-03-04 13:14:59 -05:00
Jeff Young a9447aa8c7 Add UNITS_CHANGED handling to 3D preview controls.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156

(cherry picked from commit 915b352d9b)
2023-03-04 12:12:34 +00:00
Jeff Young 9b61b350fe Don't commit changes on paint events or updateUI events.
Also use std::numeric_limits::epsilon for comparing doubles.

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

(cherry picked from commit d714ff8549)
2023-03-04 00:10:39 +00:00
Alex e3cf65fbdf Fix bitmap scaling when reading legacy schematic as well.
(cherry picked from commit bfc3e2d29b)
2023-03-03 22:39:38 +00:00
Jeff Young e51d43568e Prefer Clamp() to std::min( std::max() ).
(cherry picked from commit d545216432)
2023-03-03 21:32:19 +00:00
Jeff Young 1bb6b7acdd Overflow safety.
Potential fix for some or all of
https://gitlab.com/kicad/code/kicad/-/issues/13969

(cherry picked from commit 2f2a00c307)
2023-03-03 21:32:12 +00:00
Seth Hillbrand adc7a3ba4a Correct parent symbol for lib_text
The edited symbol should be pulled from the parent window when there is
not an existing text object

(cherry picked from commit 59fc62e898)
2023-03-03 12:40:56 -08:00
Jeff Young 94ec6cc362 Convert inline models in Sim.Params fields to SPICE syntax.
Fixes https://gitlab.com/kicad/code/kicad/issues/14157

(cherry picked from commit 14f1f3ec79)
2023-03-03 18:18:32 +00:00
Jeff Young bbdb5eb6e3 Use resolved fields when generating LIB_TREE info.
Fixes https://gitlab.com/kicad/code/kicad/issues/13737

(cherry picked from commit 2fb24347ad)
2023-03-03 17:23:13 +00:00
Jeff Young e487ca8bd8 Handle alternate pin definitions when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14122

(cherry picked from commit 2973d292d9)
2023-03-03 12:57:03 +00:00
Jeff Young f5b0e20f78 The screen for undo is the screen that *owns* the SCH_SHEET...
... not the screen the SCH_SHEET owns.

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

(cherry picked from commit 5849458476)
2023-03-03 00:23:41 +00:00
Seth Hillbrand 6116eebbad Prevent inf when presented with 0 errormax
acos(1) returns 0, so this implies infinite segements to get to 0 error.
This is not reasonable but might be encountered in bad arcs or circles
that have 0 radius.  Instead of returning infinite or std::max segments,
we limit the error to be at least 1 IU

(cherry picked from commit 1fda68099f)
2023-03-02 10:21:25 -08:00
Jeff Young 8619705e44 Hook up AddField handler to GRID_TRICKS for SCH dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/git/14153
2023-03-02 18:16:02 +00:00
Jeff Young c216ed2d1f Make SME prop-grid hack Mac-only.
Fixes https://gitlab.com/kicad/code/kicad/issues/13852

(cherry picked from commit dcba555d44)
2023-03-02 14:59:57 +00:00
Jeff Young e17dc25bba Add support for non-cardianlly-rotated text boxes.
Also fixes a couple of bugs in text boxes in flipped footprints.

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

(cherry picked from commit 7638e23ff1)
2023-03-02 14:58:44 +00:00
Salvador E. Tropea d311915f9d Fix the CONNECTIVITY_DATA::GetNetItems Python API
- The C++ member now uses std::vector<KICAD_T>
- The Python side can use a single value or a list,
  like in v6.

The std::vector translation is based on the v6 KICAD_T[]
translation.
2023-03-01 18:49:12 +00:00
Jeff Young 3a95826b42 Move only-write-model-if-it-contains-overrides up to base class.
It's necessary to keep us from writing out model lines for included
models and fall-backs of included models.

(cherry picked from commit f5edcf82f2)
2023-03-01 13:44:26 +00:00
jean-pierre charras dcc1009162 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
From master, commit 51d46c0e73
2023-03-01 10:45:23 +01:00
jean-pierre charras d61e01ff4f Plot Gerber format: ensure all attributes are added to polygon items.
Especially, TA.AperFunction,EtchedComponent for net tie footprints using polygons.
From master, commit ece34e1a0c
2023-03-01 09:39:15 +01:00
Seth Hillbrand 51b9d8e7ad Allow for rounding error in connection width checker
We perform checks using squared distance but this loses the integer
rounding in the standard norm.  To correct for this, we allow a single
IU in the restriction, allowing fractionally smaller connection widths
before calculating the squared limit

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

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

(cherry picked from commit a0f99ea8ba)
2023-02-28 15:26:49 -08:00
qu1ck 90eb5e9c31 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

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

(cherry picked from commit 2975f53647)
2023-02-28 16:48:28 -05:00
Seth Hillbrand 17c34c88dc Avoid forcing all units
When the enduser is not allowed to change the status of "common to all
units", then it should be disabled

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

(cherry picked from commit 3207d1386e)
2023-02-28 13:42:51 -08:00
aris-kimi ff6f658f9d Simulator: Fix some cases with initial conditions
(cherry picked from commit 4a761179d0)
2023-02-28 21:31:45 +00:00
Seth Hillbrand fb798a4150 Export footprint pad holes to STEP regardless
Footprint pad holes form a part of the board outline regardless of
whether the footprint is in the BOM or not

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

(cherry picked from commit daf70f9b6a)
2023-02-28 12:02:40 -08:00
Salvador E. Tropea 4213bb3a62 Fix rounding errors in gerber files
The userToDeviceCoordinates helper returns a VECTOR2D
Converting it to VECTOR2I back and forth generates rounding errors
Also is a waste of time
2023-02-28 19:23:26 +00:00
Jeff Young 8a34f91172 Fix for overwriting non-specified constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/14070
2023-02-28 18:29:43 +00:00
jean-pierre charras 764ddd4773 Fix compil warnings. 2023-02-28 18:00:22 +01:00
jean-pierre charras ea0dcc8ebd Fixes in build board outlines as polygon and convert_shape_list_to_polygon:
- Ensure Bezier curves have their polygon build before use it.
- When building board outlines as polygon the same chaining epsilon value
for DRC, export step and 3D view (default 0.01mm).
Fixes #14115
https://gitlab.com/kicad/code/kicad/issues/14115
Fixes #14009
https://gitlab.com/kicad/code/kicad/issues/14009
2023-02-28 17:26:28 +01:00
jean-pierre charras 3f5db9f7f9 EXPORTER_STEP: handle sub-layers in dielectric layer.
A dielectric layer (between 2 copper layers) can be made by more than one
layer (composite dielectric).  Not frequent, but possible.
sub-layers where previously ignored.
2023-02-28 17:25:40 +01:00
Jeff Young a6a0bba1b7 Stage group children when staging group.
Many operations such as move, rotate, etc. are applied directly to the
group's children, so it's the children that need staging.

Fixes https://gitlab.com/kicad/code/kicad/issues/13999
2023-02-28 14:21:12 +00:00
Jeff Young 5ec785e2f7 Spacing & font-size issues in 3D model preview dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/13880

(cherry picked from commit 7bb006c91d)
2023-02-28 14:21:12 +00:00
Graham Keeth f7d9f1f69d Fix SPICE pins for BJTs and MESFETs
- MESFETs don't have a substrate/bulk pin
- BJTs have a substrate pin, and HICUM/VBIC have TJ

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

(cherry picked from commit 6af3dadaee)
2023-02-28 14:21:12 +00:00
Jeff Young 42efd2d005 Make substrate and thermal junction nodes optional.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083

(cherry picked from commit 1fdc81e68d)
2023-02-28 14:21:12 +00:00
Jeff Young d32e13daee Clear model name when switching to internal model.
Also fixes a bug to ensure that a modelLine gets written when using
an internal model.

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

(cherry picked from commit 2e5bf0210a)
2023-02-28 14:21:12 +00:00
Jeff Young e82c21e944 Get rid of m_sortedSymbolPinList in favour of a properly scoped variable.
Fixes https://gitlab.com/kicad/code/kicad/issues/14083

(cherry picked from commit 2a79a453ec)
2023-02-28 14:21:12 +00:00
Johannes Pfister 33f835a437 When importing legacy PCB dimension: Use automatic dimension when Unit couldn't be determined
(cherry picked from commit a87550a2c6)
2023-02-28 14:21:12 +00:00
Jeff Young 59d8110801 Always highlight children when they're selected on their own.
Fixes https://gitlab.com/kicad/code/kicad/issues/13876

(cherry picked from commit a1ceb585c7)
2023-02-28 14:21:11 +00:00
Jeff Young d028b381fa Make SIM_MODEL_SPICE_FALLBACK act more like the model it's a fallback for.
In particular, install/show the parameters, and keep the existing name
field.

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

(cherry picked from commit 281fde71b9)
2023-02-28 14:21:11 +00:00
Roberto Fernandez Bautista a1a3f810f0 Add missing line from commit b03366c9e8
(cherry picked from commit bb8a3a7fdc)
2023-02-27 23:13:44 +00:00
Roberto Fernandez Bautista c96f0f2396 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions


(cherry picked from commit b03366c9e8)
2023-02-27 22:58:41 +00:00
Fabien Corona 46c8985661 sim - switches: open <-> closed in description 2023-02-27 19:04:48 +01:00
jean-pierre charras c588639503 PANEL_COLOR_SETTINGS: swap swatches and texts to avoid annoying truncation.
In some languages, the texts can be long, and create truncation of the left
column. So if the left column shows swatches they are truncated, or not visible
Truncating long texts is less annoying.
Fixes #14052
https://gitlab.com/kicad/code/kicad/issues/14052
2023-02-27 08:37:13 +01:00
Jeff Young b3c6f559b2 Don't eval empty string.
Fixes https://gitlab.com/kicad/code/kicad/issues/13756

(cherry picked from commit 79f13ea9c7)
2023-02-26 23:14:40 +00:00
Marek Roszko 85544d109c Don't destroy the DIALOG_PCM_PROGRESS until after the threads actually terminated
(cherry picked from commit 47cf26f047)
2023-02-26 22:47:14 +00:00
Jeff Young 4aba595b2b Add second instance of "don't mess up user formatting" fix.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989

(cherry picked from commit 4b427b2d0c)
2023-02-26 22:00:20 +00:00
Jeff Young b2241dca72 Adjust stroke font baseline offset to better match 6.0.
Fixes https://gitlab.com/kicad/code/kicad/issues/13886

(cherry picked from commit 4bb508eacf)
2023-02-26 21:59:43 +00:00
Jeff Young 4ffe742b69 Log new undo record at the start of Change Symbols.
Also fixes a bug where the "screen" variable was used with stale
data.

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

(cherry picked from commit 2b96161d0e)
2023-02-26 21:58:57 +00:00
Jeff Young 5979b8e385 Don't allocate all of memory when the coord system turns inside out.
Fixes https://gitlab.com/kicad/code/kicad/issues/14088

(cherry picked from commit fe9370ceea)
2023-02-26 21:58:08 +00:00
Roberto Fernandez Bautista 955bd5a6d1 CADSTAR Sch: Fix loading of graphical arc shapes
Correctly load arc shapes as real arcs instead of approximating now that
v7 supports graphical arcs in the schematic.

Also fix calculation of arc geometry for ccw arcs.

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


(cherry picked from commit 698d0b7e92)
2023-02-26 18:47:39 +00:00
qu1ck 1eb8191519 Treat dimensions in fp as text for bbox calculations
(cherry picked from commit 1ff021bb927e9a146f57277554f370f97c07041c)
2023-02-26 17:59:22 +00:00
qu1ck 396bda5611 Sync pcbnew selection with selected items after plugin is run
(cherry picked from commit 9f10c142c4)
2023-02-26 17:58:57 +00:00
Jon Evans cb334be8c4 PNS: Diff pairs can have different hole-to-hole size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993


(cherry picked from commit f12f2b8420)
2023-02-26 17:57:47 +00:00
Jon Evans 8845cc0556 PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993


(cherry picked from commit 459473ccc3)
2023-02-26 17:57:33 +00:00
Jon Evans e34800ad49 Allow shorting copper zones through negative clearance
This brings the zone filler in line with other places where
we use negative clearance rules to disable constraints.

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


(cherry picked from commit b176881d49)
2023-02-26 17:45:46 +00:00
qu1ck 5b574901b3 Fix swig mappings for PCB_BITMAP
From Master branch.
2023-02-26 10:28:59 +01:00
Alex 59b68154e1 Reduce some flickering in PCM.
(cherry picked from commit b592017495)
2023-02-26 08:34:49 +00:00
jean-pierre charras 5a501c8e48 kicad manager, OnOpenFileInTextEditor(): do not quote the filename.
It will be quoted later.
Fixes #14086
https://gitlab.com/kicad/code/kicad/issues/14086
2023-02-26 08:36:58 +01:00
Seth Hillbrand f927c15adf Prevent mutex deadlock
The overbar function in outline fonts recursively calls the text
function which already owns the lock.  To avoid this, we have an
unlocked variant that is wrapped by the exposed text function

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


(cherry picked from commit 81256c0fa4)
2023-02-25 13:44:18 +00:00
Jon Evans d08157f7db Re-disable validator for VALUE and add comment explaining it 2023-02-25 08:05:42 -05:00
jean-pierre charras 8a9ac4f01f Pcbnew: optimize netname and num text size and position display on pad.
Sizes where a bit too big. Fix also a difference between Cairo and OpenGL.
Fixes #13872
https://gitlab.com/kicad/code/kicad/issues/13872
2023-02-25 11:08:29 +01:00
Jon Evans 39df5f3b15 Do not invalidate board caches during DRC
Footprints now modify their parent container when destroyed due to
26542796, and a temporary footprint is created during DRC
in some situations.  This can lead to board caches being messed
with during DRC which can cause unpredictable bad effects due to
multithreading.

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


(cherry picked from commit 8440d7258b)
2023-02-25 03:56:27 +00:00
Jon Evans 981bf328ae Value field needs to use the normal text control
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14056
2023-02-24 22:18:31 -05:00
Jon Evans 1f8e9727b0 Set copper edge clearance to a more reasonable default
(cherry picked from commit 1215a967e2)
2023-02-25 01:43:55 +00:00
Jeff Young f604bcb557 Only write included models if they have overridden parameters.
Fixes https://gitlab.com/kicad/code/kicad/issues/13953

(cherry picked from commit 5a12e5ee76)
2023-02-24 20:47:22 +00:00
Jeff Young eccf9eb4a4 Change strategy for committing values from SIM_MODEL propGrid.
Note that the PCB editor's propGrid doesn't seem to need this workaround,
but I haven't yet figured out what's different between it and the sim model
propGrid.

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

(cherry picked from commit c188318174)
2023-02-24 20:47:22 +00:00
Jeff Young 39403fa885 Cleanup some dead code, and add a potentially needed fix for non-Mac.
(The Mac bug is fixed in 4e5b1da81fce7cd9ffedaec878ed07bfcfff4fe2 in
our wxWidgets fork.)

(cherry picked from commit 200a06a677)
2023-02-24 20:47:22 +00:00
Jeff Young 5e7cc30564 Don't mess up user formatting if eval'ing didn't actually change value.
Fixes https://gitlab.com/kicad/code/kicad/issues/13989

(cherry picked from commit 8059edff0e)
2023-02-24 20:47:22 +00:00
Jeff Young f942b4c657 Don't allow extra text in Sim.* fields.
(In particular, the field name.)

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

(cherry picked from commit 71df3f9edb)
2023-02-24 20:47:22 +00:00
Jeff Young f5aeb5b068 More dead code removal and a bit of formatting and const& for strings.
(cherry picked from commit a126d961d8)
2023-02-24 20:47:22 +00:00
Jeff Young 7f6cb9b07b Remove most of SIM_VALUE in favour of good old wxString.
This allows us to save the user's intent, including units, formatting,
and crucially variable references.

(cherry picked from commit 68fe146861)
2023-02-24 20:47:22 +00:00
Jeff Young db3657d411 Terminology and more dead code.
(cherry picked from commit 29f21cdde6)
2023-02-24 20:47:22 +00:00
Jeff Young 38e5da724d Remove dead and redundant code.
(cherry picked from commit 90adc26b73)
2023-02-24 20:47:22 +00:00
Marco Ciampa 24a63eb304 Updated Italian translation 2023-02-24 14:12:48 +01:00
jean-pierre charras c1f5ae1c5a Plot footprint texts: add code to plot Knockout texts.
Fixes #14068
https://gitlab.com/kicad/code/kicad/issues/14068
2023-02-24 08:49:56 +01:00
Jon Evans 009211c740 Fix some PCB_SHAPE properties
Hide irrelevant position/start/end properties
for shape classes that don't use them.


(cherry picked from commit 1651b44ab1)
2023-02-24 01:24:41 +00:00
Alex 1a208a1612 Print original netnames properly when reconnecting zones/vias.
Using GetNetname() after SetNet() isn't a good idea to get the original
name when updating PCB from Schematic.


(cherry picked from commit 9d96edc44f)
2023-02-23 20:30:39 +00:00
Alex b867e51c6c pcbnew: Fix pads losing nets after Undo.
Wasn't fixed in all places after being broken in
13f5c78e89


(cherry picked from commit f31e5ea783)
2023-02-23 20:30:20 +00:00
qu1ck 7693b93c50 Fix plugins in pcbnew breaking by opening fp editor
From master branch.
2023-02-23 15:31:00 +01:00
jean-pierre charras c3d7158669 Eeschema plot: honor B&W plot option for bitmap images.
Fixes #14013
https://gitlab.com/kicad/code/kicad/issues/14013
2023-02-23 09:53:35 +01:00
Marek Roszko 9f5e50f25e Fix typo in appearance_controls.cpp
(cherry picked from commit c2a4dd93e8)
2023-02-23 01:36:52 +00:00
Jon Evans a091ab76d7 Disable auto-refill zones
We need a more advanced dirtying system for this to work out for
many users, it turns out.  Right now too many changes cause full
zone refills which interrupt workflow.


(cherry picked from commit d8f4d04093)
2023-02-23 01:16:21 +00:00
jean-pierre charras d5eb242295 Fix incorrect tilt of italic texts when plotting them.
Fixes #14023
https://gitlab.com/kicad/code/kicad/issues/14023
2023-02-22 20:25:25 +01:00
Salvador E. Tropea b21e65fc5f Fix compatibility with wxWidgets 3.0.x
- Use CanonicalName when GetCanonicalWithRegion() isn't available
2023-02-22 19:23:55 +00:00
Jeff Young 1b07e81936 Fix compile error on OSX. 2023-02-22 18:06:32 +00:00
Jeff Young 962b2d45ef Implement default levels for JFETs, MOSFETs and MESFETs.
(cherry picked from commit fe2679d965)
2023-02-22 18:04:23 +00:00
Jeff Young 7894b41277 Don't allow 0 field text size.
Fixes https://gitlab.com/kicad/code/kicad/issues/13987

(cherry picked from commit cb71ea872b)
2023-02-22 18:04:23 +00:00
Jeff Young 51d0b8d2b5 Don't allow SCH_LABEL_LOCATE_ANY_T to steal SCH_LABEL_LOCATE_WIRE_T's items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13936

(cherry picked from commit 5967ab9a4d)
2023-02-22 18:04:23 +00:00
Jeff Young 7b992a1dc4 Correctly netlist a voltage source with both AC and DC values.
Fixes https://gitlab.com/kicad/code/kicad/issues/13912

(cherry picked from commit c618bb7046)
2023-02-22 18:04:21 +00:00
Jeff Young 2f8615c6c4 Don't use the just-in-time model resolver when updating the dialog.
If it changes in the middle it will leave you in a world of hurt.

Also don't update the library after a loss-of-focus unless the path
really changed.

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

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

(cherry picked from commit 64f1808d60)
2023-02-22 17:53:10 +00:00
Salvador E. Tropea aee6d9d01c Create the built-in colors in the constructor
This is needed so Python scripts can get built-in colors using the
SETTINGS_MANAGER.GetColorSettings() member.
Otherwise calling it with a built-in name crashes.
2023-02-22 09:12:22 -03:00
Marek Roszko fd4a0dbedf Fix up handling of font names available in multiple names
ttf fonts can declare multiple language names. Many by default opt to just declare one and not tag it any particular language.
However, there are CJK languages that typically leverage this function the most. They'll tag both a "en" and a cjk lang family name in CJK characters.

To be as user friendly as possible, we need to display said fonts in the CJK languages if KiCad to set to such a locale.

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


(cherry picked from commit 39e69a3d29)
2023-02-22 01:27:09 +00:00
Marek Roszko 14381ac68a Catch parsing exceptions of the local repository.json
Fixes KICAD-B9


(cherry picked from commit 6029fae30b)
2023-02-21 12:15:09 +00:00
Fabien Corona c00a98fed4 Revert "sim - Remember the option to save powers"
This reverts commit 74dcc1b9d5.
2023-02-20 20:59:52 +01:00
Mark Roszko aab7581909 Fix symbol contributor link
(cherry picked from commit 365c7be4ed)
2023-02-20 19:44:59 +00:00
Fabien Corona 74dcc1b9d5 sim - Remember the option to save powers
Fixes #13978


(cherry picked from commit 2a3b70b7eb)
2023-02-20 19:38:19 +00:00
Fabien Corona 17241b3543 sim - missing assignment 2023-02-20 18:15:37 +01:00
Fabien Corona a4a859f47b sim - Check FindParam() results before using them 2023-02-20 18:14:48 +01:00
Fabien Corona b66ed8bc41 sim - don't write dc parameter twice 2023-02-20 18:13:44 +01:00
Fabien Corona 754feff5e7 sim - allow sources that are both AC and TRAN 2023-02-20 18:12:36 +01:00
Fabien Corona cd1b425a80 sim: VSIN - allow user to specify a phase
TD is not the same as PHASE.
TD is the delay before the source turns on.
PHASE is ... the phase

If only TD is set, the signal starts later, but the phase is still 0 when compared to the t=0 of the simulation.

(cherry picked from commit 39a1b14a0f)
2023-02-20 08:45:09 +00:00
Marek Roszko 187947e8d8 Fix crash deleting project tree items
Fixes sentry KICAD-C2


(cherry picked from commit 7d25b6de87)
2023-02-19 15:12:07 +00:00
Marek Roszko 6b38927123 Fix crash parsing cadstar
Fixes sentry KICAD-B2
2023-02-19 08:11:33 -05:00
Marek Roszko f46e4049b6 Try to prevent a crash in mpFXY::Plot
Fixes sentry kicad-c0
2023-02-19 08:11:27 -05:00
Marek Roszko 0ea8299fa7 Fix copypasta typo in export pos
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13991


(cherry picked from commit 9b708ce6d1)
2023-02-19 05:24:36 +00:00
Marek Roszko 5d793193e0 Fix crash by using a shared_mutex to read/write lock the nickIndex
Fixes sentry kicad-ax
2023-02-18 13:02:25 -05:00
Mark Roszko 62337f75b8 FT_Face is also not thread, protect getTextAsGlyphs
(cherry picked from commit 7b4abb1f7b)
2023-02-17 15:17:11 +00:00
Marek Roszko 4d4fdfff70 freetype is not thread safe, zone filler can trigger multi-thread access
sentry KICAD-B1

https://freetype.org/freetype2/docs/reference/ft2-base_interface.html
[Since 2.5.6] In multi-threaded applications it is easiest to use one FT_Library object per thread.
In case this is too cumbersome, a single FT_Library object across threads is possible also, as long as a mutex lock is used around FT_New_Face and FT_Done_Face.


(cherry picked from commit 65d5b34da3)
2023-02-17 15:17:02 +00:00
Alex b63d0a3138 Keep image sizes when loading/saving 7.0- schematic file formats.
Previously, images were assumed to have 300 PPI density when loading from
schematic, but not after initial placement.


(cherry picked from commit bd4758e4df)
2023-02-17 01:50:01 +00:00
Alex 7949c09183 Prevent ghost image after canceling bitmap placement.
(cherry picked from commit ecb28ddf1c)
2023-02-17 01:49:47 +00:00
Seth Hillbrand 3f535aca8c Fix Ukrainian language name
Should refer to the language not to a Ukrainian person

(cherry picked from commit 576bef4ba0)
2023-02-16 15:11:14 -08:00
Jon Evans 9f44809164 Revert "Handle another case where schematic view was being cleared"
This reverts commit 245ce7259c.
2023-02-16 16:44:30 -05:00
Jon Evans f7ccb18af5 Revert "Symbol editor: stop removing overlay from view"
This reverts commit f36cd60fdb.
2023-02-16 16:44:20 -05:00
Jon Evans cca9945867 Revert "Fix handling of selection overlay in schematic editor"
This reverts commit e2711a6121.

This ended up being too complex for 7.0
2023-02-16 16:43:57 -05:00
Jeff Young f23c6b0c2f Clear dirty flags after a move.
Fixes https://gitlab.com/kicad/code/kicad/issues/11362

(cherry picked from commit 40e1296a8b)
2023-02-16 18:10:26 +00:00
Jeff Young 6d22b8c6ed Negative clearance means test won't run, not rule won't match.
Fixes https://gitlab.com/kicad/code/kicad/issues/13947
2023-02-16 18:10:26 +00:00
Jon Evans 245ce7259c Handle another case where schematic view was being cleared
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944


(cherry picked from commit ec2fc161e1)
2023-02-16 13:25:44 +00:00
Jon Evans f36cd60fdb Symbol editor: stop removing overlay from view
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13944


(cherry picked from commit 955a5a13eb)
2023-02-16 13:17:34 +00:00
jean-pierre charras 8467e2d376 Pcbnew: Do not change visibility objects when changing Visibility layers
Fixes #13836
https://gitlab.com/kicad/code/kicad/issues/13836
2023-02-16 12:42:25 +01:00
jean-pierre charras 2529918d5f Pcbnew: fix incorrect rotation of thermal spoke for rotated footprints.
If the footprint rotation is not a multiple of 90°, the thermal spokes
were not correctly rotated.
Fixes #13919
https://gitlab.com/kicad/code/kicad/issues/13919
2023-02-16 12:41:35 +01:00
Jon Evans e2711a6121 Fix handling of selection overlay in schematic editor
We weren't actually using the overlay group at all

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


(cherry picked from commit 0f18a36f8f)
2023-02-16 02:17:36 +00:00
Marek Roszko 89d22e5f94 update sentry-native to 0.6.0
primarily interested in windows bug fix to stack unwinding


(cherry picked from commit 041b7b196d)
2023-02-16 02:10:05 +00:00
jean-pierre charras f13fda9be5 Fix a QA test for bitmaps, to work with latest changes in bitmap code.
cherry pick from 05b68413f7
2023-02-15 15:56:12 +01:00
Ian McInerney 49f6a63a06 Fix compatibility with older wx versions
ToInt was only added in wx 3.1.6 apparently, so for now make them long
types. Fixes bug introduced in 1e8cc6855d

(Cherry-picked from 2b1040ae67)
2023-02-15 11:49:38 +00:00
Ian McInerney e078fea846 Relax wxPython version mismatch check to major.minor
The previous version check failed when the version was even slightly
different, including on the revision field. Theoretically the ABI of the
wx minor versions in use should be the same, so this might work. On the
other hand, with wxPython it could break as well. YOLO.

(Cherry-picked from 1e8cc6855d)
2023-02-15 11:49:15 +00:00
Ian McInerney 048c8b1670 Support subrelease field in wxWidgets cmake detection
Sometimes wxWidgets increments the subrelease to a non-zero value, and
since wxPython will report a subrelease, we must ensure we can get the
subrelease from the wx library properly, otherwise configure will fail
thinking the library isn't the same version as that used by wxPython.

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

(Cherry-picked from b536580119)
2023-02-15 11:48:53 +00:00
Marek Roszko 3b5c38d861 CURLINFO_SIZE_DOWNLOAD_T is a enum entry, use the version check instead
(cherry picked from commit c189053ee5)
2023-02-15 04:45:22 +00:00
Marek Roszko 90fb075e34 CURLOPT_XFERINFOFUNCTION is an enum entry not a define, the check is invalid
(cherry picked from commit 94b5ddbb50)
2023-02-15 04:26:51 +00:00
Jon Evans 08c6d9ce96 Set PPI properly in schematic bitmaps, too
(cherry picked from commit e8a88411ea)
2023-02-15 02:37:22 +00:00
Marek Roszko 76ccb8c31f Try and avoid crashing on gl context creation failure in the 3d viewer
Sentry event id 0ad4afa6b86a4a03ad7f8fdbcdb72f86


(cherry picked from commit 5ccf205788)
2023-02-15 02:20:14 +00:00
Jon Evans 3dfc502814 Router: Do not collide items within a net tie footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909

(cherry picked from commit 2d7c5c5c0f)
2023-02-14 21:10:42 -05:00
Jon Evans df0f626283 Properties: remove assertion that no longer makes sense
(cherry picked from commit e5b376721d)
2023-02-14 21:10:42 -05:00
Jon Evans 1909ce9220 Properties: fix rebuilding when availability changes
(cherry picked from commit 61dd4b7043)
2023-02-14 21:10:42 -05:00
Jon Evans 15bef82e1e Properties: add some validators for PAD
(cherry picked from commit 0b3928d38f)
2023-02-14 21:10:42 -05:00
Jon Evans 60a45241e6 Properties: introduce validators; re-enable zone hatch settings
(cherry picked from commit eb240fda9a)
2023-02-14 21:10:42 -05:00
Jon Evans d403e92315 Properties: introduce method chaining for initialization
(cherry picked from commit 254168c788)
2023-02-14 21:10:42 -05:00
Marek Roszko eed7ede376 Fix step colors some more
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13611

I need to refactor the overall structure and know what to do, but ugh lazy


(cherry picked from commit c6540575b5)
2023-02-15 00:45:17 +00:00
Jon Evans d20f49b58b Fix handling of PPI when loading embedded images
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13884


(cherry picked from commit 473979d686)
2023-02-15 00:42:30 +00:00
Jon Evans 37091df142 Symbol chooser: save UI settings even when canceled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13903

(cherry picked from commit 29c4482bc8)
2023-02-14 18:27:31 -05:00
Jon Evans 21081cf80f Handle custom columns in symbol tree synchronizing adapter
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13907

(cherry picked from commit 0913552f84)
2023-02-14 18:27:21 -05:00
Mark Roszko c213b37e96 Update 2 files
- /vcpkg-configuration.json
- /vcpkg.json
2023-02-14 23:12:05 +00:00
Seth Hillbrand d1ca84aa43 Don't desaturate the selection shadow
Selection shadows are helpful when showing which elements are selected
and there is no benefit (and some downside) to having their color
removed.

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

(cherry picked from commit 9f8b25a0b0)
2023-02-14 10:22:49 -08:00
Wayne Stambaugh 0f7fbc411a Allow plotting of multiple board layers per plot in Python.
Since the always plot the edge cuts layer  option was deprecate,
the ability to plot multiple board layers was exposed through the
PLOT_CONTROLLER object.

Added the interactive plot information which was overlooked during
version 7 development.

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

(cherry picked from commit eb83f76bff)
2023-02-14 09:53:16 -05:00
Jeff Young f4b2b1b03f Workaround wxWidgets enforced min pen width by using transparent pen.
Also fixes some bugs in our shape printing code when a border is not
specified but a fill is.

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

(cherry picked from commit 03484aedbc)
2023-02-14 14:45:24 +00:00
Marek Roszko 0ecc36c4a5 Fix step model colors again
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13882


(cherry picked from commit df022acc11)
2023-02-14 03:23:06 +00:00
Marek Roszko a48eace90a It's not impossible for the font face to fail loading
LoadFont()'s only usage already checked for nullptr to fallback, let's actually return nullptr on a failed load

Fixes sentry KICAD-8Z
Make the cause of sentry KICAD-95


(cherry picked from commit e8e407dfba)
2023-02-14 01:09:56 +00:00
Marek Roszko 7a2a51ad44 Prevent another GAL crash on init due to psuedo-race
Fixes Sentry KICAD-98


(cherry picked from commit 9647a22e50)
2023-02-14 00:11:15 +00:00
Seth Hillbrand f56fcb0a14 Better handling of vertex sorting
Nominally, the zcode of a vertex is unique.  This is not 100% true,
however, as we must interlace two 32-bit numbers into a single 32-bit
number.  Sorting needs to account for the possibility that the zcode
will be the same while other elements of the vertex are different.  This
commit fixes the broken boolean logic to more clearly handle these cases

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

(cherry picked from commit e7fe69b97f)
2023-02-13 11:23:14 -08:00
Jeff Young 7816652078 Account for border when calculating text margin for text boxes.
Also fixes some unnoticed issues with the textbox dialogs (probably
dating from the move to wxWidgets 3.2).

Fixes https://gitlab.com/kicad/code/kicad/issues/13877
2023-02-13 17:07:42 +00:00
Jeff Young 20aacc7026 Don't confuse .OP with .OPTIONS.
Fixes https://gitlab.com/kicad/code/kicad/issues/13849

(cherry picked from commit d6bef19811)
2023-02-13 13:34:40 +00:00
Jeff Young 49938cfd09 Fix layout issue in IBIS fields. 2023-02-13 12:42:42 +00:00
Jeff Young 53a4ed6b24 ReadDataFields must be a separate step from Create.
Create() is done without execption processing, while ReadDataFields
should have exception processing.

(This also fixes a case where exception processing on ReadDataFields
was missing.)

Also fixes a bug where the pinSelect menu wasn't checked for -1 before
fetching.

Fixes https://gitlab.com/kicad/code/kicad/issues/13856
2023-02-13 12:42:42 +00:00
Marek Roszko 534000b49d Ensure gal is initialized before letting DoRepaint blowup spectacularly.
Maybe a fix for KICAD-6B


(cherry picked from commit 58350b4521)
2023-02-13 12:21:44 +00:00
Jeff Young 7e2ccbf909 Prepend correct SPICE prefix when necessary for plotting currents.
Fixes https://gitlab.com/kicad/code/kicad/issues/13850

(cherry picked from commit a22964a977)
2023-02-13 10:59:32 +00:00
Jeff Young b0b6968185 Fix too-narrow text edit control on Mac.
Also makes the yellow error highlight in CvPCB a bit less jarring.

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

(cherry picked from commit 77421c8fb6)
2023-02-13 10:56:55 +00:00
Jeff Young 94963b5b3a Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802

(cherry picked from commit 13391176ae)
2023-02-13 10:55:07 +00:00
Jeff Young 77fa61e6fc Make sure screen RTrees are updated when changing bounding boxes.
(cherry picked from commit 7bc79c17d4)
2023-02-13 10:54:59 +00:00
Jeff Young 94c450ad16 Bug fixes for LIB_PIN boundbox generation.
(cherry picked from commit 9ce5978c3d)
2023-02-13 10:54:55 +00:00
Jeff Young a292bf7c83 Don't dirty connectivity when moving non-reference SCH_FIELD.
(cherry picked from commit 2e9ed67e05)
2023-02-13 10:54:49 +00:00
Marek Roszko b24ee1c44f Prevent a crash when a spice SW_I lacks two pin net names
Fixes KICAD-5D


(cherry picked from commit 2cc3d8e9bc)
2023-02-13 03:32:07 +00:00
Jon Evans 981b22ba49 Add initial sections to bare template
(cherry picked from commit 12a9ed0208)
2023-02-11 12:04:45 -05:00
Jon Evans e1eedd3bba Attempt to fix GitLab template duplication
(cherry picked from commit 609ef96e42)
2023-02-11 12:04:39 -05:00
Wayne Stambaugh b949fd4d43 Begin 7.0.1 development. 2023-02-11 11:36:50 -05:00
1337 changed files with 445016 additions and 200920 deletions
+5 -3
View File
@@ -14,7 +14,7 @@ default:
##########################################################################
# The variable CI_COMMIT_BEFORE_SHA is not available in normal merge requests
# so we must build the commit hash ourselves, see:
# https://gitlab.com/gitlab-org/gitlab/issues/12850
# https://gitlab.com/gitlab-org/gitlab/-/issues/12850
test_formatting:
stage: test
needs: []
@@ -23,8 +23,10 @@ test_formatting:
allow_failure: true
before_script:
# We must manually add the KiCad remote to ensure it is named sensibly
- git remote add product https://gitlab.com/kicad/code/kicad.git
- git remote add source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git
- git remote add product https://gitlab.com/kicad/code/kicad.git ||
git remote set-url product https://gitlab.com/kicad/code/kicad.git
- git remote add source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git ||
git remote set-url source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git
- git fetch -n product
- git fetch -n source
# Get the SHAs of the commits
+1 -1
View File
@@ -7,7 +7,7 @@ build_doxygen_docker:
- docker
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_BUILD_TOKEN" "$CI_REGISTRY"
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
script:
- docker build -t "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH" -f ./doxygen/doxygen.Dockerfile .
- docker push "${CI_REGISTRY_IMAGE}/doxygen:$CI_COMMIT_BRANCH"
+20
View File
@@ -0,0 +1,20 @@
<!-- --------Before Creating a New Issue-----------
* Limit report to a single issue.
* Search the issue tracker to verify the issue has not already been reported.
* Complete all instructions between `template comment markers <>.
* Keep report contents limited to the necessary information required to fix the issue.
* When creating an issue against the stable version of KiCad, make sure the latest available stable version is installed as issues may have already been resolved in later stable versions. -->
# Description
<!-- What is the current behavior and what is the expected behavior? -->
<!-- If the issue is visual/graphical, please attach screenshots of the problem. -->
<!-- Add the issue details below this line and before the "Steps to reproduce" heading. -->
# Steps to reproduce
<!-- If there are multiple steps to reproduce it or it is a visual issue, then providing a screen recording as an attachment to this report is recommended. -->
<!-- If this issue is specific to a project, please attach the necessary files to this issue. -->
<!-- Add the steps to reproduce using the numbers below -->
<!-- Add new step numbers before the "KiCad Version" heading. -->
1.
# KiCad Version
+25
View File
@@ -0,0 +1,25 @@
##########################################################################
# Test the formatting in a merge request using clang-format
##########################################################################
# The variable CI_COMMIT_BEFORE_SHA is not available in normal merge requests
# so we must build the commit hash ourselves, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/12850
test_formatting:
stage: test
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
allow_failure: true
before_script:
# We must manually add the KiCad remote to ensure it is named sensibly
- git remote add product https://gitlab.com/kicad/code/kicad.git
- git remote add source ${CI_MERGE_REQUEST_SOURCE_PROJECT_URL}.git
- git fetch -n product
- git fetch -n source
# Get the SHAs of the commits
- "TARGET_HEAD_SHA=$(git rev-parse product/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME})"
- "SOURCE_HEAD_SHA=$(git rev-parse source/${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME})"
- "MERGE_BASE_SHA=$(git merge-base ${TARGET_HEAD_SHA} ${SOURCE_HEAD_SHA})"
script:
- echo "Testing formatting from commit ${MERGE_BASE_SHA}"
- ./tools/check_coding.sh --diff --ci --commit ${MERGE_BASE_SHA}
+1 -1
View File
@@ -28,7 +28,7 @@
# GitLab supports displaying the results in the GUI through JUNIT artifacts
# (https://docs.gitlab.com/ee/ci/junit_test_reports.html)
# so we upload the JUNIT results. Note that there is a bug with how paths
# are processed in the junit report (https://gitlab.com/gitlab-org/gitlab/issues/23835)
# are processed in the junit report (https://gitlab.com/gitlab-org/gitlab/-/issues/23835)
# so we can't use a glob and have to list out each hierarchy separately.
artifacts:
reports:
+11 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Cirilo Bernardo <cirilo.bernardo@gmail.com>
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2023 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
@@ -294,6 +294,16 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
++bl;
}
// prevent loading non-plugin dlls
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
if( !path.GetName().StartsWith( "s3d_plugin" )
&& !path.GetName().StartsWith( "libs3d_plugin" ) )
{
return;
}
}
aPluginList.push_back( wxpath );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] found 3D plugin '%s'\n" ), wxpath.GetData() );
+16 -10
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2022 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 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
@@ -36,6 +36,7 @@
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <wx/log.h>
#include <pcbnew_settings.h>
#include <advanced_config.h>
@@ -92,8 +93,7 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
{
wxLogTrace( m_logTrace, wxT( "BOARD_ADAPTER::BOARD_ADAPTER" ) );
if( PgmOrNull() )
m_colors = Pgm().GetSettingsManager().GetColorSettings();
ReloadColorSettings();
m_boardPos = VECTOR2I();
m_boardSize = VECTOR2I();
@@ -208,6 +208,15 @@ BOARD_ADAPTER::~BOARD_ADAPTER()
}
void BOARD_ADAPTER::ReloadColorSettings() noexcept
{
wxASSERT( PgmOrNull() );
PCBNEW_SETTINGS* settings = Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
m_colors = Pgm().GetSettingsManager().GetColorSettings( settings->m_ColorTheme );
}
bool BOARD_ADAPTER::Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const
{
wxASSERT( aLayer < PCB_LAYER_ID_COUNT );
@@ -251,7 +260,8 @@ bool BOARD_ADAPTER::Is3dLayerEnabled( PCB_LAYER_ID aLayer ) const
case B_Cu:
case F_Cu:
return !m_board || m_board->IsLayerVisible( aLayer ) || m_Cfg->m_Render.realistic;
return !m_board || m_board->IsLayerVisible( aLayer ) || m_Cfg->m_Render.realistic
|| m_board->IsFootprintHolder();
default:
// the layer is an internal copper layer, used the visibility
@@ -647,11 +657,6 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
}
extern bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines,
int aErrorMax, int aChainingEpsilon,
OUTLINE_ERROR_HANDLER* aErrorHandler = nullptr );
bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
{
m_board_poly.RemoveAllContours();
@@ -671,7 +676,8 @@ bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
return false;
}
int chainingEpsilon = pcbIUScale.mmToIU( 0.02 ); // max dist from one endPt to next startPt
// max dist from one endPt to next startPt
int chainingEpsilon = m_board->GetOutlinesChainingEpsilon();
success = BuildFootprintPolygonOutlines( m_board, m_board_poly,
m_board->GetDesignSettings().m_MaxError,
+7 -4
View File
@@ -49,6 +49,7 @@
#include <dialogs/dialog_color_picker.h>
class COLOR_SETTINGS;
class PCB_TEXTBOX;
/// A type that stores a container of 2d objects for each layer id
typedef std::map<PCB_LAYER_ID, BVH_CONTAINER_2D*> MAP_CONTAINER_2D_BASE;
@@ -100,7 +101,7 @@ public:
void SetBoard( BOARD* aBoard ) noexcept { m_board = aBoard; }
const BOARD* GetBoard() const noexcept { return m_board; }
void SetColorSettings( COLOR_SETTINGS* aSettings ) noexcept { m_colors = aSettings; }
void ReloadColorSettings() noexcept;
/**
* Function to be called by the render when it need to reload the settings for the board.
@@ -342,14 +343,13 @@ private:
OBJECT_2D* createPadWithDrill( const PAD* aPad, int aInflateValue );
void addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId, bool aSkipNPTHPadsWihNoCopper, bool aSkipPlatedPads,
bool aSkipNonPlatedPads );
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads );
void addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId );
void addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aDstContainer,
const BOARD_ITEM* aOwner );
const BOARD_ITEM* aItem );
void addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner );
@@ -357,6 +357,9 @@ private:
void addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aDstContainer,
const BOARD_ITEM* aOwner );
void addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner );
void addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId );
@@ -44,6 +44,7 @@
#include <pcb_painter.h> // for PCB_RENDER_SETTINGS
#include <zone.h>
#include <fp_text.h>
#include <pcb_textbox.h>
#include <convert_basic_shapes_to_polygon.h>
#include <trigo.h>
#include <geometry/shape_segment.h>
@@ -64,7 +65,7 @@
void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
const BOARD_ITEM* aItem )
{
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
TEXT_ATTRIBUTES attrs = aText->GetAttributes();
@@ -74,34 +75,25 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
if( !font )
font = KIFONT::FONT::GetFont( wxEmptyString, aText->IsBold(), aText->IsItalic() );
if( aOwner && aOwner->IsKnockout() )
if( aItem && aItem->IsKnockout() )
{
SHAPE_POLY_SET knockouts;
CALLBACK_GAL callback_gal( empty_opts,
// Polygon callback
[&]( const SHAPE_LINE_CHAIN& aPoly )
{
knockouts.AddOutline( aPoly );
} );
attrs.m_StrokeWidth = aText->GetEffectiveTextPenWidth();
attrs.m_Angle = aText->GetDrawRotation();
callback_gal.SetIsFill( font->IsOutline() );
callback_gal.SetIsStroke( font->IsStroke() );
callback_gal.SetLineWidth( attrs.m_StrokeWidth );
font->Draw( &callback_gal, aText->GetShownText(), aText->GetDrawPos(), attrs );
int maxError = m_board->GetDesignSettings().m_MaxError;
SHAPE_POLY_SET finalPoly;
int margin = attrs.m_StrokeWidth * 1.5 +
GetKnockoutTextMargin( attrs.m_Size, attrs.m_StrokeWidth );
aText->TransformBoundingBoxToPolygon( &finalPoly, margin );
finalPoly.BooleanSubtract( knockouts, SHAPE_POLY_SET::PM_FAST );
finalPoly.Fracture( SHAPE_POLY_SET::PM_FAST );
if( aItem->Type() == PCB_FP_TEXT_T )
{
static_cast<const FP_TEXT*>( aItem )->TransformTextToPolySet( finalPoly, 0, maxError,
ERROR_INSIDE );
}
else if( aItem->Type() == PCB_TEXT_T )
{
static_cast<const PCB_TEXT*>( aItem )->TransformTextToPolySet( finalPoly, 0, maxError,
ERROR_INSIDE );
}
ConvertPolygonToTriangles( finalPoly, *aContainer, m_biuTo3Dunits, *aOwner );
// Do not call finalPoly.Fracture() here: ConvertPolygonToTriangles() call it
// if needed, and Fracture() called twice can create bad results and is useless
ConvertPolygonToTriangles( finalPoly, *aContainer, m_biuTo3Dunits, *aItem );
}
else
{
@@ -120,24 +112,24 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
{
// Cannot add segments that have the same start and end point
aContainer->Add( new FILLED_CIRCLE_2D( pt1_3DU, penWidth_3DU / 2,
*aOwner ) );
*aItem ) );
}
else
{
aContainer->Add( new ROUND_SEGMENT_2D( pt1_3DU, pt2_3DU, penWidth_3DU,
*aOwner ) );
*aItem ) );
}
},
// Triangulation callback
[&]( const VECTOR2I& aPt1, const VECTOR2I& aPt2, const VECTOR2I& aPt3 )
{
aContainer->Add( new TRIANGLE_2D( TO_SFVEC2F( aPt1 ), TO_SFVEC2F( aPt2 ),
TO_SFVEC2F( aPt3 ), *aOwner ) );
TO_SFVEC2F( aPt3 ), *aItem ) );
} );
attrs.m_Angle = aText->GetDrawRotation();
font->Draw( &callback_gal, aText->GetShownText(), aText->GetDrawPos(), attrs );
font->Draw( &callback_gal, aText->GetShownText( true ), aText->GetDrawPos(), attrs );
}
}
@@ -145,7 +137,7 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
void BOARD_ADAPTER::addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
addText( &aDimension->Text(), aContainer, aDimension );
addText( aDimension, aContainer, aDimension );
const int linewidth = aDimension->GetLineThickness();
@@ -210,7 +202,8 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2
if( textbox->GetLayer() == aLayerId )
{
addShape( textbox, aContainer, aFootprint );
if( textbox->IsBorderEnabled() )
addShape( textbox, aContainer, aFootprint );
addText( textbox, aContainer, aFootprint );
}
@@ -269,12 +262,29 @@ void BOARD_ADAPTER::createTrack( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDs
{
const PCB_ARC* arc = static_cast<const PCB_ARC*>( aTrack );
if( arc->IsDegenerated() )
{
// Draw this very small arc like a track segment (a PCB_TRACE_T)
PCB_TRACK track( arc->GetParent() );
track.SetStart( arc->GetStart() );
track.SetEnd( arc->GetEnd() );
track.SetWidth( arc->GetWidth() );
track.SetLayer( arc->GetLayer() );
createTrack( &track, aDstContainer );
return;
}
VECTOR2D center( arc->GetCenter() );
EDA_ANGLE arc_angle = arc->GetAngle();
double radius = arc->GetRadius();
int arcsegcount = GetArcToSegmentCount( radius, ARC_HIGH_DEF, arc_angle );
int circlesegcount;
// Avoid arcs that cannot be drawn
if( radius < std::numeric_limits<double>::min() || arc_angle.IsZero() )
break;
// We need a circle to segment count. However, the arc angle can be small, and the
// radius very big. so we calculate a reasonable value for circlesegcount.
if( arcsegcount <= 1 ) // The arc will be approximated by a segment
@@ -488,41 +498,24 @@ OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue
void BOARD_ADAPTER::addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId, bool aSkipNPTHPadsWihNoCopper,
bool aSkipPlatedPads, bool aSkipNonPlatedPads )
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads )
{
for( PAD* pad : aFootprint->Pads() )
{
if( !pad->IsOnLayer( aLayerId ) )
continue;
// Skip pad annulus when not connected on this layer (if removing is enabled)
if( !pad->FlashLayer( aLayerId ) && IsCopperLayer( aLayerId ) )
continue;
// NPTH pads are not drawn on layers if the shape size and pos is the same as their hole:
if( aSkipNPTHPadsWihNoCopper && ( pad->GetAttribute() == PAD_ATTRIB::NPTH ) )
if( IsCopperLayer( aLayerId ) )
{
if( pad->GetDrillSize() == pad->GetSize() && pad->GetOffset() == wxPoint( 0, 0 ) )
{
switch( pad->GetShape() )
{
case PAD_SHAPE::CIRCLE:
if( pad->GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
continue;
// Skip pad annulus when there isn't one (note: this is more discerning than
// pad->IsOnLayer(), which doesn't check for NPTH pads with holes that consume
// the entire pad).
if( !pad->IsOnCopperLayer() )
continue;
break;
case PAD_SHAPE::OVAL:
if( pad->GetDrillShape() != PAD_DRILL_SHAPE_CIRCLE )
continue;
break;
default:
break;
}
}
// Skip pad annulus when not connected on this layer (if removing is enabled)
if( !pad->FlashLayer( aLayerId ) )
continue;
}
VECTOR2I margin( 0, 0 );
@@ -647,16 +640,12 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
if( inner_radius3DU < 0 )
inner_radius3DU = 0.0;
if( outer_radius3DU == 0.0 )
{
// Don't attempt to render degenerate shapes
}
else if( aShape->IsFilled() )
if( aShape->IsFilled() )
{
aContainer->Add( new FILLED_CIRCLE_2D( center3DU, outer_radius3DU,
*aOwner ) );
}
else
else if( outer_radius3DU > inner_radius3DU )
{
aContainer->Add( new RING_2D( center3DU, inner_radius3DU, outer_radius3DU,
*aOwner ) );
@@ -732,6 +721,11 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, ARC_HIGH_DEF,
ERROR_INSIDE );
// Some polygons can be a bit complex (especially when coming from a
// picture ot a text converted to a polygon
// So call Simplify before calling ConvertPolygonToTriangles, just in case.
polyList.Simplify( SHAPE_POLY_SET::PM_FAST );
if( polyList.IsEmpty() ) // Just for caution
break;
@@ -779,6 +773,32 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
}
void BOARD_ADAPTER::addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
addText( aTextBox, aContainer, aOwner );
if( !aTextBox->IsBorderEnabled() )
return;
// We cannot use PCB_TEXTBOX::TransformShapeToPolygon because it convert the textbox
// as filled polygon even if there's no background colour.
// So for polygon, we use PCB_SHAPE::TransformShapeToPolygon
if( aTextBox->GetShape() == SHAPE_T::RECT )
addShape( static_cast<const PCB_SHAPE*>( aTextBox ), aContainer, aOwner );
else
{
SHAPE_POLY_SET polyList;
aTextBox->PCB_SHAPE::TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0,
ARC_HIGH_DEF, ERROR_INSIDE );
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
}
}
void BOARD_ADAPTER::addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId )
{
@@ -804,7 +824,7 @@ void BOARD_ADAPTER::buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BAS
}
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon();
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon( ERROR_INSIDE );
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
for( int j = 0; j < path.PointCount(); j++ )
+8 -12
View File
@@ -525,9 +525,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// ADD PADS
for( FOOTPRINT* footprint : m_board->Footprints() )
{
// Note: NPTH pads are not drawn on copper layers when the pad has the same shape
// as its hole
addPads( footprint, layerContainer, layer, true, renderPlatedPadsAsPlated, false );
addPads( footprint, layerContainer, layer, renderPlatedPadsAsPlated, false );
// Micro-wave footprints may have items on copper layers
addFootprintShapes( footprint, layerContainer, layer );
@@ -539,8 +537,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// ADD PLATED PADS
for( FOOTPRINT* footprint : m_board->Footprints() )
{
addPads( footprint, m_platedPadsFront, F_Cu, true, false, true );
addPads( footprint, m_platedPadsBack, B_Cu, true, false, true );
addPads( footprint, m_platedPadsFront, F_Cu, false, true );
addPads( footprint, m_platedPadsBack, B_Cu, false, true );
}
m_platedPadsFront->BuildBVH();
@@ -606,7 +604,6 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break;
case PCB_TEXTBOX_T:
addText( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
addShape( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
break;
@@ -651,7 +648,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
text->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
break;
}
@@ -659,7 +656,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
textbox->TransformTextToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
textbox->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
break;
}
@@ -925,7 +922,6 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break;
case PCB_TEXTBOX_T:
addText( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
addShape( static_cast<PCB_TEXTBOX*>( item ), layerContainer, item );
break;
@@ -960,7 +956,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
text->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
break;
}
@@ -968,7 +964,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
textbox->TransformTextToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
textbox->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
break;
}
@@ -995,7 +991,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
else
{
addPads( footprint, layerContainer, layer, false, false, false );
addPads( footprint, layerContainer, layer, false, false );
}
addFootprintShapes( footprint, layerContainer, layer );
+1 -1
View File
@@ -51,7 +51,7 @@ void BOARD_ADAPTER::buildPadOutlineAsPolygon( const PAD* aPad, SHAPE_POLY_SET& a
}
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon();
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon( ERROR_INSIDE );
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
for( int ii = 0; ii < path.PointCount(); ++ii )
+16 -5
View File
@@ -32,6 +32,7 @@
#include <3d_rendering/raytracing/render_3d_raytrace.h>
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <board.h>
#include <reporter.h>
#include <gl_context_mgr.h>
@@ -140,7 +141,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
// long calculation time)
m_3d_render = m_3d_render_opengl;
m_boardAdapter.SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
m_boardAdapter.ReloadColorSettings();
wxASSERT( a3DCachePointer != nullptr );
m_boardAdapter.Set3dCacheManager( a3DCachePointer );
@@ -303,7 +304,7 @@ void EDA_3D_CANVAS::ReloadRequest( BOARD* aBoard , S3D_CACHE* aCachePointer )
if( aBoard != nullptr )
m_boardAdapter.SetBoard( aBoard );
m_boardAdapter.SetColorSettings( Pgm().GetSettingsManager().GetColorSettings() );
m_boardAdapter.ReloadColorSettings();
if( m_3d_render )
m_3d_render->ReloadRequest();
@@ -383,6 +384,15 @@ void EDA_3D_CANVAS::DoRePaint()
if( m_glRC == nullptr )
m_glRC = GL_CONTEXT_MANAGER::Get().CreateCtx( this );
// CreateCtx could and does fail per sentry crash events, lets be graceful
if( m_glRC == nullptr )
{
warningReporter.Report( _( "OpenGL context creation error" ), RPT_SEVERITY_ERROR );
warningReporter.Finalize();
m_is_currently_painting.clear();
return;
}
GL_CONTEXT_MANAGER::Get().LockCtx( m_glRC, this );
// Set the OpenGL viewport according to the client size of this canvas.
@@ -522,13 +532,11 @@ void EDA_3D_CANVAS::DoRePaint()
render_pivot( curtime_delta_s, scale );
}
#if defined( KICAD_USE_3DCONNEXION )
if( m_render3dmousePivot )
if( m_render3dmousePivot && ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
{
const float scale = glm::min( m_camera.GetZoom(), 1.0f );
render3dmousePivot( scale );
}
#endif
// "Swaps the double-buffer of this window, making the back-buffer the
// front-buffer and vice versa, so that the output of the previous OpenGL
@@ -629,6 +637,9 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
return; // Prevents using invalid m_3d_render_raytracing data
if( m_camera_is_moving )
return;
-7
View File
@@ -178,8 +178,6 @@ public:
*/
void SetRenderPivot( bool aValue ) { m_render_pivot = aValue; }
#if defined( KICAD_USE_3DCONNEXION )
/**
* Get a value indicating whether to render the 3dmouse pivot.
*/
@@ -209,7 +207,6 @@ public:
{
m_3dmousePivotPos = aPos;
}
#endif
private:
/**
@@ -278,14 +275,12 @@ private:
*/
void render_pivot( float t, float aScale );
#if defined( KICAD_USE_3DCONNEXION )
/**
* Render the 3dmouse pivot cursor.
*
* @param aScale scale to apply on the cursor.
*/
void render3dmousePivot( float aScale );
#endif
/**
* @return true if OpenGL initialization succeeded.
@@ -331,10 +326,8 @@ private:
BOARD_ITEM* m_currentRollOverItem;
#if defined( KICAD_USE_3DCONNEXION )
bool m_render3dmousePivot = false; // Render the 3dmouse pivot
SFVEC3F m_3dmousePivotPos; // The position of the 3dmouse pivot
#endif
/**
* Trace mask used to enable or disable the trace output of this class.
@@ -120,7 +120,6 @@ void EDA_3D_CANVAS::render_pivot( float t, float aScale )
}
#if defined( KICAD_USE_3DCONNEXION )
void EDA_3D_CANVAS::render3dmousePivot( float aScale )
{
wxASSERT( aScale >= 0.0f );
@@ -160,4 +159,3 @@ void EDA_3D_CANVAS::render3dmousePivot( float aScale )
glDisable( GL_BLEND );
glDisable( GL_POINT_SMOOTH );
}
#endif
@@ -257,6 +257,13 @@ void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
if( m_glRC == nullptr )
m_glRC = GL_CONTEXT_MANAGER::Get().CreateCtx( this );
// CreateCtx could and does fail per sentry crash events, lets be graceful
if( m_glRC == nullptr )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint creating gl context failed" ) );
return;
}
GL_CONTEXT_MANAGER::Get().LockCtx( m_glRC, this );
// Set the OpenGL viewport according to the client size of this canvas.
@@ -323,8 +330,16 @@ void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event )
m_ogl_3dmodel->BeginDrawMulti( true );
m_ogl_3dmodel->DrawOpaque( false );
glDepthMask( GL_FALSE );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
m_ogl_3dmodel->DrawTransparent( 1.0f, false );
glDisable( GL_BLEND );
glDepthMask( GL_TRUE );
m_ogl_3dmodel->EndDrawMulti();
glPopMatrix();
-6
View File
@@ -1,4 +1,3 @@
if( KICAD_USE_3DCONNEXION )
add_library(3d-viewer_navlib STATIC
"nl_3d_viewer_plugin.cpp"
"nl_3d_viewer_plugin_impl.cpp"
@@ -23,9 +22,4 @@ if( KICAD_USE_3DCONNEXION )
$<TARGET_PROPERTY:3DxWare::Navlib,INTERFACE_LINK_LIBRARIES>
3DxWare::Navlib
)
else()
add_library(3d-viewer_navlib STATIC
"nl_3d_viewer_plugin.cpp"
)
endif(KICAD_USE_3DCONNEXION)
+6 -22
View File
@@ -19,14 +19,14 @@
*/
#include "nl_3d_viewer_plugin.h"
#if defined( KICAD_USE_3DCONNEXION )
#include "nl_3d_viewer_plugin_impl.h"
#include <advanced_config.h>
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport ) :
m_impl( new NL_3D_VIEWER_PLUGIN_IMPL( aViewport ) )
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport )
{
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
m_impl = new NL_3D_VIEWER_PLUGIN_IMPL( aViewport );
}
@@ -38,22 +38,6 @@ NL_3D_VIEWER_PLUGIN::~NL_3D_VIEWER_PLUGIN()
void NL_3D_VIEWER_PLUGIN::SetFocus( bool focus )
{
m_impl->SetFocus( focus );
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
m_impl->SetFocus( focus );
}
#else
NL_3D_VIEWER_PLUGIN::NL_3D_VIEWER_PLUGIN( EDA_3D_CANVAS* aViewport ) : m_impl( nullptr )
{
}
void NL_3D_VIEWER_PLUGIN::SetFocus( bool focus )
{
}
NL_3D_VIEWER_PLUGIN::~NL_3D_VIEWER_PLUGIN()
{
}
#endif
+96 -15
View File
@@ -27,13 +27,14 @@
* @file c_ogl_3dmodel.cpp
* @brief
*/
#include <algorithm>
#include <stdexcept>
#include <gal/opengl/kiglew.h> // Must be included first
#include "3d_model.h"
#include "opengl_utils.h"
#include "../common_ogl/ogl_utils.h"
#include "../3d_math.h"
#include <utility>
#include <wx/debug.h>
#include <wx/log.h>
#include <chrono>
@@ -177,9 +178,11 @@ MODEL_3D::MODEL_3D( const S3DMODEL& a3DModel, MATERIAL_MODE aMaterialMode )
// use material color for mesh bounding box or some sort of average vertex color.
glm::vec3 avg_color = material.m_Diffuse;
BBOX_3D &mesh_bbox = m_meshes_bbox[mesh_i];
for( unsigned int vtx_i = 0; vtx_i < mesh.m_VertexSize; ++vtx_i )
{
m_meshes_bbox[mesh_i].Union( mesh.m_Positions[vtx_i] );
mesh_bbox.Union( mesh.m_Positions[vtx_i] );
VERTEX& vtx_out = mesh_group.m_vertices[vtx_offset + vtx_i];
@@ -222,16 +225,19 @@ MODEL_3D::MODEL_3D( const S3DMODEL& a3DModel, MATERIAL_MODE aMaterialMode )
}
}
if( m_meshes_bbox[mesh_i].IsInitialized() )
if( mesh_bbox.IsInitialized() )
{
// generate geometry for the bounding box
MakeBbox( m_meshes_bbox[mesh_i], ( mesh_i + 1 ) * bbox_vtx_count,
MakeBbox( mesh_bbox, ( mesh_i + 1 ) * bbox_vtx_count,
&bbox_tmp_vertices[( mesh_i + 1 ) * bbox_vtx_count],
&bbox_tmp_indices[( mesh_i + 1 ) * bbox_idx_count],
{ avg_color, 1.0f } );
// bump the outer bounding box
m_model_bbox.Union( m_meshes_bbox[mesh_i] );
m_model_bbox.Union( mesh_bbox );
// add to the material group
material.m_bbox.Union( mesh_bbox );
}
@@ -410,7 +416,9 @@ void MODEL_3D::EndDrawMulti()
void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
SFVEC3F& aSelectionColor ) const
const SFVEC3F& aSelectionColor,
const glm::mat4 *aModelWorldMatrix,
const SFVEC3F *aCameraWorldPos ) const
{
if( aOpacity <= FLT_EPSILON )
return;
@@ -439,27 +447,100 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, (const float*)&param.x );
for( const MODEL_3D::MATERIAL& mat : m_materials )
std::vector<const MODEL_3D::MATERIAL *> materialsToRender;
materialsToRender.reserve( m_materials.size() );
if( aModelWorldMatrix && aCameraWorldPos )
{
if( ( mat.IsTransparent() != aTransparent )
// Sort Material groups
std::vector<std::pair<const MODEL_3D::MATERIAL*, float>> materialsSorted;
// Calculate the distance to the camera for each material group
for( const MODEL_3D::MATERIAL& mat : m_materials )
{
if( mat.m_render_idx_count == 0 )
{
continue;
}
if( ( mat.IsTransparent() != aTransparent )
&& ( aOpacity >= 1.0f )
&& m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY )
{
continue;
{
continue;
}
const BBOX_3D& bBox = mat.m_bbox;
const SFVEC3F& bBoxCenter = bBox.GetCenter();
const SFVEC3F bBoxWorld = *aModelWorldMatrix * glm::vec4( bBoxCenter, 1.0f );
const float distanceToCamera = glm::length( *aCameraWorldPos - bBoxWorld );
materialsSorted.emplace_back( &mat, distanceToCamera );
}
// Sort from back to front
std::sort( materialsSorted.begin(), materialsSorted.end(),
[&]( std::pair<const MODEL_3D::MATERIAL*, float>& a,
std::pair<const MODEL_3D::MATERIAL*, float>& b )
{
bool aInsideB = a.first->m_bbox.Inside( b.first->m_bbox );
bool bInsideA = b.first->m_bbox.Inside( a.first->m_bbox );
// If A is inside B, then A is rendered first
if( aInsideB != bInsideA )
return bInsideA;
if( a.second != b.second )
return a.second > b.second;
return a.first > b.first; // compare pointers as a last resort
} );
for( const std::pair<const MODEL_3D::MATERIAL*, float>& mat : materialsSorted )
{
materialsToRender.push_back( mat.first );
}
}
else
{
for( const MODEL_3D::MATERIAL& mat : m_materials )
{
// There is at least one default material created in case a mesh has no declared materials.
// Most meshes have a material, so usually the first material will have nothing to render and is skip.
// See S3D::GetModel for more details.
if( mat.m_render_idx_count == 0 )
{
continue;
}
if( ( mat.IsTransparent() != aTransparent )
&& ( aOpacity >= 1.0f )
&& m_materialMode != MATERIAL_MODE::DIFFUSE_ONLY )
{
continue;
}
materialsToRender.push_back( &mat );
}
}
for( const MODEL_3D::MATERIAL* mat : materialsToRender )
{
switch( m_materialMode )
{
case MATERIAL_MODE::NORMAL:
OglSetMaterial( mat, aOpacity, aUseSelectedMaterial, aSelectionColor );
OglSetMaterial( *mat, aOpacity, aUseSelectedMaterial, aSelectionColor );
break;
case MATERIAL_MODE::DIFFUSE_ONLY:
OglSetDiffuseMaterial( mat.m_Diffuse, aOpacity, aUseSelectedMaterial, aSelectionColor );
OglSetDiffuseMaterial( mat->m_Diffuse, aOpacity, aUseSelectedMaterial, aSelectionColor );
break;
case MATERIAL_MODE::CAD_MODE:
OglSetDiffuseMaterial( MaterialDiffuseToColorCAD( mat.m_Diffuse ), aOpacity,
OglSetDiffuseMaterial( MaterialDiffuseToColorCAD( mat->m_Diffuse ), aOpacity,
aUseSelectedMaterial, aSelectionColor );
break;
@@ -467,9 +548,9 @@ void MODEL_3D::Draw( bool aTransparent, float aOpacity, bool aUseSelectedMateria
break;
}
glDrawElements( GL_TRIANGLES, mat.m_render_idx_count, m_index_buffer_type,
glDrawElements( GL_TRIANGLES, mat->m_render_idx_count, m_index_buffer_type,
reinterpret_cast<const void*>(
static_cast<uintptr_t>( mat.m_render_idx_buffer_offset ) ) );
static_cast<uintptr_t>( mat->m_render_idx_buffer_offset ) ) );
}
}
+14 -5
View File
@@ -54,7 +54,7 @@ public:
*/
void DrawOpaque( bool aUseSelectedMaterial, SFVEC3F aSelectionColor = SFVEC3F( 0.0f ) ) const
{
Draw( false, 1.0f, aUseSelectedMaterial, aSelectionColor );
Draw( false, 1.0f, aUseSelectedMaterial, aSelectionColor, nullptr, nullptr );
}
/**
@@ -63,9 +63,19 @@ public:
void DrawTransparent( float aOpacity, bool aUseSelectedMaterial,
SFVEC3F aSelectionColor = SFVEC3F( 0.0f ) ) const
{
Draw( true, aOpacity, aUseSelectedMaterial, aSelectionColor );
Draw( true, aOpacity, aUseSelectedMaterial, aSelectionColor, nullptr, nullptr );
}
/**
* Render the model into the current context.
* if aModelWorldMatrix and aCameraWorldPos is provided,
* it renders the material groups sorted.
*/
void Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
const SFVEC3F& aSelectionColor,
const glm::mat4 *aModelWorldMatrix,
const SFVEC3F *aCameraWorldPos ) const;
/**
* Return true if have opaque meshes to render.
*/
@@ -136,6 +146,8 @@ private:
unsigned int m_render_idx_buffer_offset = 0;
unsigned int m_render_idx_count = 0;
BBOX_3D m_bbox; ///< bounding box for this material group, used for transparent material ordering
MATERIAL( const SMATERIAL& aOther ) : SMATERIAL( aOther ) { }
bool IsTransparent() const { return m_Transparency > FLT_EPSILON; }
};
@@ -159,9 +171,6 @@ private:
static void MakeBbox( const BBOX_3D& aBox, unsigned int aIdxOffset, VERTEX* aVtxOut,
GLuint* aIdxOut, const glm::vec4& aColor );
void Draw( bool aTransparent, float aOpacity, bool aUseSelectedMaterial,
SFVEC3F& aSelectionColor ) const;
};
#endif // _MODEL_3D_H_
+30 -4
View File
@@ -27,6 +27,7 @@
#include <board.h>
#include <footprint.h>
#include "../../3d_math.h"
#include "convert_basic_shapes_to_polygon.h"
#include <trigo.h>
#include <project.h>
#include <profile.h> // To use GetRunningMicroSecs or another profiling utility
@@ -775,6 +776,9 @@ void RENDER_3D_OPENGL::generateViasAndPads()
{
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( via->GetViaType() == VIATYPE::THROUGH )
continue; // handle with pad holes so castellation is taken into account
const float holediameter = via->GetDrillValue() * m_boardAdapter.BiuTo3dUnits();
const int nrSegments = m_boardAdapter.GetCircleSegmentCount( via->GetDrillValue() );
const float hole_inner_radius = holediameter / 2.0f;
@@ -804,14 +808,33 @@ void RENDER_3D_OPENGL::generateViasAndPads()
}
if( m_boardAdapter.GetHoleCount() > 0 )
if( m_boardAdapter.GetHoleCount() > 0 || m_boardAdapter.GetViaCount() > 0 )
{
SHAPE_POLY_SET tht_outer_holes_poly; // Stores the outer poly of the copper holes (the pad)
SHAPE_POLY_SET tht_inner_holes_poly; // Stores the inner poly of the copper holes (the hole)
SHAPE_POLY_SET tht_outer_holes_poly; // Stores the outer poly of the copper holes
SHAPE_POLY_SET tht_inner_holes_poly; // Stores the inner poly of the copper holes
tht_outer_holes_poly.RemoveAllContours();
tht_inner_holes_poly.RemoveAllContours();
// Insert through-via holes (vertical cylinders)
for( const PCB_TRACK* track : m_boardAdapter.GetBoard()->Tracks() )
{
if( track->Type() == PCB_VIA_T )
{
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( via->GetViaType() == VIATYPE::THROUGH )
{
TransformCircleToPolygon( tht_outer_holes_poly, via->GetPosition(),
via->GetDrill() / 2 + platingThickness,
ARC_HIGH_DEF, ERROR_INSIDE );
TransformCircleToPolygon( tht_inner_holes_poly, via->GetPosition(),
via->GetDrill() / 2, ARC_HIGH_DEF, ERROR_INSIDE );
}
}
}
// Insert pads holes (vertical cylinders)
for( const FOOTPRINT* footprint : m_boardAdapter.GetBoard()->Footprints() )
{
@@ -903,7 +926,9 @@ void RENDER_3D_OPENGL::Load3dModelsIfNeeded()
load3dModels( &activityReporter );
}
else
{
load3dModels( nullptr );
}
}
@@ -912,7 +937,8 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
if( !m_boardAdapter.GetBoard() )
return;
if( !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
if( !m_boardAdapter.m_IsPreviewer
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_insert
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_virtual )
{
@@ -22,14 +22,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <cstdint>
#include <gal/opengl/kiglew.h> // Must be included first
#include "plugins/3dapi/xv3d_types.h"
#include "render_3d_opengl.h"
#include "opengl_utils.h"
#include "common_ogl/ogl_utils.h"
#include <footprint.h>
#include <3d_math.h>
#include <glm/geometric.hpp>
#include <math/util.h> // for KiROUND
#include <utility>
#include <vector>
#include <wx/log.h>
#include <base_units.h>
@@ -797,11 +802,14 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
{
setLayerMaterial( layer_id );
OPENGL_RENDER_LIST* throughHolesOuter =
m_boardAdapter.m_Cfg->m_Render.clip_silk_on_via_annulus
&& m_boardAdapter.m_Cfg->m_Render.realistic
&& ( layer_id == B_SilkS || layer_id == F_SilkS ) ? m_outerThroughHoleRings
: m_outerThroughHoles;
OPENGL_RENDER_LIST* throughHolesOuter = m_outerThroughHoles;
if( m_boardAdapter.m_Cfg->m_Render.clip_silk_on_via_annulus
&& m_boardAdapter.m_Cfg->m_Render.realistic
&& ( layer_id == B_SilkS || layer_id == F_SilkS ) )
{
throughHolesOuter = m_outerThroughHoleRings;
}
if( throughHolesOuter )
{
@@ -819,11 +827,20 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
- pLayerDispList->GetZBot() );
}
if( !skipRenderHoles
&& m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk
&& m_boardAdapter.m_Cfg->m_Render.realistic
&& ( ( layer_id == B_SilkS && m_layers.find( B_Mask ) != m_layers.end() )
|| ( layer_id == F_SilkS && m_layers.find( F_Mask ) != m_layers.end() ) ) )
if( skipRenderHoles )
{
// Do not render Paste layers when skipRenderHoles is enabled
// otherwise it will cause z-fight issues
if( layer_id != B_Paste && layer_id != F_Paste )
{
pLayerDispList->DrawAllCameraCulledSubtractLayer( drawMiddleSegments,
anti_board );
}
}
else if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk
&& m_boardAdapter.m_Cfg->m_Render.realistic
&& ( ( layer_id == B_SilkS && m_layers.find( B_Mask ) != m_layers.end() )
|| ( layer_id == F_SilkS && m_layers.find( F_Mask ) != m_layers.end() ) ) )
{
const PCB_LAYER_ID layerMask_id = (layer_id == B_SilkS) ? B_Mask : F_Mask;
@@ -833,34 +850,28 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
pLayerDispListMask,
throughHolesOuter, anti_board );
}
else if( throughHolesOuter )
{
pLayerDispList->DrawAllCameraCulledSubtractLayer( drawMiddleSegments, nullptr,
throughHolesOuter,
anti_board );
}
else
{
if( !skipRenderHoles && throughHolesOuter
&& ( layer_id == B_SilkS || layer_id == F_SilkS ) )
{
pLayerDispList->DrawAllCameraCulledSubtractLayer( drawMiddleSegments, nullptr,
throughHolesOuter,
anti_board );
}
else
{
// Do not render Paste layers when skipRenderHoles is enabled
// otherwise it will cause z-fight issues
if( !( skipRenderHoles && ( layer_id == B_Paste || layer_id == F_Paste ) ) )
{
pLayerDispList->DrawAllCameraCulledSubtractLayer( drawMiddleSegments,
anti_board );
}
}
pLayerDispList->DrawAllCameraCulledSubtractLayer( drawMiddleSegments,
anti_board );
}
}
glPopMatrix();
}
glm::mat4 cameraViewMatrix;
glGetFloatv( GL_MODELVIEW_MATRIX, glm::value_ptr( cameraViewMatrix ) );
// Render 3D Models (Non-transparent)
render3dModels( false, false );
render3dModels( true, false );
renderOpaqueModels( cameraViewMatrix );
// Display board body
if( m_boardAdapter.m_Cfg->m_Render.show_board_body )
@@ -922,8 +933,7 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
glTexEnvi( GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_CONSTANT );
glTexEnvi( GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_ALPHA );
render3dModels( false, true );
render3dModels( true, true );
renderTransparentModels( cameraViewMatrix );
glDisable( GL_BLEND );
OglResetTextureState();
@@ -1143,14 +1153,15 @@ void RENDER_3D_OPENGL::renderSolderMaskLayer( PCB_LAYER_ID aLayerID, float aZPos
}
void RENDER_3D_OPENGL::render3dModelsSelected( bool aRenderTopOrBot, bool aRenderTransparentOnly,
bool aRenderSelectedOnly )
void RENDER_3D_OPENGL::get3dModelsSelected( std::list<MODELTORENDER> &aDstRenderList,
bool aGetTop, bool aGetBot, bool aRenderTransparentOnly,
bool aRenderSelectedOnly )
{
wxASSERT( ( aGetTop == true ) || ( aGetBot == true ) );
if( !m_boardAdapter.GetBoard() )
return;
MODEL_3D::BeginDrawMulti( !aRenderSelectedOnly );
// Go for all footprints
for( FOOTPRINT* fp : m_boardAdapter.GetBoard()->Footprints() )
{
@@ -1175,54 +1186,52 @@ void RENDER_3D_OPENGL::render3dModelsSelected( bool aRenderTopOrBot, bool aRende
{
if( m_boardAdapter.IsFootprintShown( (FOOTPRINT_ATTR_T) fp->GetAttributes() ) )
{
if( aRenderTopOrBot == !fp->IsFlipped() )
renderFootprint( fp, aRenderTransparentOnly, highlight );
const bool isFlipped = fp->IsFlipped();
if( ( aGetTop == !isFlipped ) ||
( aGetBot == isFlipped ) )
get3dModelsFromFootprint( aDstRenderList, fp, aRenderTransparentOnly, highlight );
}
}
}
MODEL_3D::EndDrawMulti();
}
void RENDER_3D_OPENGL::render3dModels( bool aRenderTopOrBot, bool aRenderTransparentOnly )
{
if( m_boardAdapter.m_IsBoardView )
render3dModelsSelected( aRenderTopOrBot, aRenderTransparentOnly, true );
render3dModelsSelected( aRenderTopOrBot, aRenderTransparentOnly, false );
}
void RENDER_3D_OPENGL::renderFootprint( const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected )
void RENDER_3D_OPENGL::get3dModelsFromFootprint( std::list<MODELTORENDER> &aDstRenderList,
const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected )
{
if( !aFootprint->Models().empty() )
{
const double zpos = m_boardAdapter.GetFootprintZPos( aFootprint->IsFlipped() );
SFVEC3F selColor = m_boardAdapter.GetColor( m_boardAdapter.m_Cfg->m_Render.opengl_selection_color );
glPushMatrix();
VECTOR2I pos = aFootprint->GetPosition();
glTranslatef( pos.x * m_boardAdapter.BiuTo3dUnits(), -pos.y * m_boardAdapter.BiuTo3dUnits(),
zpos );
glm::mat4 fpMatrix( 1.0f );
fpMatrix = glm::translate( fpMatrix,
SFVEC3F( pos.x * m_boardAdapter.BiuTo3dUnits(),
-pos.y * m_boardAdapter.BiuTo3dUnits(),
zpos ) );
if( !aFootprint->GetOrientation().IsZero() )
glRotated( aFootprint->GetOrientation().AsDegrees(), 0.0, 0.0, 1.0 );
{
fpMatrix = glm::rotate( fpMatrix,
(float) aFootprint->GetOrientation().AsRadians(),
SFVEC3F( 0.0f, 0.0f, 1.0f ) );
}
if( aFootprint->IsFlipped() )
{
glRotatef( 180.0f, 0.0f, 1.0f, 0.0f );
glRotatef( 180.0f, 0.0f, 0.0f, 1.0f );
fpMatrix = glm::rotate( fpMatrix, glm::pi<float>(), SFVEC3F( 0.0f, 1.0f, 0.0f ) );
fpMatrix = glm::rotate( fpMatrix, glm::pi<float>(), SFVEC3F( 0.0f, 0.0f, 1.0f ) );
}
double modelunit_to_3d_units_factor = m_boardAdapter.BiuTo3dUnits() * UNITS3D_TO_UNITSPCB;
const double modelunit_to_3d_units_factor = m_boardAdapter.BiuTo3dUnits() *
UNITS3D_TO_UNITSPCB;
glScaled( modelunit_to_3d_units_factor, modelunit_to_3d_units_factor,
modelunit_to_3d_units_factor );
fpMatrix = glm::scale( fpMatrix,
SFVEC3F( modelunit_to_3d_units_factor ) );
// Get the list of model files for this model
for( const FP_3DMODEL& sM : aFootprint->Models() )
@@ -1243,66 +1252,236 @@ void RENDER_3D_OPENGL::renderFootprint( const FOOTPRINT* aFootprint, bool aRende
if( ( !aRenderTransparentOnly && modelPtr->HasOpaqueMeshes() && opaque ) ||
( aRenderTransparentOnly && ( modelPtr->HasTransparentMeshes() || !opaque ) ) )
{
glPushMatrix();
glm::mat4 modelworldMatrix = fpMatrix;
std::vector<double> key = { sM.m_Offset.x, sM.m_Offset.y, sM.m_Offset.z,
sM.m_Rotation.x, sM.m_Rotation.y, sM.m_Rotation.z,
sM.m_Scale.x, sM.m_Scale.y, sM.m_Scale.z };
const SFVEC3F offset = SFVEC3F( sM.m_Offset.x, sM.m_Offset.y, sM.m_Offset.z );
const SFVEC3F rotation = SFVEC3F( sM.m_Rotation.x, sM.m_Rotation.y, sM.m_Rotation.z );
const SFVEC3F scale = SFVEC3F( sM.m_Scale.x, sM.m_Scale.y, sM.m_Scale.z );
std::vector<float> key = { offset.x, offset.y, offset.z,
rotation.x, rotation.y, rotation.z,
scale.x, scale.y, scale.z };
auto it = m_3dModelMatrixMap.find( key );
if( it != m_3dModelMatrixMap.end() )
{
glMultMatrixf( glm::value_ptr( it->second ) );
modelworldMatrix *= it->second;
}
else
{
glm::mat4 mtx( 1 );
mtx = glm::translate( mtx, { sM.m_Offset.x, sM.m_Offset.y, sM.m_Offset.z } );
mtx = glm::rotate( mtx, glm::radians( (float) -sM.m_Rotation.z ), { 0.0f, 0.0f, 1.0f } );
mtx = glm::rotate( mtx, glm::radians( (float) -sM.m_Rotation.y ), { 0.0f, 1.0f, 0.0f } );
mtx = glm::rotate( mtx, glm::radians( (float) -sM.m_Rotation.x ), { 1.0f, 0.0f, 0.0f } );
mtx = glm::scale( mtx, { sM.m_Scale.x, sM.m_Scale.y, sM.m_Scale.z } );
glm::mat4 mtx( 1.0f );
mtx = glm::translate( mtx, offset );
mtx = glm::rotate( mtx, glm::radians( -rotation.z ), { 0.0f, 0.0f, 1.0f } );
mtx = glm::rotate( mtx, glm::radians( -rotation.y ), { 0.0f, 1.0f, 0.0f } );
mtx = glm::rotate( mtx, glm::radians( -rotation.x ), { 1.0f, 0.0f, 0.0f } );
mtx = glm::scale( mtx, scale );
m_3dModelMatrixMap[ key ] = mtx;
glMultMatrixf( glm::value_ptr( mtx ) );
modelworldMatrix *= mtx;
}
if( aRenderTransparentOnly )
{
modelPtr->DrawTransparent( sM.m_Opacity,
aFootprint->IsSelected() || aIsSelected,
selColor );
aDstRenderList.emplace_back( modelworldMatrix,
modelPtr,
sM.m_Opacity,
true,
aFootprint->IsSelected() || aIsSelected );
}
else
{
modelPtr->DrawOpaque( aFootprint->IsSelected() || aIsSelected, selColor );
aDstRenderList.emplace_back( modelworldMatrix,
modelPtr,
1.0f,
false,
aFootprint->IsSelected() || aIsSelected );
}
}
}
}
}
}
if( m_boardAdapter.m_Cfg->m_Render.opengl_show_model_bbox )
{
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glDisable( GL_LIGHTING );
void RENDER_3D_OPENGL::renderOpaqueModels( const glm::mat4 &aCameraViewMatrix )
{
const SFVEC3F selColor = m_boardAdapter.GetColor( m_boardAdapter.m_Cfg->m_Render.opengl_selection_color );
glLineWidth( 1 );
modelPtr->DrawBboxes();
glPushMatrix();
glLineWidth( 4 );
modelPtr->DrawBbox();
std::list<MODELTORENDER> renderList;
glEnable( GL_LIGHTING );
glDisable( GL_BLEND );
}
if( m_boardAdapter.m_IsBoardView )
{
renderList.clear();
glPopMatrix();
get3dModelsSelected( renderList, true, true, false, true );
if( !renderList.empty() )
{
MODEL_3D::BeginDrawMulti( false );
for( const MODELTORENDER& mtr : renderList )
{
renderModel( aCameraViewMatrix, mtr, selColor, nullptr );
}
MODEL_3D::EndDrawMulti();
}
}
renderList.clear();
get3dModelsSelected( renderList, true, true, false, false );
if( !renderList.empty() )
{
MODEL_3D::BeginDrawMulti( true );
for( const MODELTORENDER& mtr : renderList )
{
renderModel( aCameraViewMatrix, mtr, selColor, nullptr );
}
MODEL_3D::EndDrawMulti();
}
glPopMatrix();
}
void RENDER_3D_OPENGL::renderTransparentModels( const glm::mat4 &aCameraViewMatrix )
{
const SFVEC3F selColor = m_boardAdapter.GetColor( m_boardAdapter.m_Cfg->m_Render.opengl_selection_color );
std::list<MODELTORENDER> renderListModels; // do not clear it until this function returns
if( m_boardAdapter.m_IsBoardView )
{
// Get Transparent Selected
get3dModelsSelected( renderListModels, true, true, true, true );
}
// Get Transparent Not Selected
get3dModelsSelected( renderListModels, true, true, true, false );
if( renderListModels.empty() )
return;
std::vector<std::pair<const MODELTORENDER *, float>> transparentModelList;
transparentModelList.reserve( renderListModels.size() );
// Calculate the distance to the camera for each model
const SFVEC3F &cameraPos = m_camera.GetPos();
for( const MODELTORENDER& mtr : renderListModels )
{
const BBOX_3D& bBox = mtr.m_model->GetBBox();
const SFVEC3F& bBoxCenter = bBox.GetCenter();
const SFVEC3F bBoxWorld = mtr.m_modelWorldMat * glm::vec4( bBoxCenter, 1.0f );
const float distanceToCamera = glm::length( cameraPos - bBoxWorld );
transparentModelList.emplace_back( &mtr, distanceToCamera );
}
// Sort from back to front
std::sort( transparentModelList.begin(), transparentModelList.end(),
[&]( std::pair<const MODELTORENDER *, float>& a,
std::pair<const MODELTORENDER *, float>& b )
{
if( a.second != b.second )
return a.second > b.second;
return a.first > b.first; // use pointers as a last resort
} );
// Start rendering calls
glPushMatrix();
bool isUsingColorInformation = !( transparentModelList.begin()->first->m_isSelected &&
m_boardAdapter.m_IsBoardView );
MODEL_3D::BeginDrawMulti( isUsingColorInformation );
for( const std::pair<const MODELTORENDER *, float>& mtr : transparentModelList )
{
if( m_boardAdapter.m_IsBoardView )
{
// Toggle between using model color or the select color
if( !isUsingColorInformation && !mtr.first->m_isSelected )
{
isUsingColorInformation = true;
glEnableClientState( GL_COLOR_ARRAY );
glEnableClientState( GL_TEXTURE_COORD_ARRAY );
glEnable( GL_COLOR_MATERIAL );
}
else
{
if( isUsingColorInformation && mtr.first->m_isSelected )
{
isUsingColorInformation = false;
glDisableClientState( GL_COLOR_ARRAY );
glDisableClientState( GL_TEXTURE_COORD_ARRAY );
glDisable( GL_COLOR_MATERIAL );
}
}
}
glPopMatrix();
// Render model, sort each individuall material group
// by passing cameraPos
renderModel( aCameraViewMatrix, *mtr.first, selColor, &cameraPos );
}
MODEL_3D::EndDrawMulti();
glPopMatrix();
}
void RENDER_3D_OPENGL::renderModel( const glm::mat4 &aCameraViewMatrix,
const MODELTORENDER &aModelToRender,
const SFVEC3F &aSelColor,
const SFVEC3F *aCameraWorldPos )
{
const glm::mat4 modelviewMatrix = aCameraViewMatrix * aModelToRender.m_modelWorldMat;
glLoadMatrixf( glm::value_ptr( modelviewMatrix ) );
aModelToRender.m_model->Draw( aModelToRender.m_isTransparent,
aModelToRender.m_opacity,
aModelToRender.m_isSelected,
aSelColor,
&aModelToRender.m_modelWorldMat,
aCameraWorldPos );
if( m_boardAdapter.m_Cfg->m_Render.opengl_show_model_bbox )
{
const bool wasBlendEnabled = glIsEnabled( GL_BLEND );
if( !wasBlendEnabled )
{
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
}
glDisable( GL_LIGHTING );
glLineWidth( 1 );
aModelToRender.m_model->DrawBboxes();
glLineWidth( 4 );
aModelToRender.m_model->DrawBbox();
glEnable( GL_LIGHTING );
if( !wasBlendEnabled )
{
glDisable( GL_BLEND );
}
}
}
@@ -129,18 +129,44 @@ private:
*/
void load3dModels( REPORTER* aStatusReporter );
/**
* @param aRenderTopOrBot true will render Top, false will render bottom
* @param aRenderTransparentOnly true will render only the transparent objects, false will
* render opaque
*/
void render3dModels( bool aRenderTopOrBot, bool aRenderTransparentOnly );
struct MODELTORENDER
{
glm::mat4 m_modelWorldMat;
const MODEL_3D* m_model;
float m_opacity;
bool m_isTransparent;
bool m_isSelected;
void render3dModelsSelected( bool aRenderTopOrBot, bool aRenderTransparentOnly,
bool aRenderSelectedOnly );
MODELTORENDER( glm::mat4 aModelWorldMat,
const MODEL_3D* aNodel,
float aOpacity,
bool aIsTransparent,
bool aIsSelected ) :
m_modelWorldMat( std::move( aModelWorldMat ) ),
m_model( aNodel ),
m_opacity( aOpacity ),
m_isTransparent( aIsTransparent ),
m_isSelected( aIsSelected )
{
}
};
void renderFootprint( const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected );
void renderOpaqueModels( const glm::mat4 &aCameraViewMatrix );
void renderTransparentModels( const glm::mat4 &aCameraViewMatrix );
void renderModel( const glm::mat4 &aCameraViewMatrix,
const MODELTORENDER &aModelToRender,
const SFVEC3F &aSelColor,
const SFVEC3F *aCameraWorldPos );
void get3dModelsSelected( std::list<MODELTORENDER> &aDstRenderList,
bool aGetTop, bool aGetBot, bool aRenderTransparentOnly,
bool aRenderSelectedOnly );
void get3dModelsFromFootprint( std::list<MODELTORENDER> &aDstRenderList,
const FOOTPRINT* aFootprint, bool aRenderTransparentOnly,
bool aIsSelected );
void setLightFront( bool enabled );
void setLightTop( bool enabled );
@@ -210,7 +236,7 @@ private:
// Caches
std::map< wxString, MODEL_3D* > m_3dModelMap;
std::map< std::vector<double>, glm::mat4 > m_3dModelMatrixMap;
std::map< std::vector<float>, glm::mat4 > m_3dModelMatrixMap;
BOARD_ITEM* m_currentRollOverItem;
@@ -931,10 +931,33 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
{
float ratio =
std::max( 1.0f, m_objectContainer.GetBBox().GetMaxDimension() / RANGE_SCALE_3D );
m_camera.SetMaxZoom( CAMERA::DEFAULT_MAX_ZOOM * ratio );
m_camera.SetMinZoom( static_cast<float>( MIN_DISTANCE_IU * m_boardAdapter.BiuTo3dUnits()
/ -m_camera.GetCameraInitPos().z ) );
float max_zoom = CAMERA::DEFAULT_MAX_ZOOM * ratio;
float min_zoom = static_cast<float>( MIN_DISTANCE_IU * m_boardAdapter.BiuTo3dUnits()
/ -m_camera.GetCameraInitPos().z );
if( min_zoom > max_zoom )
std::swap( min_zoom, max_zoom );
float zoom_ratio = max_zoom / min_zoom;
// Set the minimum number of zoom 'steps' between max and min.
int steps = 3 * 3;
steps -= static_cast<int>( ceil( log( zoom_ratio ) / log( 1.26f ) ) );
steps = std::max( steps, 0 );
// Resize max and min zoom to accomplish the number of steps.
float increased_zoom = pow( 1.26f, steps / 2 );
max_zoom *= increased_zoom;
min_zoom /= increased_zoom;
if( steps & 1 )
min_zoom /= 1.26f;
min_zoom = std::min( min_zoom, 1.0f );
m_camera.SetMaxZoom( max_zoom );
m_camera.SetMinZoom( min_zoom );
}
// Create an accelerator
@@ -1202,7 +1225,8 @@ void RENDER_3D_RAYTRACE::load3DModels( CONTAINER_3D& aDstContainer, bool aSkipMa
if( !m_boardAdapter.GetBoard() )
return;
if( !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
if( !m_boardAdapter.m_IsPreviewer
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_insert
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_virtual )
{
@@ -1911,9 +1911,19 @@ void RENDER_3D_RAYTRACE::initializeBlockPositions()
const SFVEC2UI center( m_realBufferSize.x / 2, m_realBufferSize.y / 2 );
std::sort( m_blockPositions.begin(), m_blockPositions.end(),
[&]( const SFVEC2UI& a, const SFVEC2UI& b ) {
[&]( const SFVEC2UI& a, const SFVEC2UI& b )
{
// Sort order: inside out.
return distance( a, center ) < distance( b, center );
float distanceA = distance( a, center );
float distanceB = distance( b, center );
if( distanceA != distanceB )
return distanceA < distanceB;
if( a[0] != b[0] )
return a[0] < b[0];
return a[1] < b[1];
} );
// Create m_shader buffer
@@ -229,6 +229,16 @@ bool BBOX_2D::Inside( const SFVEC2F& aPoint ) const
}
bool BBOX_2D::Inside( const BBOX_2D& aBBox ) const
{
wxASSERT( IsInitialized() );
wxASSERT( aBBox.IsInitialized() );
return Inside( aBBox.Min() ) &&
Inside( aBBox.Max() );
}
float BBOX_2D::Area() const
{
SFVEC2F extent = GetExtent();
@@ -132,6 +132,14 @@ public:
*/
bool Inside( const SFVEC2F& aPoint ) const;
/**
* Check if a bounding box is inside this bounding box.
*
* @param aBBox the bounding box to test if it is inside
* @return true if aBBox is smaller and all points are inside
*/
bool Inside( const BBOX_2D& aBBox ) const;
/**
* Calculate the area of a bounding box.
*
@@ -238,6 +238,16 @@ bool BBOX_3D::Inside( const SFVEC3F& aPoint ) const
}
bool BBOX_3D::Inside( const BBOX_3D& aBBox ) const
{
wxASSERT( IsInitialized() );
wxASSERT( aBBox.IsInitialized() );
return Inside( aBBox.Min() ) &&
Inside( aBBox.Max() );
}
float BBOX_3D::Volume() const
{
wxASSERT( IsInitialized() );
@@ -125,6 +125,14 @@ public:
*/
bool Inside( const SFVEC3F& aPoint ) const;
/**
* Check if a bounding box is inside this bounding box.
*
* @param aBBox the bounding box to test if it is inside
* @return true if aBBox is smaller and all points are inside
*/
bool Inside( const BBOX_3D& aBBox ) const;
/**
* Apply a transformation matrix to the box points.
*
+15 -24
View File
@@ -39,6 +39,7 @@
#include <3d_viewer/tools/eda_3d_actions.h>
#include <3d_viewer/tools/eda_3d_controller.h>
#include <3d_viewer/tools/eda_3d_conditions.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <board_design_settings.h>
#include <core/arraydim.h>
@@ -56,9 +57,7 @@
#include <widgets/wx_infobar.h>
#include <wildcards_and_files_ext.h>
#if defined( KICAD_USE_3DCONNEXION )
#include <3d_navlib/nl_3d_viewer_plugin.h>
#endif
/**
* Flag to enable 3D viewer main frame window debug tracing.
@@ -166,16 +165,18 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
m_canvas->SetInfoBar( m_infoBar );
m_canvas->SetStatusBar( status_bar );
#if defined( KICAD_USE_3DCONNEXION )
try
if( ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
{
m_spaceMouse = new NL_3D_VIEWER_PLUGIN( m_canvas );
try
{
m_spaceMouse = new NL_3D_VIEWER_PLUGIN( m_canvas );
}
catch( const std::system_error& e )
{
wxLogTrace( wxT( "KI_TRACE_NAVLIB" ), e.what() );
}
}
catch( const std::system_error& e )
{
wxLogTrace( wxT( "KI_TRACE_NAVLIB" ), e.what() );
}
#endif
// Fixes bug in Windows (XP and possibly others) where the canvas requires the focus
// in order to receive mouse events. Otherwise, the user has to click somewhere on
@@ -193,12 +194,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME()
{
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr )
{
delete m_spaceMouse;
}
#endif
delete m_spaceMouse;
Prj().GetProjectFile().m_Viewports3D = GetUserViewports();
@@ -334,12 +330,11 @@ void EDA_3D_VIEWER_FRAME::handleIconizeEvent( wxIconizeEvent& aEvent )
{
KIWAY_PLAYER::handleIconizeEvent( aEvent );
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr && aEvent.IsIconized() )
if( m_spaceMouse != nullptr && aEvent.IsIconized()
&& ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
{
m_spaceMouse->SetFocus( false );
}
#endif
}
@@ -655,12 +650,8 @@ void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
m_canvas->SetFocus();
}
#if defined( KICAD_USE_3DCONNEXION )
if( m_spaceMouse != nullptr )
{
if( m_spaceMouse != nullptr && ADVANCED_CFG::GetCfg().m_Use3DConnexionDriver )
m_spaceMouse->SetFocus( aEvent.GetActive() );
}
#endif
aEvent.Skip(); // required under wxMAC
}
+3 -5
View File
@@ -122,8 +122,6 @@ target_link_libraries( 3d-viewer
add_subdirectory( 3d_cache )
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
add_subdirectory( 3d_navlib )
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
endif()
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in 3d-viewer" )
add_subdirectory( 3d_navlib )
target_link_libraries( 3d-viewer PRIVATE 3d-viewer_navlib)
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -26,7 +26,7 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
m_cbRaytracing_proceduralTextures = new wxCheckBox( this, wxID_ANY, _("Procedural textures (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_proceduralTextures->SetValue(true);
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxALL, 5 );
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbRaytracing_addFloor = new wxCheckBox( this, wxID_ANY, _("Add floor (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_addFloor->SetValue(true);
@@ -347,6 +347,7 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
this->SetSizer( bSizerMain );
this->Layout();
bSizerMain->Fit( this );
}
PANEL_3D_RAYTRACING_OPTIONS_BASE::~PANEL_3D_RAYTRACING_OPTIONS_BASE()
@@ -45,7 +45,7 @@
<property name="minimum_size"></property>
<property name="name">PANEL_3D_RAYTRACING_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">834,514</property>
<property name="size">-1,-1</property>
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
@@ -190,7 +190,7 @@
<property name="vgap">0</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -103,7 +103,7 @@ class PANEL_3D_RAYTRACING_OPTIONS_BASE : public RESETTABLE_PANEL
public:
PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 834,514 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_3D_RAYTRACING_OPTIONS_BASE();
+63 -13
View File
@@ -25,6 +25,7 @@
*/
#include "panel_preview_3d_model.h"
#include <dialogs/dialog_unit_entry.h>
#include <3d_canvas/eda_3d_canvas.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
@@ -46,30 +47,34 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
FOOTPRINT* aFootprint,
std::vector<FP_3DMODEL>* aParentModelList ) :
PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ),
m_parentFrame( aFrame ),
m_previewPane( nullptr ),
m_infobar( nullptr ),
m_boardAdapter(),
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D ),
m_boardThickness( aFrame, nullptr, m_boardThicknessCtrl, m_boardThicknessUnits )
m_trackBallCamera( 2 * RANGE_SCALE_3D )
{
m_userUnits = aFrame->GetUserUnits();
m_userUnits = m_parentFrame->GetUserUnits();
m_dummyBoard = new BOARD();
m_dummyBoard->SetProject( &aFrame->Prj(), true );
// This board will only be used to hold a footprint for viewing
m_dummyBoard->SetBoardUse( BOARD_USE::FPHOLDER );
BOARD_DESIGN_SETTINGS parent_bds = aFrame->GetDesignSettings();
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
BOARD_DESIGN_SETTINGS& dummy_bds = m_dummyBoard->GetDesignSettings();
dummy_bds.SetBoardThickness( parent_bds.GetBoardThickness() );
dummy_bds.SetEnabledLayers( LSET::FrontMask() | LSET::BackMask() );
BOARD_STACKUP& dummy_board_stackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
dummy_board_stackup.RemoveAll();
dummy_board_stackup.BuildDefaultStackupList( &dummy_bds, 2 );
m_selected = -1;
m_previewLabel->SetFont( KIUI::GetStatusFont( this ) );
// Set the bitmap of 3D view buttons:
m_bpvTop->SetBitmap( KiBitmap( BITMAPS::axis3d_top ) );
m_bpvFront->SetBitmap( KiBitmap( BITMAPS::axis3d_front ) );
@@ -79,6 +84,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_bpvBottom->SetBitmap( KiBitmap( BITMAPS::axis3d_bottom ) );
m_bpvISO->SetBitmap( KiBitmap( BITMAPS::ortho ) );
m_bpUpdate->SetBitmap( KiBitmap( BITMAPS::reload ) );
m_bpSettings->SetBitmap( KiBitmap( BITMAPS::options_3drender ) );
// Set the min and max values of spin buttons (mandatory on Linux)
// They are not used, so they are set to min and max 32 bits int values
@@ -99,6 +105,15 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_dummyFootprint = new FOOTPRINT( *aFootprint );
m_dummyFootprint->SetParentGroup( nullptr );
// Ensure the footprint is shown like in Fp editor: rot 0, not flipped
// to avoid mistakes when setting the3D shape position/rotation
if( m_dummyFootprint->IsFlipped() )
m_dummyFootprint->Flip( m_dummyFootprint->GetPosition(), false );
m_dummyFootprint->SetOrientation( ANGLE_0 );
m_dummyBoard->Add( m_dummyFootprint );
// Create the 3D canvas
@@ -140,6 +155,9 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
this );
}
aFrame->Connect( UNITS_CHANGED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL::onUnitsChanged ),
nullptr, this );
#ifdef __WXOSX__
// Call layout once to get the proper button sizes after the bitmaps have been set
Layout();
@@ -157,6 +175,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix );
m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix );
m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix );
m_bpSettings->SetMinSize( m_bpSettings->GetSize() + borderFix );
#endif
}
@@ -320,9 +339,6 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
m_opacity->SetValue( 100 );
}
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
m_boardThickness.ChangeValue( dummy_bds.GetBoardThickness() );
}
@@ -375,16 +391,27 @@ void PANEL_PREVIEW_3D_MODEL::onOpacitySlider( wxCommandEvent& event )
}
void PANEL_PREVIEW_3D_MODEL::updateBoardThickness( wxCommandEvent& event )
void PANEL_PREVIEW_3D_MODEL::View3DSettings( wxCommandEvent& event )
{
BOARD_DESIGN_SETTINGS dummy_bds = m_dummyBoard->GetDesignSettings();
dummy_bds.SetBoardThickness( m_boardThickness.GetValue() );
BOARD_DESIGN_SETTINGS bds = m_dummyBoard->GetDesignSettings();
int thickness = bds.GetBoardThickness();
BOARD_STACKUP& dummy_board_stackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
dummy_board_stackup.RemoveAll();
dummy_board_stackup.BuildDefaultStackupList( &dummy_bds, 2 );
WX_UNIT_ENTRY_DIALOG dlg( m_parentFrame, _( "Board Thickness: " ),
_( "Preview Settings" ), thickness );
if( dlg.ShowModal() != wxID_OK )
return;
bds.SetBoardThickness( (int) dlg.GetValue() );
BOARD_STACKUP& boardStackup = m_dummyBoard->GetDesignSettings().GetStackupDescriptor();
boardStackup.RemoveAll();
boardStackup.BuildDefaultStackupList( &bds, 2 );
UpdateDummyFootprint( true );
m_previewPane->ReloadRequest();
m_previewPane->Refresh();
}
@@ -538,6 +565,29 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
}
void PANEL_PREVIEW_3D_MODEL::onUnitsChanged( wxCommandEvent& aEvent )
{
double xoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
xoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
double yoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
yoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
double zoff_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
zoff->GetValue() )
/ pcbIUScale.IU_PER_MM;
PCB_BASE_FRAME* frame = static_cast<PCB_BASE_FRAME*>( aEvent.GetClientData() );
m_userUnits = frame->GetUserUnits();
xoff->SetValue( formatOffsetValue( xoff_mm ) );
yoff->SetValue( formatOffsetValue( yoff_mm ) );
zoff->SetValue( formatOffsetValue( zoff_mm ) );
aEvent.Skip();
}
void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired )
{
m_dummyFootprint->Models().clear();
+5 -3
View File
@@ -135,12 +135,12 @@ private:
void onOpacitySlider( wxCommandEvent& event ) override;
void updateBoardThickness( wxCommandEvent& event ) override;
void doIncrementScale( wxSpinEvent& aEvent, double aSign );
void doIncrementRotation( wxSpinEvent& aEvent, double aSign );
void doIncrementOffset( wxSpinEvent& aEvent, double aSign );
void onUnitsChanged( wxCommandEvent& aEvent );
wxString formatScaleValue( double aValue );
wxString formatRotationValue( double aValue );
wxString formatOffsetValue( double aValue );
@@ -172,6 +172,8 @@ private:
m_previewPane->Refresh();
}
void View3DSettings( wxCommandEvent& event ) override;
void View3DRight( wxCommandEvent& event ) override
{
m_previewPane->SetView3D( ID_VIEW3D_RIGHT );
@@ -188,6 +190,7 @@ private:
}
private:
PCB_BASE_FRAME* m_parentFrame;
EDA_3D_CANVAS* m_previewPane;
WX_INFOBAR* m_infobar;
BOARD_ADAPTER m_boardAdapter;
@@ -200,7 +203,6 @@ private:
std::vector<FP_3DMODEL>* m_parentModelList;
int m_selected; /// Index into m_parentInfoList
UNIT_BINDER m_boardThickness;
EDA_UNITS m_userUnits;
};
@@ -21,7 +21,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
wxFlexGridSizer* fgSizerScale;
fgSizerScale = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerScale = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerScale->AddGrowableCol( 1 );
fgSizerScale->SetFlexibleDirection( wxBOTH );
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -66,7 +66,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
wxFlexGridSizer* fgSizerRotate;
fgSizerRotate = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerRotate = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerRotate->AddGrowableCol( 1 );
fgSizerRotate->SetFlexibleDirection( wxBOTH );
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -111,7 +111,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
wxFlexGridSizer* fgSizerOffset;
fgSizerOffset = new wxFlexGridSizer( 0, 3, 3, 3 );
fgSizerOffset = new wxFlexGridSizer( 0, 3, 2, 3 );
fgSizerOffset->AddGrowableCol( 1 );
fgSizerOffset->SetFlexibleDirection( wxBOTH );
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -159,20 +159,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizer4->Add( m_opacity, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerBoardThickness;
sbSizerBoardThickness = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board Thickness") ), wxHORIZONTAL );
m_boardThicknessCtrl = new wxTextCtrl( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
sbSizerBoardThickness->Add( m_boardThicknessCtrl, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_boardThicknessUnits = new wxStaticText( sbSizerBoardThickness->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
m_boardThicknessUnits->Wrap( -1 );
sbSizerBoardThickness->Add( m_boardThicknessUnits, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
bSizerLeft->Add( sbSizerBoardThickness, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizermain->Add( bSizerLeft, 0, 0, 5 );
@@ -183,12 +170,11 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
wxBoxSizer* bSizer6;
bSizer6 = new wxBoxSizer( wxHORIZONTAL );
wxStaticText* staticPreviewLabel;
staticPreviewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
staticPreviewLabel->Wrap( -1 );
staticPreviewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_previewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
m_previewLabel->Wrap( -1 );
m_previewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer6->Add( staticPreviewLabel, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizer6->Add( m_previewLabel, 1, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizerRight->Add( bSizer6, 0, wxEXPAND, 5 );
@@ -196,7 +182,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_SizerPanelView = new wxBoxSizer( wxVERTICAL );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 8 );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 5 );
bSizermain->Add( bSizerRight, 1, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -207,13 +193,13 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
m_bpvISO->SetToolTip( _("Enable/disable orthographic projection") );
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP|wxBOTTOM, 5 );
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP, 14 );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpvLeft, 0, wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM, 5 );
bSizer3DButtons->Add( m_bpvLeft, 0, wxBOTTOM, 5 );
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpvRight, 0, wxBOTTOM, 5 );
@@ -238,6 +224,9 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
bSizer3DButtons->Add( m_bpUpdate, 0, wxBOTTOM, 5 );
m_bpSettings = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpSettings, 0, 0, 5 );
bSizermain->Add( bSizer3DButtons, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
@@ -284,8 +273,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
m_boardThicknessCtrl->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this );
m_boardThicknessCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this );
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
@@ -294,6 +281,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
m_bpSettings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this );
}
PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
@@ -336,8 +324,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this );
m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this );
m_boardThicknessCtrl->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelBoardThickness ), NULL, this );
m_boardThicknessCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateBoardThickness ), NULL, this );
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this );
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this );
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this );
@@ -346,5 +332,6 @@ PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE()
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this );
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this );
m_bpSettings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DSettings ), NULL, this );
}
+85 -152
View File
@@ -93,7 +93,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -686,7 +686,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -1279,7 +1279,7 @@
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">none</property>
<property name="rows">0</property>
<property name="vgap">3</property>
<property name="vgap">2</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
@@ -1847,7 +1847,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
@@ -1925,147 +1925,6 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Board Thickness</property>
<property name="minimum_size"></property>
<property name="name">sbSizerBoardThickness</property>
<property name="orient">wxHORIZONTAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_boardThicknessCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnMouseWheel">onMouseWheelBoardThickness</event>
<event name="OnText">updateBoardThickness</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">mm</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_boardThicknessUnits</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -2089,7 +1948,7 @@
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<property name="proportion">1</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
@@ -2127,11 +1986,11 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">staticPreviewLabel</property>
<property name="name">m_previewLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">none</property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
@@ -2150,7 +2009,7 @@
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">8</property>
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
@@ -2172,8 +2031,8 @@
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxBOTTOM</property>
<property name="border">14</property>
<property name="flag">wxTOP</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -2257,7 +2116,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_LEFT|wxALIGN_RIGHT|wxBOTTOM</property>
<property name="flag">wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -2783,6 +2642,80 @@
<event name="OnButtonClick">View3DUpdate</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_bpSettings</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">View3DSettings</event>
</object>
</object>
</object>
</object>
</object>
@@ -66,8 +66,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
wxTextCtrl* zoff;
wxSpinButton* m_spinZoffset;
wxSlider* m_opacity;
wxTextCtrl* m_boardThicknessCtrl;
wxStaticText* m_boardThicknessUnits;
wxStaticText* m_previewLabel;
wxBoxSizer* m_SizerPanelView;
wxBitmapButton* m_bpvISO;
wxBitmapButton* m_bpvLeft;
@@ -77,6 +76,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
wxBitmapButton* m_bpvTop;
wxBitmapButton* m_bpvBottom;
wxBitmapButton* m_bpUpdate;
wxBitmapButton* m_bpSettings;
// Virtual event handlers, override them in your derived class
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
@@ -90,8 +90,6 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
virtual void onDecrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onOpacitySlider( wxCommandEvent& event ) { event.Skip(); }
virtual void onMouseWheelBoardThickness( wxMouseEvent& event ) { event.Skip(); }
virtual void updateBoardThickness( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DISO( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DLeft( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DRight( wxCommandEvent& event ) { event.Skip(); }
@@ -100,6 +98,7 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DSettings( wxCommandEvent& event ) { event.Skip(); }
public:
+30 -2
View File
@@ -53,6 +53,13 @@ set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
set( KICAD_CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" )
set( CMAKE_MODULE_PATH "${KICAD_CMAKE_MODULE_PATH}" )
# Create a flag to identify the non-Apple unix systems
if( UNIX AND NOT APPLE )
set( UNIX_NOT_APPLE ON )
else()
set( UNIX_NOT_APPLE OFF )
endif()
# On Windows, binaries created by link option -g3 are very large (more than 1Gb for pcbnew,
# and more than 3Gb for the full kicad suite)
# This option create binaries using link option -g1 that create much smaller files, but
@@ -93,6 +100,17 @@ option( KICAD_I18N_UNIX_STRICT_PATH
"Use standard Unix locale lookup path (default OFF)."
OFF )
# Options to build with flatpak platform defaults (only on Linux)
cmake_dependent_option( KICAD_BUILD_FLATPAK
"Build KiCad with metadata, launchers, icons, and MIME info following flatpak conventions"
OFF "UNIX_NOT_APPLE"
OFF )
cmake_dependent_option( KICAD_BUILD_NIGHTLY_FLATPAK
"Build a Nightly flatpak (requires KICAD_BUILD_FLATPAK=ON)"
OFF "UNIX_NOT_APPLE"
OFF )
# Not supported by all platforms (for instance mingw)
option( KICAD_SANITIZE_ADDRESS
"Build KiCad with sanitizer options. WARNING: Not compatible with gold linker"
@@ -350,12 +368,16 @@ endif(USE_DISTCC)
# Set flags for GCC, or treat llvm as GCC
#================================================
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
if( CMAKE_COMPILER_IS_GNUCXX )
# Set 32-bit flag for GCC to prevent excess precision
# clang des not know this flag, so keep this separate
if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set( CMAKE_CXX_FLAGS "-ffloat-store ${CMAKE_CXX_FLAGS}" )
endif()
endif( CMAKE_COMPILER_IS_GNUCXX )
if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# Link flags in Debug: -g1 and -ggdb1 or -g1 and -ggdb3 can be used.
# Level 1 produces minimal information, enough for making basic backtraces.
@@ -479,6 +501,12 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /EHs" )
endif()
if( KICAD_SANITIZE_ADDRESS )
add_definitions( -DKICAD_SANITIZE_ADDRESS )
add_definitions( -D_DISABLE_VECTOR_ANNOTATION )
string( APPEND CMAKE_CXX_FLAGS " /fsanitize=address" )
endif()
foreach( type EXE SHARED MODULE)
# /DEBUG: create PDB
string( APPEND CMAKE_${type}_LINKER_FLAGS " /DEBUG /MANIFEST:NO" )
+6 -1
View File
@@ -147,6 +147,7 @@ END_EVENT_TABLE()
BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
BM2CMP_FRAME_BASE( aParent )
{
m_ident = FRAME_BM2CMP; // Initialized to wxID_ANY by wxFormBuilder
SetKiway( this, aKiway );
for( wxString unit : { _( "mm" ), _( "Inch" ), _( "DPI" ) } )
@@ -166,7 +167,11 @@ BM2CMP_FRAME::BM2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
wxIcon icon;
wxIconBundle icon_bundle;
icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component ) );
icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component, 48 ) );
icon_bundle.AddIcon( icon );
icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component, 128 ) );
icon_bundle.AddIcon( icon );
icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component, 256 ) );
icon_bundle.AddIcon( icon );
icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_bitmap2component_32 ) );
icon_bundle.AddIcon( icon );
+1 -1
View File
@@ -66,7 +66,7 @@ macro( create_git_version_header _git_src_path )
# Check to make sure 'git' command did not fail. Otherwise fallback
# to KiCadVersion.cmake as the revision level.
if( _git_describe_result EQUAL 0 )
set( KICAD_VERSION "(${_git_DESCRIBE})" )
set( KICAD_VERSION "${_git_DESCRIBE}" )
endif()
if( _git_rev_parse_head_result EQUAL 0 )
+1 -1
View File
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
# Disabling the "search every possible place" code for now
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
+1 -1
View File
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+11 -2
View File
@@ -926,8 +926,17 @@ if(wxWidgets_FOUND)
"\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
"\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
set(wxWidgets_VERSION_STRING
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
string(REGEX REPLACE "^(.*\n)?#define +wxSUBRELEASE_NUMBER +([0-9]+).*"
"\\2" wxWidgets_VERSION_SUBRELEASE "${_wx_version_h}" )
if( ${wxWidgets_VERSION_SUBRELEASE} GREATER 0 )
set(wxWidgets_VERSION_STRING
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}.${wxWidgets_VERSION_SUBRELEASE}" )
else()
set(wxWidgets_VERSION_STRING
"${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
endif()
DBG_MSG("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
endif()
+1 -1
View File
@@ -37,7 +37,7 @@
# KiCad.
#
# Note: This version string should follow the semantic versioning system
set( KICAD_SEMANTIC_VERSION "7.0.0" )
set( KICAD_SEMANTIC_VERSION "7.0.11~rc1" )
# Default the version to the semantic version.
# This is overridden by the git repository tag though (if using git)
+2
View File
@@ -83,6 +83,8 @@
/// Allows scripts install directory to be referenced by the program code.
#define PYTHON_DEST "@PYTHON_DEST@"
#define PYTHON_SITE_PACKAGE_PATH "@PYTHON_SITE_PACKAGE_PATH@"
/// Allows scripts install directory to be referenced by the program code.
#define KICAD_DATA "@KICAD_DATA@"
+5 -7
View File
@@ -176,6 +176,7 @@ set( COMMON_WIDGET_SRCS
widgets/footprint_preview_widget.cpp
widgets/footprint_select_widget.cpp
widgets/gal_options_panel.cpp
widgets/gal_options_panel_base.cpp
widgets/grid_bitmap_toggle.cpp
widgets/grid_color_swatch_helpers.cpp
widgets/grid_combobox.cpp
@@ -216,6 +217,7 @@ set( COMMON_WIDGET_SRCS
widgets/wx_panel.cpp
widgets/wx_progress_reporters.cpp
widgets/wx_splitter_window.cpp
widgets/wx_treebook.cpp
)
set( COMMON_DRAWING_SHEET_SRCS
@@ -352,7 +354,6 @@ set( COMMON_SRCS
lib_tree_model.cpp
lib_tree_model_adapter.cpp
locale_io.cpp
lockfile.cpp
lset.cpp
marker_base.cpp
markup_parser.cpp
@@ -620,12 +621,9 @@ target_link_libraries( pcbcommon PUBLIC
threadpool
)
if( KICAD_USE_3DCONNEXION )
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in pcbcommon" )
add_subdirectory( ../pcbnew/navlib ./navlib)
target_link_libraries( pcbcommon PUBLIC pcbnew_navlib)
endif()
message( STATUS "Including 3Dconnexion SpaceMouse navigation support in pcbcommon" )
add_subdirectory( ../pcbnew/navlib ./navlib)
target_link_libraries( pcbcommon PUBLIC pcbnew_navlib)
add_dependencies( pcbcommon delaunator )
+25
View File
@@ -62,6 +62,16 @@ namespace AC_STACK
namespace AC_KEYS
{
/**
* Should the schematic use the new incremental connectivity algorithm
*/
static const wxChar IncrementalConnectivity[] = wxT( "IncrementalConnectivity" );
/**
* Decide whether to attempt usage of the 3DConnexion mouse
*/
static const wxChar Use3DConnexionDriver[] = wxT( "3DConnexionDriver" );
/**
* When filling zones, we add an extra amount of clearance to each zone to ensure that rounding
* errors do not overrun minimum clearance distances. This is the extra in mm.
@@ -321,6 +331,15 @@ ADVANCED_CFG::ADVANCED_CFG()
m_UseClipper2 = true;
#ifdef _WIN32
// spacemouse is largely stable on Windows
m_Use3DConnexionDriver = true;
#else
m_Use3DConnexionDriver = false;
#endif
m_IncrementalConnectivity = false;
loadFromConfigFile();
}
@@ -463,6 +482,12 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::UseClipper2,
&m_UseClipper2, m_UseClipper2 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::Use3DConnexionDriver,
&m_Use3DConnexionDriver, m_Use3DConnexionDriver ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::IncrementalConnectivity,
&m_IncrementalConnectivity, m_IncrementalConnectivity ) );
// Special case for trace mask setting...we just grab them and set them immediately
+1
View File
@@ -45,6 +45,7 @@
#include <eda_base_frame.h>
#include <eda_draw_frame.h>
#include <paths.h>
#include <kiplatform/ui.h>
static std::unique_ptr<BITMAP_STORE> s_BitmapStore;
+55 -15
View File
@@ -41,7 +41,8 @@ BITMAP_BASE::BITMAP_BASE( const VECTOR2I& pos )
m_ppi = 300; // the bitmap definition. the default is 300PPI
m_pixelSizeIu = 254000.0 / m_ppi; // a pixel size value OK for bitmaps using 300 PPI
// for Eeschema which uses currently 254000PPI
m_isMirrored = false;
m_isMirroredX = false;
m_isMirroredY = false;
m_rotation = ANGLE_0;
}
@@ -51,7 +52,8 @@ BITMAP_BASE::BITMAP_BASE( const BITMAP_BASE& aSchBitmap )
m_scale = aSchBitmap.m_scale;
m_ppi = aSchBitmap.m_ppi;
m_pixelSizeIu = aSchBitmap.m_pixelSizeIu;
m_isMirrored = aSchBitmap.m_isMirrored;
m_isMirroredX = aSchBitmap.m_isMirroredX;
m_isMirroredY = aSchBitmap.m_isMirroredY;
m_rotation = aSchBitmap.m_rotation;
m_image = nullptr;
@@ -75,6 +77,7 @@ void BITMAP_BASE::SetImage( wxImage* aImage )
delete m_originalImage;
m_originalImage = new wxImage( *aImage );
rebuildBitmap();
updatePPI();
}
@@ -90,6 +93,21 @@ void BITMAP_BASE::rebuildBitmap( bool aResetID )
}
void BITMAP_BASE::updatePPI()
{
// Todo: eventually we need to support dpi / scaling in both dimensions
int dpiX = m_originalImage->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX );
if( dpiX > 1 )
{
if( m_originalImage->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONUNIT ) == wxIMAGE_RESOLUTION_CM )
m_ppi = KiROUND( dpiX * 2.54 );
else
m_ppi = dpiX;
}
}
void BITMAP_BASE::ImportData( BITMAP_BASE* aItem )
{
*m_image = *aItem->m_image;
@@ -99,7 +117,8 @@ void BITMAP_BASE::ImportData( BITMAP_BASE* aItem )
m_scale = aItem->m_scale;
m_ppi = aItem->m_ppi;
m_pixelSizeIu = aItem->m_pixelSizeIu;
m_isMirrored = aItem->m_isMirrored;
m_isMirroredX = aItem->m_isMirroredX;
m_isMirroredY = aItem->m_isMirroredY;
m_rotation = aItem->m_rotation;
}
@@ -116,6 +135,7 @@ bool BITMAP_BASE::ReadImageFile( wxInputStream& aInStream )
delete m_originalImage;
m_originalImage = new wxImage( *m_image );
rebuildBitmap();
updatePPI();
return true;
}
@@ -136,17 +156,7 @@ bool BITMAP_BASE::ReadImageFile( const wxString& aFullFilename )
delete m_originalImage;
m_originalImage = new wxImage( *m_image );
rebuildBitmap();
// Todo: eventually we need to support dpi / scaling in both dimensions
int dpiX = m_originalImage->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX );
if( dpiX > 1 )
{
if( m_originalImage->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONUNIT ) == wxIMAGE_RESOLUTION_CM )
m_ppi = KiROUND( dpiX * 2.54 );
else
m_ppi = dpiX;
}
updatePPI();
return true;
}
@@ -393,8 +403,25 @@ void BITMAP_BASE::Mirror( bool aVertically )
{
if( m_image )
{
// wxImage::Mirror() clear some parameters of the original image.
// We need to restore them, especially resolution and unit, to be
// sure image parameters saved in file are the right parameters, not
// the defualt values
int resX = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX );
int resY = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONY );
int unit = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONUNIT );
*m_image = m_image->Mirror( not aVertically );
m_isMirrored = !m_isMirrored;
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONUNIT , unit);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONX, resX);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONY, resY);
if( aVertically )
m_isMirroredY = !m_isMirroredY;
else
m_isMirroredX = !m_isMirroredX;
rebuildBitmap( false );
}
}
@@ -404,7 +431,20 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
{
if( m_image )
{
// wxImage::Rotate90() clear some parameters of the original image.
// We need to restore them, especially resolution and unit, to be
// sure image parameters saved in file are the right parameters, not
// the defualt values
int resX = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONX );
int resY = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONY );
int unit = m_image->GetOptionInt( wxIMAGE_OPTION_RESOLUTIONUNIT );
*m_image = m_image->Rotate90( aRotateCCW );
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONUNIT , unit);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONX, resX);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONY, resY);
m_rotation += ( aRotateCCW ? -ANGLE_90 : ANGLE_90 );
rebuildBitmap( false );
}
+22
View File
@@ -1013,6 +1013,28 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad].emplace_back( BITMAPS::icon_kicad, wxT( "icon_kicad_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_nightly].emplace_back( BITMAPS::icon_kicad_nightly, wxT( "icon_kicad_nightly_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit].emplace_back( BITMAPS::icon_libedit, wxT( "icon_libedit_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit].emplace_back( BITMAPS::icon_modedit, wxT( "icon_modedit_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew].emplace_back( BITMAPS::icon_pcbnew, wxT( "icon_pcbnew_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad].emplace_back( BITMAPS::icon_kicad, wxT( "icon_kicad_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_nightly].emplace_back( BITMAPS::icon_kicad_nightly, wxT( "icon_kicad_nightly_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit].emplace_back( BITMAPS::icon_libedit, wxT( "icon_libedit_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit].emplace_back( BITMAPS::icon_modedit, wxT( "icon_modedit_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew].emplace_back( BITMAPS::icon_pcbnew, wxT( "icon_pcbnew_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::dialog_warning].emplace_back( BITMAPS::dialog_warning, wxT( "dialog_warning_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_3d].emplace_back( BITMAPS::icon_3d, wxT( "icon_3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_48.png" ), 48, wxT( "light" ) );
+12 -4
View File
@@ -177,12 +177,20 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
aMsg << eol;
aMsg << "Platform: "
wxString osDescription;
#if __LINUX__
<< wxGetLinuxDistributionInfo().Description << ", "
#else
<< wxGetOsDescription() << ", "
osDescription = wxGetLinuxDistributionInfo().Description;
#endif
// 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();
aMsg << "Platform: "
<< osDescription << ", "
<< GetPlatformGetBitnessName() << ", "
<< platform.GetEndiannessName() << ", "
<< platform.GetPortIdName();
+2 -1
View File
@@ -49,8 +49,9 @@ void CALLBACK_GAL::DrawGlyph( const KIFONT::GLYPH& aGlyph, int aNth, int aTotal
int strokeWidth = GetLineWidth();
SHAPE_POLY_SET poly;
// Use ERROR_INSIDE because it avoids Clipper and is therefore much faster.
TransformOvalToPolygon( poly, pointList[ ii - 1 ], pointList[ ii ],
strokeWidth, strokeWidth / 48, ERROR_OUTSIDE );
strokeWidth, strokeWidth / 180, ERROR_INSIDE );
m_outlineCallback( poly.Outline( 0 ) );
}
+5 -22
View File
@@ -31,30 +31,13 @@
#include <dialogs/html_message_box.h>
#include <functional>
#include <unordered_map>
#include <pgm_base.h>
#include "cli/cli_names.h"
// Set of dialogs that have been chosen not to be shown again
static std::unordered_map<unsigned long, int> doNotShowAgainDlgs;
bool IsGUI()
{
if( !wxTheApp )
return false;
#if wxCHECK_VERSION( 3, 1, 6 )
return wxTheApp->IsGUI();
#else
// wxWidgets older than version 3.1.6 do not have a way to know if the app
// has a GUI or is a console application.
// So the trick is to set the App class name when starting kicad-cli, and when
// the app class name is the kicad-cli class name the app is a console app
bool run_gui = wxTheApp->GetClassName() != KICAD_CLI_APP_NAME;
return run_gui;
#endif
}
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
long aStyle )
: wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ),
@@ -172,7 +155,7 @@ long KIDIALOG::getStyle( KD_TYPE aType )
}
bool OverrideLock( wxWindow* aParent, const wxString& aMessage )
bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
{
#ifdef __APPLE__
// wxMessageDialog gets the button spacing wrong on Mac so we have to use wxRichMessageDialog.
@@ -305,7 +288,7 @@ void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime )
return;
}
if( !IsGUI() )
if( !Pgm().IsGUI() )
{
wxFprintf( stderr, aText );
return;
@@ -330,7 +313,7 @@ void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxStri
return;
}
if( !IsGUI() )
if( !Pgm().IsGUI() )
{
wxFprintf( stderr, aText );
return;
@@ -357,7 +340,7 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
return;
}
if( !IsGUI() )
if( !Pgm().IsGUI() )
{
wxFprintf( stdout, "%s %s", aMessage, aExtraInfo );
return;
+227 -68
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 Jon Evans <jon@craftyjon.com>
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2022-2023 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 as published by the
@@ -44,6 +44,7 @@
#include <database/database_connection.h>
#include <database/database_cache.h>
#include <profile.h>
const char* const traceDatabase = "KICAD_DATABASE";
@@ -89,7 +90,7 @@ DATABASE_CONNECTION::DATABASE_CONNECTION( const std::string& aDataSourceName,
m_pass = aPassword;
m_timeout = aTimeoutSeconds;
m_cache = std::make_unique<DATABASE_CACHE>( 10, 1 );
init();
if( aConnectNow )
Connect();
@@ -103,7 +104,7 @@ DATABASE_CONNECTION::DATABASE_CONNECTION( const std::string& aConnectionString,
m_connectionString = aConnectionString;
m_timeout = aTimeoutSeconds;
m_cache = std::make_unique<DATABASE_CACHE>( 10, 1 );
init();
if( aConnectNow )
Connect();
@@ -117,6 +118,12 @@ DATABASE_CONNECTION::~DATABASE_CONNECTION()
}
void DATABASE_CONNECTION::init()
{
m_cache = std::make_unique<DB_CACHE_TYPE>( 10, 1 );
}
void DATABASE_CONNECTION::SetCacheParams( int aMaxSize, int aMaxAge )
{
if( !m_cache )
@@ -159,12 +166,10 @@ bool DATABASE_CONNECTION::Connect()
return false;
}
m_tables.clear();
if( IsConnected() )
{
syncTables();
cacheColumns();
getQuoteChar();
}
return IsConnected();
}
@@ -178,7 +183,15 @@ bool DATABASE_CONNECTION::Disconnect()
return false;
}
m_conn->disconnect();
try
{
m_conn->disconnect();
}
catch( boost::locale::conv::conversion_error& exc )
{
wxLogTrace( traceDatabase, wxT( "Disconnect() error \"%s\" occured." ), exc.what() );
return false;
}
return !m_conn->connected();
}
@@ -193,65 +206,55 @@ bool DATABASE_CONNECTION::IsConnected() const
}
bool DATABASE_CONNECTION::syncTables()
bool DATABASE_CONNECTION::CacheTableInfo( const std::string& aTable,
const std::set<std::string>& aColumns )
{
if( !m_conn )
return false;
m_tables.clear();
try
{
nanodbc::catalog catalog( *m_conn );
nanodbc::catalog::tables tables = catalog.find_tables();
nanodbc::catalog::tables tables = catalog.find_tables( fromUTF8( aTable ) );
while( tables.next() )
if( !tables.next() )
{
std::string key = toUTF8( tables.table_name() );
m_tables[key] = toUTF8( tables.table_type() );
wxLogTrace( traceDatabase, wxT( "CacheTableInfo: table '%s' not found in catalog" ),
aTable );
return false;
}
}
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while syncing tables: %s" ), m_lastError );
return false;
}
return true;
}
std::string key = toUTF8( tables.table_name() );
m_tables[key] = toUTF8( tables.table_type() );
bool DATABASE_CONNECTION::cacheColumns()
{
if( !m_conn )
return false;
m_columnCache.clear();
for( const auto& tableIter : m_tables )
{
try
{
nanodbc::catalog catalog( *m_conn );
nanodbc::catalog::columns columns =
catalog.find_columns( NANODBC_TEXT( "" ), fromUTF8( tableIter.first ) );
catalog.find_columns( NANODBC_TEXT( "" ), tables.table_name() );
while( columns.next() )
{
std::string columnKey = toUTF8( columns.column_name() );
m_columnCache[tableIter.first][columnKey] = columns.data_type();
if( aColumns.count( columnKey ) )
m_columnCache[key][columnKey] = columns.data_type();
}
}
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while syncing columns for table %s: %s" ),
tableIter.first, m_lastError );
wxLogTrace( traceDatabase, wxT( "Exception while syncing columns for table '%s': %s" ),
key, m_lastError );
return false;
}
}
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while caching table info: %s" ), m_lastError );
return false;
}
return true;
}
@@ -283,6 +286,35 @@ bool DATABASE_CONNECTION::getQuoteChar()
}
std::string DATABASE_CONNECTION::columnsFor( const std::string& aTable )
{
if( !m_columnCache.count( aTable ) )
{
wxLogTrace( traceDatabase, wxT( "columnsFor: requested table %s missing from cache!" ),
aTable );
return "*";
}
if( m_columnCache[aTable].empty() )
{
wxLogTrace( traceDatabase, wxT( "columnsFor: requested table %s has no columns mapped!" ),
aTable );
return "*";
}
std::string ret;
for( const auto& [ columnName, columnType ] : m_columnCache[aTable] )
ret += fmt::format( "{}{}{}, ", m_quoteChar, columnName, m_quoteChar );
// strip tailing ', '
ret.resize( ret.length() - 2 );
return ret;
}
//next step, make SelectOne take from the SelectAll cache if the SelectOne cache is missing.
//To do this, need to build a map of PK->ROW for the cache result.
bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
const std::pair<std::string, std::string>& aWhere,
DATABASE_CONNECTION::ROW& aResult )
@@ -303,6 +335,18 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
}
const std::string& tableName = tableMapIter->first;
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( m_cache->Get( tableName, cacheEntry ) )
{
if( cacheEntry.count( aWhere.second ) )
{
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
tableName, aWhere.second );
aResult = cacheEntry.at( aWhere.second );
return true;
}
}
if( !m_columnCache.count( tableName ) )
{
@@ -324,19 +368,15 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
std::string cacheKey = fmt::format( "{}{}{}", tableName, columnName, aWhere.second );
std::string queryStr = fmt::format( "SELECT * FROM {}{}{} WHERE {}{}{} = ?",
std::string queryStr = fmt::format( "SELECT {} FROM {}{}{} WHERE {}{}{} = ?",
columnsFor( tableName ),
m_quoteChar, tableName, m_quoteChar,
m_quoteChar, columnName, m_quoteChar );
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( queryStr );
if( m_cache->Get( cacheKey, aResult ) )
{
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
toUTF8( query ), aWhere.second );
return true;
}
PROF_TIMER timer;
try
{
@@ -376,14 +416,17 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
return false;
}
timer.Stop();
if( !results.first() )
{
wxLogTrace( traceDatabase, wxT( "SelectOne: no results returned from query" ) );
return false;
}
wxLogTrace( traceDatabase, wxT( "SelectOne: %ld results returned from query" ),
results.rows() );
wxLogTrace( traceDatabase, wxT( "SelectOne: %ld results returned from query in %0.1f ms" ),
results.rows(), timer.msecs() );
aResult.clear();
@@ -392,7 +435,31 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
for( short i = 0; i < results.columns(); ++i )
{
std::string column = toUTF8( results.column_name( i ) );
aResult[ column ] = toUTF8( results.get<nanodbc::string>( i, NANODBC_TEXT( "" ) ) );
switch( results.column_datatype( i ) )
{
case SQL_DOUBLE:
case SQL_FLOAT:
case SQL_REAL:
case SQL_DECIMAL:
case SQL_NUMERIC:
{
try
{
aResult[column] = fmt::format( "{:G}", results.get<double>( i ) );
}
catch( nanodbc::null_access_error& e )
{
// Column was empty (null)
aResult[column] = std::string();
}
break;
}
default:
aResult[column] = toUTF8( results.get<nanodbc::string>( i, NANODBC_TEXT( "" ) ) );
}
}
}
catch( nanodbc::database_error& e )
@@ -403,13 +470,12 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
return false;
}
m_cache->Put( cacheKey, aResult );
return true;
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, std::vector<ROW>& aResults )
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
{
if( !m_conn )
{
@@ -426,13 +492,27 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, std::vector<ROW>
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - cache hit" ), aTable );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( fmt::format( "SELECT * FROM {}{}{}", m_quoteChar,
tableMapIter->first, m_quoteChar ) );
nanodbc::string query = fromUTF8( fmt::format( "SELECT {} FROM {}{}{}", columnsFor( aTable ),
m_quoteChar, aTable, m_quoteChar ) );
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
PROF_TIMER timer;
try
{
statement.prepare( query );
@@ -467,28 +547,107 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, std::vector<ROW>
return false;
}
try
{
while( results.next() )
{
ROW result;
timer.Stop();
for( short j = 0; j < results.columns(); ++j )
auto handleException =
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
{
std::string column = toUTF8( results.column_name( j ) );
result[column] = toUTF8( results.get<nanodbc::string>( j, NANODBC_TEXT( "" ) ) );
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from SelectAll: %s%s" ),
aResults.size(), m_lastError, extra );
};
while( results.next() )
{
short columnCount = 0;
ROW result;
try
{
columnCount = results.columns();
}
catch( nanodbc::database_error& e )
{
handleException( e );
return false;
}
for( short j = 0; j < columnCount; ++j )
{
std::string column;
std::string columnExtraDbgInfo;
int datatype = SQL_UNKNOWN_TYPE;
try
{
column = toUTF8( results.column_name( j ) );
datatype = results.column_datatype( j );
columnExtraDbgInfo = fmt::format( "column index {}, name '{}', type {}", j, column,
datatype );
}
catch( nanodbc::index_range_error& e )
{
handleException( e, columnExtraDbgInfo );
return false;
}
aResults.emplace_back( std::move( result ) );
switch( datatype )
{
case SQL_DOUBLE:
case SQL_FLOAT:
case SQL_REAL:
case SQL_DECIMAL:
case SQL_NUMERIC:
{
try
{
result[column] = fmt::format( "{:G}", results.get<double>( j ) );
}
catch( nanodbc::null_access_error& e )
{
// Column was empty (null)
result[column] = std::string();
}
catch( std::runtime_error& e )
{
handleException( e, columnExtraDbgInfo );
return false;
}
break;
}
default:
{
try
{
result[column] = toUTF8( results.get<nanodbc::string>( j,
NANODBC_TEXT( "" ) ) );
}
catch( std::runtime_error& e )
{
handleException( e, columnExtraDbgInfo );
return false;
}
}
}
}
aResults.emplace_back( std::move( result ) );
}
catch( nanodbc::database_error& e )
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
timer.msecs() );
for( const ROW& row : aResults )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while parsing results from SelectAll: %s" ),
m_lastError );
return false;
wxASSERT( row.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
cacheEntry[keyStr] = row;
}
m_cache->Put( aTable, cacheEntry );
return true;
}
@@ -74,6 +74,11 @@ DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
table.symbols_col = entry["symbols"].get<std::string>();
table.footprints_col = entry["footprints"].get<std::string>();
// Sanitize library display names; currently only `/` is removed because we use it
// as a separator and allow it in symbol names.
table.name.erase( std::remove( table.name.begin(), table.name.end(), '/' ),
table.name.end() );
if( entry.contains( "properties" ) && entry["properties"].is_object() )
{
const nlohmann::json& pj = entry["properties"];
+53 -1
View File
@@ -659,6 +659,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "aris-kimi" ),
wxEmptyString,
wxEmptyString,
wxS( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Adolfo Jayme Barrientos" ),
wxEmptyString,
@@ -688,6 +692,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "VicSanRoPe" ),
wxEmptyString,
wxEmptyString,
wxS( "Spanish - Latin American (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ulices Avila Hernandez" ),
wxEmptyString,
@@ -822,14 +830,46 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "김낙환" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "이기형" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "남우근" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "강명구" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "김용재" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "서범기" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "김세영" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "이윤성" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "KwonHyeokbeom" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Minsu Kim (0xGabriel)" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Henrik Kauhanen" ),
wxEmptyString,
@@ -860,6 +900,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tom Niesse" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Christiaan Nieuwlaat" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jarl Gjessing" ),
wxEmptyString,
@@ -932,6 +980,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Portuguese (PT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "ssantos" ),
wxEmptyString,
wxEmptyString,
wxS( "Portuguese (PT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Igor Plyatov" ),
wxEmptyString,
@@ -1129,7 +1181,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
#define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
aInfo.AddLibrarian( new CONTRIBUTOR( wxS( "GitLab contributors" ),
wxEmptyString,
wxS( "https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/v7" ),
wxS( "https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master" ),
SYMBOL_LIB_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::add_component ) ) );
+100 -33
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2012-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2023 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
@@ -67,10 +67,6 @@ public:
BEGIN_EVENT_TABLE( DIALOG_SHIM, wxDialog )
// If dialog has a grid and the grid has an active cell editor
// Esc key closes cell editor, otherwise Esc key closes the dialog.
EVT_GRID_EDITOR_SHOWN( DIALOG_SHIM::OnGridEditorShown )
EVT_GRID_EDITOR_HIDDEN( DIALOG_SHIM::OnGridEditorHidden )
EVT_CHAR_HOOK( DIALOG_SHIM::OnCharHook )
END_EVENT_TABLE()
@@ -137,12 +133,41 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
Pgm().App().SetTopWindow( (EDA_BASE_FRAME*) kiwayHolder );
#endif
Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_SHIM::OnPaint ) );
Bind( wxEVT_PAINT, &DIALOG_SHIM::OnPaint, this );
}
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 );
std::function<void( wxWindowList& )> disconnectFocusHandlers = [&]( wxWindowList& children )
{
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() );
// if the dialog is quasi-modal, this will end its event loop
if( IsQuasiModal() )
EndQuasiModal( wxID_CANCEL );
@@ -263,6 +288,14 @@ bool DIALOG_SHIM::Show( bool show )
std::max( wxDialog::GetSize().y, savedDialogRect.GetSize().y ),
0 );
}
#ifdef __WXMAC__
if( m_parent != nullptr )
{
if( wxDisplay::GetFromPoint( m_parent->GetPosition() )
!= wxDisplay::GetFromPoint( savedDialogRect.GetPosition() ) )
Centre();
}
#endif
}
else if( m_initialSize != wxDefaultSize )
SetSize( m_initialSize );
@@ -286,6 +319,9 @@ bool DIALOG_SHIM::Show( bool show )
ret = wxDialog::Show( show );
}
if( m_parent )
m_parent->SetFocus();
return ret;
}
@@ -325,30 +361,38 @@ bool DIALOG_SHIM::Enable( bool enable )
// Recursive descent doing a SelectAll() in wxTextCtrls.
// MacOS User Interface Guidelines state that when tabbing to a text control all its
// text should be selected. Since wxWidgets fails to implement this, we do it here.
static void selectAllInTextCtrls( wxWindowList& children )
void DIALOG_SHIM::selectAllInTextCtrls( wxWindowList& children )
{
for( wxWindow* child : children )
{
if( wxTextCtrl* childTextCtrl = dynamic_cast<wxTextCtrl*>( child ) )
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( child ) )
{
m_beforeEditValues[ textCtrl ] = textCtrl->GetValue();
textCtrl->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
// We don't currently run this on GTK because some window managers don't hide the
// selection in non-active controls, and other window managers do the selection
// automatically anyway.
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
if( !childTextCtrl->GetStringSelection().IsEmpty() )
if( !textCtrl->GetStringSelection().IsEmpty() )
{
// Respect an existing selection
}
else
else if( textCtrl->IsEditable() )
{
childTextCtrl->SelectAll();
textCtrl->SelectAll();
}
#else
ignore_unused( childTextCtrl );
ignore_unused( textCtrl );
#endif
}
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( child ) )
{
m_beforeEditValues[ scintilla ] = scintilla->GetText();
scintilla->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( DIALOG_SHIM::onChildSetFocus ),
nullptr, this );
if( !scintilla->GetSelectedText().IsEmpty() )
{
// Respect an existing selection
@@ -479,6 +523,9 @@ int DIALOG_SHIM::ShowQuasiModal()
m_qmodal_showing = false;
if( parent )
parent->SetFocus();
return GetReturnCode();
}
@@ -533,11 +580,6 @@ void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
{
const int id = aEvent.GetId();
// If we are pressing a button to exit, we need to enable the escapeID
// otherwise the dialog does not process cancel
if( id == wxID_CANCEL )
SetEscapeId( wxID_ANY );
if( IsQuasiModal() )
{
if( id == GetAffirmativeId() )
@@ -555,7 +597,7 @@ void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
ignore_unused( TransferDataFromWindow() );
}
}
else if( id == GetEscapeId() || (id == wxID_CANCEL && GetEscapeId() == wxID_ANY) )
else if( id == wxID_CANCEL )
{
EndQuasiModal( wxID_CANCEL );
}
@@ -572,6 +614,19 @@ void DIALOG_SHIM::OnButton( wxCommandEvent& aEvent )
}
void DIALOG_SHIM::onChildSetFocus( wxFocusEvent& aEvent )
{
// When setting focus to a text control reset the before-edit value.
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( aEvent.GetEventObject() ) )
m_beforeEditValues[ textCtrl ] = textCtrl->GetValue();
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( aEvent.GetEventObject() ) )
m_beforeEditValues[ scintilla ] = scintilla->GetText();
aEvent.Skip();
}
void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
{
if( aEvt.GetKeyCode() == 'U' && aEvt.GetModifiers() == wxMOD_CONTROL )
@@ -583,7 +638,8 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
}
}
// shift-return (Mac default) or Ctrl-Return (GTK) for OK
else if( aEvt.GetKeyCode() == WXK_RETURN && ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
else if( ( aEvt.GetKeyCode() == WXK_RETURN || aEvt.GetKeyCode() == WXK_NUMPAD_ENTER )
&& ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
{
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
return;
@@ -626,25 +682,36 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
return;
}
}
else if( aEvt.GetKeyCode() == WXK_ESCAPE )
{
wxObject* eventSource = aEvt.GetEventObject();
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( eventSource ) )
{
// First escape after an edit cancels edit
if( textCtrl->GetValue() != m_beforeEditValues[ textCtrl ] )
{
textCtrl->SetValue( m_beforeEditValues[ textCtrl ] );
textCtrl->SelectAll();
return;
}
}
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( eventSource ) )
{
// First escape after an edit cancels edit
if( scintilla->GetText() != m_beforeEditValues[ scintilla ] )
{
scintilla->SetText( m_beforeEditValues[ scintilla ] );
scintilla->SelectAll();
return;
}
}
}
aEvt.Skip();
}
void DIALOG_SHIM::OnGridEditorShown( wxGridEvent& event )
{
SetEscapeId( wxID_NONE );
event.Skip();
}
void DIALOG_SHIM::OnGridEditorHidden( wxGridEvent& event )
{
SetEscapeId( wxID_ANY );
event.Skip();
}
static void recursiveDescent( wxSizer* aSizer, std::map<int, wxString>& aLabels )
{
wxStdDialogButtonSizer* sdbSizer = dynamic_cast<wxStdDialogButtonSizer*>( aSizer );
+2 -5
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2022-2023 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
@@ -105,10 +105,7 @@ void DIALOG_ASSIGN_NETCLASS::onPatternText( wxCommandEvent& aEvent )
for( const wxString& net : m_netCandidates )
{
int matches;
int offset;
if( matcher.Find( net, matches, offset ) && offset == 0 )
if( matcher.StartsWith( net ) )
{
m_matchingNets->Report( net );
matchingNetNames.push_back( net );
+12 -10
View File
@@ -396,12 +396,12 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
// Use Y axis from bottom to top and origin to center
bitmapDC.SetAxisOrientation( true, true );
#if wxCHECK_VERSION( 3, 1, 7 )
#if wxCHECK_VERSION( 3, 1, 7 ) && defined( __WXMSW__)
// For some reason, SetDeviceOrigin has changed in wxWidgets 3.1.6 or 3.1.7
bitmapDC.SetDeviceOrigin( half_size, -half_size );
#else
#else
bitmapDC.SetDeviceOrigin( half_size, half_size );
#endif
#endif
// Reserve room to draw cursors inside the bitmap
half_size -= m_cursorsSize/2;
@@ -466,12 +466,12 @@ void DIALOG_COLOR_PICKER::drawHSVPalette()
// Use Y axis from bottom to top and origin to center
bitmapDC.SetAxisOrientation( true, true );
#if wxCHECK_VERSION( 3, 1, 7 )
#if wxCHECK_VERSION( 3, 1, 7 ) && defined( __WXMSW__)
// For some reason, SetDeviceOrigin has changed in wxWidgets 3.1.6 or 3.1.7
bitmapDC.SetDeviceOrigin( half_size, -half_size );
#else
#else
bitmapDC.SetDeviceOrigin( half_size, half_size );
#endif
#endif
// Reserve room to draw cursors inside the bitmap
half_size -= m_cursorsSize / 2;
@@ -701,11 +701,13 @@ void DIALOG_COLOR_PICKER::onHSVMouseDrag( wxMouseEvent& event )
void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
{
m_newColor4D.SetFromHexString( m_colorValue->GetValue() );
m_newColor4D.ToHSV( m_hue, m_sat, m_val, true );
if( m_newColor4D.SetFromHexString( m_colorValue->GetValue() ) )
{
m_newColor4D.ToHSV( m_hue, m_sat, m_val, true );
SetEditVals( HEX_CHANGED, true );
drawAll();
SetEditVals( HEX_CHANGED, false );
drawAll();
}
}
+4 -4
View File
@@ -223,7 +223,7 @@ bool DIALOG_PAGES_SETTINGS::TransferDataFromWindow()
m_screen->SetContentModified();
if( LocalPrjConfigChanged() )
m_parent->SaveProjectSettings();
m_parent->OnModify();
// Call the post processing (if any) after changes
m_parent->OnPageSettingsChange();
@@ -674,9 +674,9 @@ void DIALOG_PAGES_SETTINGS::UpdateDrawingSheetExample()
GRFilledRect( &memDC, VECTOR2I( 0, 0 ), m_layout_size, 0, bgColor, bgColor );
PrintDrawingSheet( &renderSettings, pageDUMMY, emptyString, emptyString, m_tb,
nullptr, m_screen->GetPageCount(), m_screen->GetPageNumber(), 1,
&Prj(), wxEmptyString, m_screen->GetVirtualPageNumber() == 1 );
PrintDrawingSheet( &renderSettings, pageDUMMY, emptyString, emptyString, emptyString,
m_tb, nullptr, m_screen->GetPageCount(), m_screen->GetPageNumber(),
1, &Prj(), wxEmptyString, m_screen->GetVirtualPageNumber() == 1 );
memDC.SelectObject( wxNullBitmap );
m_PageLayoutExampleBitmap->SetBitmap( *m_pageBitmap );
+10 -2
View File
@@ -29,7 +29,7 @@ static PASTE_MODE g_paste_mode = PASTE_MODE::UNIQUE_ANNOTATIONS;
DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL( wxWindow* aParent,
PASTE_MODE* aMode,
wxString aReplacement ) :
const wxString& aReplacement ) :
DIALOG_PASTE_SPECIAL_BASE( aParent ),
m_mode( aMode )
{
@@ -45,7 +45,7 @@ DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL( wxWindow* aParent,
"with '%s'." ),
aReplacement ) );
m_sdbSizerOK->SetFocus();
m_pasteOptions->SetFocus();
// Now all widgets have the size fixed, call FinishDialogSettings
finishDialogSettings();
@@ -64,3 +64,11 @@ bool DIALOG_PASTE_SPECIAL::TransferDataFromWindow()
g_paste_mode = *m_mode = static_cast<PASTE_MODE>( m_pasteOptions->GetSelection() );
return true;
}
void DIALOG_PASTE_SPECIAL::onRadioBoxEvent( wxCommandEvent& event )
{
event.Skip();
m_sdbSizerOK->SetFocus();
}
+3 -3
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -45,12 +45,12 @@ DIALOG_PASTE_SPECIAL_BASE::DIALOG_PASTE_SPECIAL_BASE( wxWindow* parent, wxWindow
this->Centre( wxBOTH );
// Connect Events
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PASTE_SPECIAL_BASE::onOKButton ), NULL, this );
m_pasteOptions->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PASTE_SPECIAL_BASE::onRadioBoxEvent ), NULL, this );
}
DIALOG_PASTE_SPECIAL_BASE::~DIALOG_PASTE_SPECIAL_BASE()
{
// Disconnect Events
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PASTE_SPECIAL_BASE::onOKButton ), NULL, this );
m_pasteOptions->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PASTE_SPECIAL_BASE::onRadioBoxEvent ), NULL, this );
}
+159 -157
View File
@@ -1,163 +1,165 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_paste_special_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_paste_special</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_PASTE_SPECIAL_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Paste Special</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="1">
<FileVersion major="1" minor="17"/>
<object class="Project" expanded="true">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_paste_special_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_paste_special</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_PASTE_SPECIAL_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Paste Special</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">10</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">optionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Assign unique reference designators to pasted symbols&quot; &quot;Keep existing reference designators, even if they are duplicated&quot; &quot;Clear reference designators on all pasted symbols&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Paste Options</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">optionsSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Assign unique reference designators to pasted symbols&quot; &quot;Keep existing reference designators, even if they are duplicated&quot; &quot;Clear reference designators on all pasted symbols&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Paste Options</property>
<property name="majorDimension">1</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_pasteOptions</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">6</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="1">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
<event name="OnOKButtonClick">onOKButton</event>
</object>
</object>
<property name="moveable">1</property>
<property name="name">m_pasteOptions</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnRadioBox">onRadioBoxEvent</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">6</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="true">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer</property>
<property name="permission">protected</property>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -38,7 +38,7 @@ class DIALOG_PASTE_SPECIAL_BASE : public DIALOG_SHIM
wxButton* m_sdbSizerCancel;
// Virtual event handlers, override them in your derived class
virtual void onOKButton( wxCommandEvent& event ) { event.Skip(); }
virtual void onRadioBoxEvent( wxCommandEvent& event ) { event.Skip(); }
public:
+21 -7
View File
@@ -117,8 +117,7 @@ void PANEL_COLOR_SETTINGS::OnThemeChanged( wxCommandEvent& event )
if( idx == static_cast<int>( m_cbTheme->GetCount() ) - 2 )
{
// separator; re-select active theme
m_cbTheme->SetStringSelection( m_currentSettings->GetName() );
m_cbTheme->SetStringSelection( GetSettingsDropdownName( m_currentSettings ) );
return;
}
@@ -160,6 +159,7 @@ void PANEL_COLOR_SETTINGS::OnThemeChanged( wxCommandEvent& event )
m_cbTheme->SetSelection( idx );
m_optOverrideColors->SetValue( newSettings->GetOverrideSchItemColors() );
m_optOverrideColors->Enable( !newSettings->IsReadOnly() );
*m_currentSettings = *newSettings;
updateSwatches();
@@ -175,6 +175,7 @@ void PANEL_COLOR_SETTINGS::OnThemeChanged( wxCommandEvent& event )
return;
m_optOverrideColors->SetValue( selected->GetOverrideSchItemColors() );
m_optOverrideColors->Enable( !selected->IsReadOnly() );
*m_currentSettings = *selected;
onNewThemeSelected();
@@ -217,10 +218,7 @@ void PANEL_COLOR_SETTINGS::createThemeList( const wxString& aCurrent )
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
{
wxString name = settings->GetName();
if( settings->IsReadOnly() )
name += wxS( " " ) + _( "(read-only)" );
wxString name = GetSettingsDropdownName( settings );
int pos = m_cbTheme->Append( name, static_cast<void*>( settings ) );
@@ -262,8 +260,11 @@ void PANEL_COLOR_SETTINGS::createSwatch( int aLayer, const wxString& aName )
defaultColor, SWATCH_MEDIUM );
swatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
m_colorsGridSizer->Add( label, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxLEFT, 5 );
// Display the swatches in the left column and the layer name in the right column
// The right column is sometimes (depending on the translation) truncated for long texts.
// We cannot allow swatches to be truncated or not shown
m_colorsGridSizer->Add( swatch, 0, wxALIGN_CENTER_VERTICAL | wxALL, 3 );
m_colorsGridSizer->Add( label, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxLEFT, 5 );
m_labels[aLayer] = label;
m_swatches[aLayer] = swatch;
@@ -283,6 +284,8 @@ void PANEL_COLOR_SETTINGS::ShowColorContextMenu( wxMouseEvent& aEvent, int aLaye
auto selected =
static_cast<COLOR_SETTINGS*>( m_cbTheme->GetClientData( m_cbTheme->GetSelection() ) );
wxCHECK_RET( selected, wxT( "Invalid color theme selected" ) );
COLOR4D current = m_currentSettings->GetColor( aLayer );
COLOR4D saved = selected->GetColor( aLayer );
bool readOnly = m_currentSettings->IsReadOnly();
@@ -376,3 +379,14 @@ bool PANEL_COLOR_SETTINGS::saveCurrentTheme( bool aValidate )
return true;
}
wxString PANEL_COLOR_SETTINGS::GetSettingsDropdownName(COLOR_SETTINGS* aSettings)
{
wxString name = aSettings->GetName();
if( aSettings->IsReadOnly() )
name += wxS( " " ) + _( "(read-only)" );
return name;
}
+1 -2
View File
@@ -44,9 +44,8 @@
* Ugly as it all is, it does improve our usability on various platforms.
*/
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aParent )
PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( wxWindow* aParent )
: PANEL_COMMON_SETTINGS_BASE( aParent ),
m_dialog( aDialog ),
m_iconScaleLabel( nullptr ),
m_iconScaleSlider( nullptr ),
m_iconScaleAuto( nullptr ),
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -415,6 +415,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
this->SetSizer( bPanelSizer );
this->Layout();
bPanelSizer->Fit( this );
// Connect Events
m_textEditorBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
@@ -45,7 +45,7 @@
<property name="minimum_size"></property>
<property name="name">PANEL_COMMON_SETTINGS_BASE</property>
<property name="pos"></property>
<property name="size">676,655</property>
<property name="size">-1,-1</property>
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -113,7 +113,7 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL
public:
PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 676,655 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_COMMON_SETTINGS_BASE();
+5 -5
View File
@@ -37,8 +37,8 @@
#include <settings/settings_manager.h>
PANEL_DATA_COLLECTION::PANEL_DATA_COLLECTION( PAGED_DIALOG* aDialog, wxWindow* aParent ) :
PANEL_DATA_COLLECTION_BASE( aParent ), m_dialog( aDialog )
PANEL_DATA_COLLECTION::PANEL_DATA_COLLECTION( wxWindow* aParent ) :
PANEL_DATA_COLLECTION_BASE( aParent )
{
}
@@ -47,9 +47,9 @@ bool PANEL_DATA_COLLECTION::TransferDataToWindow()
{
applySettingsToPanel();
KIPLATFORM::POLICY::STATE policyState =
KIPLATFORM::POLICY::GetPolicyState( POLICY_KEY_DATACOLLECTION );
if( policyState != KIPLATFORM::POLICY::STATE::NOT_CONFIGURED )
KIPLATFORM::POLICY::PBOOL policyState =
KIPLATFORM::POLICY::GetPolicyBool( POLICY_KEY_DATACOLLECTION );
if( policyState != KIPLATFORM::POLICY::PBOOL::NOT_CONFIGURED )
{
Disable();
}
+13 -6
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2018 jean-pierre.charras
* Copyright (C) 2011-2020 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2011-2023 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
@@ -110,12 +110,19 @@ bool PANEL_IMAGE_EDITOR::TransferDataFromWindow()
void PANEL_IMAGE_EDITOR::OnRedrawPanel( wxPaintEvent& event )
{
wxPaintDC dc( m_panelDraw );
wxSize size = m_panelDraw->GetClientSize();
dc.SetDeviceOrigin( size.x / 2, size.y / 2 );
wxSize display_size = m_panelDraw->GetClientSize();
double scale = 1.0 / m_workingImage->GetScalingFactor();
dc.SetUserScale( scale, scale );
m_workingImage->DrawBitmap( &dc, wxPoint( 0, 0 ) );
double img_scale = 1.0 / m_workingImage->GetScalingFactor();
VECTOR2I img_size_pixels = m_workingImage->GetSizePixels();
// Adjust the display scale to use the full available display area
double scale_X = (double)display_size.x/img_size_pixels.x;
double scale_Y = (double)display_size.y/img_size_pixels.y;
double display_scale = img_scale * std::min( scale_X, scale_Y );
dc.SetUserScale( display_scale, display_scale );
m_workingImage->DrawBitmap( &dc, VECTOR2I( m_workingImage->GetSize()/2 ) );
}
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-133-g388db8e4)
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+368
View File
@@ -0,0 +1,368 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">panel_image_editor_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">panel_image_editor_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">PANEL_IMAGE_EDITOR_BASE</property>
<property name="pos"></property>
<property name="size">500,300</property>
<property name="subclass">; ; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerMain</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bUpperSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerLeft</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND | wxALL</property>
<property name="proportion">1</property>
<object class="wxPanel" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">256,256</property>
<property name="moveable">1</property>
<property name="name">m_panelDraw</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL|wxBORDER_SIMPLE</property>
<event name="OnPaint">OnRedrawPanel</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerRight</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Grey</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_buttonGrey</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnGreyScaleConvert</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Image Scale:</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticTextScale</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_textCtrlScale</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-133-g388db8e4)
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+4 -4
View File
@@ -26,9 +26,8 @@
#include <wx/defs.h>
PANEL_MOUSE_SETTINGS::PANEL_MOUSE_SETTINGS( PAGED_DIALOG* aDialog, wxWindow* aParent ) :
PANEL_MOUSE_SETTINGS::PANEL_MOUSE_SETTINGS( wxWindow* aParent ) :
PANEL_MOUSE_SETTINGS_BASE( aParent ),
m_dialog( aDialog ),
m_currentScrollMod( {} )
{
#ifdef __WXOSX_MAC__
@@ -82,8 +81,9 @@ bool PANEL_MOUSE_SETTINGS::TransferDataFromWindow()
if( !isScrollModSetValid( m_currentScrollMod ) )
{
m_dialog->SetError( _( "Only one action can be assigned to each vertical scroll setting" ),
this, nullptr );
PAGED_DIALOG::GetDialog( this )->SetError( _( "Only one action can be assigned to each "
"vertical scroll setting" ),
this, nullptr );
return false;
}
+2 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -316,6 +316,7 @@ PANEL_MOUSE_SETTINGS_BASE::PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindow
this->SetSizer( bSizer10 );
this->Layout();
bSizer10->Fit( this );
// Connect Events
m_rbZoomNone->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_MOUSE_SETTINGS_BASE::OnScrollRadioButton ), NULL, this );
+1 -1
View File
@@ -45,7 +45,7 @@
<property name="minimum_size"></property>
<property name="name">PANEL_MOUSE_SETTINGS_BASE</property>
<property name="pos"></property>
<property name="size">609,523</property>
<property name="size">-1,-1</property>
<property name="subclass">RESETTABLE_PANEL; widgets/resettable_panel.h; Not forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -97,7 +97,7 @@ class PANEL_MOUSE_SETTINGS_BASE : public RESETTABLE_PANEL
public:
PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 609,523 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_MOUSE_SETTINGS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_MOUSE_SETTINGS_BASE();
+15 -21
View File
@@ -39,7 +39,6 @@
#include <widgets/wx_html_report_box.h>
#include <widgets/wx_panel.h>
#include <widgets/std_bitmap_button.h>
#include <wx/treebook.h>
#include <project/net_settings.h>
@@ -70,13 +69,12 @@ std::vector<BITMAPS> g_lineStyleIcons;
wxArrayString g_lineStyleNames;
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_FRAME* aFrame,
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRAW_FRAME* aFrame,
std::shared_ptr<NET_SETTINGS> aNetSettings,
const std::set<wxString>& aNetNames,
bool aIsEEschema ) :
PANEL_SETUP_NETCLASSES_BASE( aParent->GetTreebook() ),
PANEL_SETUP_NETCLASSES_BASE( aParentWindow ),
m_frame( aFrame ),
m_parent( aParent ),
m_isEEschema( aIsEEschema ),
m_netSettings( aNetSettings ),
m_netNames( aNetNames ),
@@ -121,10 +119,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_
// as this initial width is sometimes strange depending on the language (wxGrid bug?)
int const min_width = m_netclassGrid->GetVisibleWidth( i, true, true );
int const weighted_min_best_width =
( i == GRID_LINESTYLE )
? min_best_width * 3 / 2
: min_best_width;
int const weighted_min_best_width = ( i == GRID_LINESTYLE ) ? min_best_width * 3 / 2
: min_best_width;
m_netclassGrid->SetColMinimalWidth( i, min_width );
@@ -158,8 +154,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_
}
wxGridCellAttr* attr = new wxGridCellAttr;
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( aParent ) );
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( aParent, m_netclassGrid ) );
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) );
m_netclassGrid->SetColAttr( GRID_SCHEMATIC_COLOR, attr );
attr = new wxGridCellAttr;
@@ -174,7 +170,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_
m_netclassGrid->SetAutoEvalCols( { GRID_WIREWIDTH,
GRID_BUSWIDTH,
GRID_CLEARANCE,
GRID_TRACKSIZE,
GRID_VIASIZE,
@@ -327,6 +322,8 @@ bool PANEL_SETUP_NETCLASSES::TransferDataToWindow()
row++;
}
AdjustAssignmentGridColumns( GetSize().x * 3 / 5 );
return true;
}
@@ -428,7 +425,7 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
if( tmp.IsEmpty() )
{
wxString msg = _( "Netclass must have a name." );
m_parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
PAGED_DIALOG::GetDialog( this )->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
return false;
}
@@ -437,7 +434,8 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
if( ii != aRow && m_netclassGrid->GetCellValue( ii, GRID_NAME ).CmpNoCase( tmp ) == 0 )
{
wxString msg = _( "Netclass name already in use." );
m_parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
PAGED_DIALOG::GetDialog( this )->SetError( msg, this, m_netclassGrid,
focusFirst ? aRow : ii, GRID_NAME );
return false;
}
}
@@ -652,16 +650,15 @@ void PANEL_SETUP_NETCLASSES::AdjustAssignmentGridColumns( int aWidth )
// Account for scroll bars
aWidth -= ( m_assignmentGrid->GetSize().x - m_assignmentGrid->GetClientSize().x );
// Set className column width to original className width from netclasses grid
int classNameWidth = m_originalColWidths[ 0 ];
m_assignmentGrid->SetColSize( 1, m_originalColWidths[ 0 ] );
int classNameWidth = 160;
m_assignmentGrid->SetColSize( 1, classNameWidth );
m_assignmentGrid->SetColSize( 0, std::max( aWidth - classNameWidth, classNameWidth ) );
}
void PANEL_SETUP_NETCLASSES::OnSizeAssignmentGrid( wxSizeEvent& event )
{
AdjustAssignmentGridColumns( event.GetSize().GetX());
AdjustAssignmentGridColumns( event.GetSize().GetX() );
event.Skip();
}
@@ -708,10 +705,7 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
for( const wxString& net : m_netNames )
{
int matches;
int offset;
if( matcher.Find( net, matches, offset ) && offset == 0 )
if( matcher.StartsWith( net ) )
m_matchingNets->Report( net );
}
}
@@ -74,7 +74,7 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
// Cell Defaults
m_netclassGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
bUpperSizer->Add( m_netclassGrid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 1 );
bUpperSizer->Add( m_netclassGrid, 1, wxEXPAND|wxFIXED_MINSIZE|wxLEFT|wxRIGHT|wxTOP, 1 );
wxBoxSizer* buttonBoxSizer;
buttonBoxSizer = new wxBoxSizer( wxHORIZONTAL );
@@ -129,7 +129,7 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
m_assignmentGrid->SetMargins( 0, 0 );
// Columns
m_assignmentGrid->SetColSize( 0, 400 );
m_assignmentGrid->SetColSize( 0, 270 );
m_assignmentGrid->SetColSize( 1, 160 );
m_assignmentGrid->EnableDragColMove( false );
m_assignmentGrid->EnableDragColSize( true );
@@ -147,7 +147,7 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
// Cell Defaults
m_assignmentGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
bSizer14->Add( m_assignmentGrid, 2, wxEXPAND|wxLEFT, 5 );
bSizer14->Add( m_assignmentGrid, 2, wxEXPAND|wxFIXED_MINSIZE|wxLEFT, 5 );
bColumns->Add( bSizer14, 3, wxEXPAND, 5 );
@@ -186,7 +186,6 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
this->SetSizer( bpanelNetClassesSizer );
this->Layout();
bpanelNetClassesSizer->Fit( this );
// Connect Events
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_NETCLASSES_BASE::OnUpdateUI ) );
@@ -45,7 +45,7 @@
<property name="minimum_size">-1,-1</property>
<property name="name">PANEL_SETUP_NETCLASSES_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="size">700,500</property>
<property name="subclass">; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
@@ -258,7 +258,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">1</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
<property name="flag">wxEXPAND|wxFIXED_MINSIZE|wxLEFT|wxRIGHT|wxTOP</property>
<property name="proportion">1</property>
<object class="wxGrid" expanded="0">
<property name="BottomDockable">1</property>
@@ -737,7 +737,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property>
<property name="flag">wxEXPAND|wxFIXED_MINSIZE|wxLEFT</property>
<property name="proportion">2</property>
<object class="wxGrid" expanded="0">
<property name="BottomDockable">1</property>
@@ -766,7 +766,7 @@
<property name="col_label_values">&quot;Pattern&quot; &quot;Net Class&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">2</property>
<property name="column_sizes">400,160</property>
<property name="column_sizes">270,160</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
+1 -1
View File
@@ -69,7 +69,7 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
public:
PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,500 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_SETUP_NETCLASSES_BASE();
+10 -9
View File
@@ -28,14 +28,13 @@
#include <wx/radiobut.h>
#include <wx/scrolwin.h>
#include <wx/stattext.h>
#include <wx/treebook.h>
PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( wxWindow* aParentWindow,
std::vector<std::reference_wrapper<RC_ITEM>> aItems,
std::map<int, SEVERITY>& aSeverities,
RC_ITEM* aPinMapSpecialCase ) :
wxPanel( aParent->GetTreebook() ),
wxPanel( aParentWindow ),
m_severities( aSeverities ),
m_items( aItems ),
m_pinMapSpecialCase( aPinMapSpecialCase )
@@ -162,16 +161,18 @@ void PANEL_SETUP_SEVERITIES::ImportSettingsFrom( std::map<int, SEVERITY>& aSetti
{
int errorCode = item.GetErrorCode();
if(! m_buttonMap[ errorCode ][0] ) // this entry does not actually exist
continue;
wxRadioButton* button = nullptr;
switch( aSettings[ errorCode ] )
{
case RPT_SEVERITY_ERROR: m_buttonMap[ errorCode ][0]->SetValue( true ); break;
case RPT_SEVERITY_WARNING: m_buttonMap[ errorCode ][1]->SetValue( true ); break;
case RPT_SEVERITY_IGNORE: m_buttonMap[ errorCode ][2]->SetValue( true ); break;
default: break;
case RPT_SEVERITY_ERROR: button = m_buttonMap[ errorCode ][0]; break;
case RPT_SEVERITY_WARNING: button = m_buttonMap[ errorCode ][1]; break;
case RPT_SEVERITY_IGNORE: button = m_buttonMap[ errorCode ][2]; break;
default: break;
}
if( button ) // this entry must actually exist
button->SetValue( true );
}
if( m_pinMapSpecialCase )
+15 -12
View File
@@ -58,7 +58,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
const wxPoint& aPosition, const wxSize& aSize,
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
wxScrolledCanvas( aParentWindow, aWindowId, aPosition, aSize ),
m_MouseCapturedLost( false ),
m_parent( aParentWindow ),
m_edaFrame( nullptr ),
m_lastRefresh( 0 ),
m_pendingRefresh( false ),
m_drawing( false ),
m_drawingEnabled( false ),
m_gal( nullptr ),
m_view( nullptr ),
m_painter( nullptr ),
@@ -70,11 +76,10 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
m_stealsFocus( true ),
m_statusPopup( nullptr )
{
m_parent = aParentWindow;
m_MouseCapturedLost = false;
m_PaintEventCounter = std::make_unique<PROF_COUNTER>( "Draw panel paint events" );
m_minRefreshPeriod = 13; // 77 FPS (minus render time) by default
SetLayoutDirection( wxLayout_LeftToRight );
m_edaFrame = dynamic_cast<EDA_DRAW_FRAME*>( m_parent );
@@ -105,6 +110,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
KIPLATFORM::UI::SetOverlayScrolling( this, false ); // Prevent excessive repaint on GTK
KIPLATFORM::UI::ImmControl( this, false ); // Ensure our panel can't suck in IME events
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), nullptr, this );
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), nullptr,
@@ -146,12 +152,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
Connect( eventType, wxEventHandler( EDA_DRAW_PANEL_GAL::OnEvent ), nullptr,
m_eventDispatcher );
m_pendingRefresh = false;
m_drawing = false;
m_drawingEnabled = false;
m_minRefreshPeriod = 13; // 77 FPS (minus render time) by default
// Set up timer that prevents too frequent redraw commands
m_refreshTimer.SetOwner( this );
Connect( m_refreshTimer.GetId(), wxEVT_TIMER,
@@ -212,7 +212,7 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
if( !m_drawingEnabled )
return;
if( !m_gal->IsVisible() )
if( !m_gal->IsInitialized() || !m_gal->IsVisible() )
return;
m_pendingRefresh = false;
@@ -366,7 +366,10 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
if( m_view )
{
if( infobar && infobar->IsLocked() )
m_view->SetCenter( bottom - m_view->ToWorld( clientSize, false ) / 2.0 );
{
VECTOR2D halfScreen( std::ceil( 0.5 * clientSize.x ), std::ceil( 0.5 * clientSize.y ) );
m_view->SetCenter( bottom - m_view->ToWorld( halfScreen, false ) );
}
m_view->MarkTargetDirty( KIGFX::TARGET_CACHED );
m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
@@ -627,7 +630,7 @@ void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
{
if( m_gal && m_gal->IsVisible() )
if( m_gal && m_gal->IsInitialized() && m_gal->IsVisible() )
{
m_onShowTimer.Stop();
OnShow();
+15 -19
View File
@@ -106,13 +106,13 @@ void DS_DATA_ITEM::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aV
for( int j = 0; j < m_RepeatCount; j++ )
{
if( j && ! IsInsidePage( j ) )
if( j > 0 && !IsInsidePage( j ) )
continue;
if( m_type == DS_SEGMENT )
item = new DS_DRAW_ITEM_LINE( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize );
item = new DS_DRAW_ITEM_LINE( this, j, GetStartPosIU( j ), GetEndPosIU( j ), pensize );
else if( m_type == DS_RECT )
item = new DS_DRAW_ITEM_RECT( this, j, GetStartPosUi( j ), GetEndPosUi( j ), pensize );
item = new DS_DRAW_ITEM_RECT( this, j, GetStartPosIU( j ), GetEndPosIU( j ), pensize );
else
{
wxFAIL_MSG( wxS( "Unknown drawing sheet item type" ) );
@@ -162,8 +162,8 @@ void DS_DATA_ITEM::MoveTo( const VECTOR2D& aPosition )
for( DS_DRAW_ITEM_BASE* drawItem : m_drawItems )
{
drawItem->SetPosition( GetStartPosUi( drawItem->GetIndexInPeer() ) );
drawItem->SetEnd( GetEndPosUi( drawItem->GetIndexInPeer() ) );
drawItem->SetPosition( GetStartPosIU( drawItem->GetIndexInPeer() ) );
drawItem->SetEnd( GetEndPosIU( drawItem->GetIndexInPeer() ) );
}
}
@@ -294,7 +294,7 @@ const VECTOR2D DS_DATA_ITEM::GetStartPos( int ii ) const
}
const VECTOR2I DS_DATA_ITEM::GetStartPosUi( int ii ) const
const VECTOR2I DS_DATA_ITEM::GetStartPosIU( int ii ) const
{
VECTOR2D pos = GetStartPos( ii ) * DS_DATA_MODEL::GetTheInstance().m_WSunits2Iu;
return VECTOR2I( KiROUND( pos.x ), KiROUND( pos.y ) );
@@ -331,7 +331,7 @@ const VECTOR2D DS_DATA_ITEM::GetEndPos( int ii ) const
}
const VECTOR2I DS_DATA_ITEM::GetEndPosUi( int ii ) const
const VECTOR2I DS_DATA_ITEM::GetEndPosIU( int ii ) const
{
VECTOR2D pos = GetEndPos( ii );
pos = pos * DS_DATA_MODEL::GetTheInstance().m_WSunits2Iu;
@@ -343,17 +343,13 @@ bool DS_DATA_ITEM::IsInsidePage( int ii ) const
{
DS_DATA_MODEL& model = DS_DATA_MODEL::GetTheInstance();
VECTOR2D pos = GetStartPos( ii );
for( int kk = 0; kk < 1; kk++ )
for( const VECTOR2D& pos : { GetStartPos( ii ), GetEndPos( ii ) } )
{
if( model.m_RB_Corner.x < pos.x || model.m_LT_Corner.x > pos.x )
return false;
if( model.m_RB_Corner.y < pos.y || model.m_LT_Corner.y > pos.y )
return false;
pos = GetEndPos( ii );
}
return true;
@@ -406,11 +402,11 @@ void DS_DATA_ITEM_POLYGONS::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX:
for( int j = 0; j < m_RepeatCount; j++ )
{
if( j && !IsInsidePage( j ) )
if( j > 0 && !IsInsidePage( j ) )
continue;
int pensize = GetPenSizeUi();
auto poly_shape = new DS_DRAW_ITEM_POLYPOLYGONS( this, j, GetStartPosUi( j ), pensize );
auto poly_shape = new DS_DRAW_ITEM_POLYPOLYGONS( this, j, GetStartPosIU( j ), pensize );
poly_shape->SetFlags( itemFlags[ j ] );
m_drawItems.push_back( poly_shape );
@@ -584,7 +580,7 @@ void DS_DATA_ITEM_TEXT::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIE
if( j > 0 && !IsInsidePage( j ) )
continue;
text = new DS_DRAW_ITEM_TEXT( this, j, m_FullText, GetStartPosUi( j ), textsize, pensize,
text = new DS_DRAW_ITEM_TEXT( this, j, m_FullText, GetStartPosIU( j ), textsize, pensize,
m_Font, m_Italic, m_Bold, m_TextColor );
text->SetFlags( itemFlags[ j ] );
m_drawItems.push_back( text );
@@ -595,14 +591,14 @@ void DS_DATA_ITEM_TEXT::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIE
if( aView )
aView->Add( text );
text->SetHorizJustify( m_Hjustify ) ;
text->SetHorizJustify( m_Hjustify );
text->SetVertJustify( m_Vjustify );
text->SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
text->SetMultilineAllowed( multilines );
// Increment label for the next text (has no meaning for multiline texts)
if( m_RepeatCount > 1 && !multilines )
IncrementLabel(( j + 1 ) * m_IncrementLabel );
IncrementLabel( ( j + 1 ) * m_IncrementLabel );
}
}
@@ -746,10 +742,10 @@ void DS_DATA_ITEM_BITMAP::SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::V
for( int j = 0; j < m_RepeatCount; j++ )
{
if( j && !IsInsidePage( j ) )
if( j > 0 && !IsInsidePage( j ) )
continue;
DS_DRAW_ITEM_BITMAP* bitmap = new DS_DRAW_ITEM_BITMAP( this, j, GetStartPosUi( j ) );
DS_DRAW_ITEM_BITMAP* bitmap = new DS_DRAW_ITEM_BITMAP( this, j, GetStartPosIU( j ) );
bitmap->SetFlags( itemFlags[ j ] );
m_drawItems.push_back( bitmap );
+5 -4
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2019-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Jean-Pierre Charras, jp.charras at wanadoo.fr
*
@@ -247,13 +247,14 @@ void DS_DATA_MODEL_IO::format( DS_DATA_ITEM_TEXT* aItem, int aNestLevel ) const
// Write font info, only if it is not the default setup
bool write_size = aItem->m_TextSize.x != 0.0 || aItem->m_TextSize.y != 0.0;
bool write_thickness = aItem->m_LineWidth != 0.0;
bool write_face = aItem->m_Font && !aItem->m_Font->GetName().IsEmpty();
if( write_thickness || write_size || aItem->m_Bold
|| aItem->m_Italic || aItem->m_TextColor != COLOR4D::UNSPECIFIED )
if( write_thickness || write_size || aItem->m_Bold || aItem->m_Italic
|| write_face || aItem->m_TextColor != COLOR4D::UNSPECIFIED )
{
m_out->Print( 0, " (font" );
if( aItem->m_Font && !aItem->m_Font->GetName().IsEmpty() )
if( write_face )
m_out->Print( 0, " (face \"%s\")", aItem->m_Font->NameAsToken() );
if( write_thickness )
+38 -3
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
@@ -118,8 +118,12 @@ void DS_DRAW_ITEM_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
break;
case DS_DATA_ITEM::DS_TEXT:
aList.emplace_back( _( "Text" ), static_cast<DS_DRAW_ITEM_TEXT*>( this )->GetShownText() );
{
DS_DRAW_ITEM_TEXT* textItem = static_cast<DS_DRAW_ITEM_TEXT*>( this );
// Don't use GetShownText(); we want to see the variable references here
aList.emplace_back( _( "Text" ), KIUI::EllipsizeStatusText( aFrame, textItem->GetText() ) );
break;
}
case DS_DATA_ITEM::DS_POLYPOLYGON:
aList.emplace_back( _( "Imported Shape" ), wxEmptyString );
@@ -170,6 +174,37 @@ void DS_DRAW_ITEM_TEXT::PrintWsItem( const RENDER_SETTINGS* aSettings, const VEC
}
const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
{
// A really dumb over-approximation because doing it for real (even with the stroke font)
// shows up large in profiles.
const TEXT_ATTRIBUTES& attrs = GetAttributes();
const wxString text = GetShownText( true );
BOX2I bbox( GetTextPos() );
bbox.SetWidth( (int) text.length() * attrs.m_Size.x * 1.3 );
bbox.SetHeight( attrs.m_Size.y );
switch( attrs.m_Halign )
{
case GR_TEXT_H_ALIGN_LEFT: break;
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( -bbox.GetWidth() / 2, 0 ); break;
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( -bbox.GetWidth(), 0 ); break;
}
switch( GetAttributes().m_Valign )
{
case GR_TEXT_V_ALIGN_TOP: break;
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, -bbox.GetHeight() / 2 ); break;
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, -bbox.GetHeight() ); break;
}
bbox.Inflate( attrs.m_Size.x, attrs.m_Size.y / 2 );
return bbox;
}
const BOX2I DS_DRAW_ITEM_TEXT::GetBoundingBox() const
{
return EDA_TEXT::GetTextBox();
@@ -190,7 +225,7 @@ bool DS_DRAW_ITEM_TEXT::HitTest( const BOX2I& aRect, bool aContains, int aAccura
wxString DS_DRAW_ITEM_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Text '%s'" ), GetShownText() );
return wxString::Format( _( "Text '%s'" ), KIUI::EllipsizeMenuText( GetText() ) );
}
+2 -1
View File
@@ -270,7 +270,7 @@ void KIGFX::DS_PAINTER::draw( const DS_DRAW_ITEM_TEXT* aItem, int aLayer ) const
attrs.m_StrokeWidth = std::max( aItem->GetEffectiveTextPenWidth(),
m_renderSettings.GetDefaultPenWidth() );
font->Draw( m_gal, aItem->GetShownText(), aItem->GetTextPos(), attrs );
font->Draw( m_gal, aItem->GetShownText( true ), aItem->GetTextPos(), attrs );
}
@@ -356,5 +356,6 @@ void KIGFX::DS_PAINTER::DrawBorder( const PAGE_INFO* aPageInfo, int aScaleFactor
// Use a gray color for the border color
m_gal->SetStrokeColor( m_renderSettings.m_pageBorderColor );
m_gal->SetIsFill( false );
m_gal->SetLineWidth( m_renderSettings.GetDefaultPenWidth() );
m_gal->DrawRectangle( origin, end );
}
+13 -2
View File
@@ -106,14 +106,22 @@ void DS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
buildDrawList( aView, m_properties, &drawList );
BOX2I viewport( aView->GetViewport().GetOrigin(), aView->GetViewport().GetSize() );
// Draw the title block normally even if the view is flipped
bool flipped = gal->IsFlippedX();
if( flipped )
{
int pageWidth = m_pageInfo->GetWidthMils() * m_mils2IUscalefactor;
gal->Save();
gal->Translate( VECTOR2D( m_pageInfo->GetWidthMils() * m_mils2IUscalefactor, 0 ) );
gal->Translate( VECTOR2D( pageWidth, 0 ) );
gal->Scale( VECTOR2D( -1.0, 1.0 ) );
int right = pageWidth - viewport.GetLeft();
int left = right - viewport.GetWidth();
viewport.SetOrigin( left, viewport.GetTop() );
}
DS_PAINTER ws_painter( gal );
@@ -127,7 +135,10 @@ void DS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
// Draw all the components that make the drawing sheet
for( DS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
ws_painter.Draw( item, LAYER_DRAWINGSHEET );
{
if( viewport.Intersects( item->GetApproxBBox() ) )
ws_painter.Draw( item, LAYER_DRAWINGSHEET );
}
// Draw gray line that outlines the sheet size
if( settings->GetShowPageLimits() )
+90 -44
View File
@@ -55,13 +55,15 @@
#include <widgets/paged_dialog.h>
#include <widgets/wx_infobar.h>
#include <widgets/wx_aui_art_providers.h>
#include <widgets/wx_grid.h>
#include <widgets/wx_treebook.h>
#include <wx/app.h>
#include <wx/config.h>
#include <wx/display.h>
#include <wx/stdpaths.h>
#include <wx/string.h>
#include <wx/treebook.h>
#include <kiplatform/app.h>
#include <kiplatform/io.h>
#include <kiplatform/ui.h>
#include <functional>
@@ -166,15 +168,28 @@ EDA_BASE_FRAME::EDA_BASE_FRAME( wxWindow* aParent, FRAME_T aFrameType, const wxS
}
wxWindow* findQuasiModalDialog( wxWindow* aParent )
{
for( wxWindow* child : aParent->GetChildren() )
{
if( DIALOG_SHIM* dlg = dynamic_cast<DIALOG_SHIM*>( child ) )
{
if( dlg->IsQuasiModal() )
return dlg;
if( wxWindow* nestedDlg = findQuasiModalDialog( child ) )
return nestedDlg;
}
}
return nullptr;
}
wxWindow* EDA_BASE_FRAME::findQuasiModalDialog()
{
for( wxWindow* iter : GetChildren() )
{
DIALOG_SHIM* dlg = dynamic_cast<DIALOG_SHIM*>( iter );
if( dlg && dlg->IsQuasiModal() )
return dlg;
}
if( wxWindow* dlg = ::findQuasiModalDialog( this ) )
return dlg;
// FIXME: CvPcb is currently implemented on top of KIWAY_PLAYER rather than DIALOG_SHIM,
// so we have to look for it separately.
@@ -219,6 +234,10 @@ void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event )
if( canCloseWindow( event ) )
{
m_isClosing = true;
if( m_infoBar )
m_infoBar->Dismiss();
APP_SETTINGS_BASE* cfg = config();
if( cfg )
@@ -399,6 +418,8 @@ void EDA_BASE_FRAME::HandleUpdateUIEvent( wxUpdateUIEvent& aEvent, EDA_BASE_FRAM
enableRes = true;
else if( textEntry && isPaste && textEntry->CanPaste() )
enableRes = true;
else if( dynamic_cast<WX_GRID*>( focus ) )
enableRes = false; // Must disable menu in order to get command as CharHook event
}
aEvent.Enable( enableRes );
@@ -1001,26 +1022,45 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
{
wxBeginBusyCursor( wxHOURGLASS_CURSOR );
PAGED_DIALOG dlg( this, _( "Preferences" ), true );
PAGED_DIALOG dlg( this, _( "Preferences" ), true, wxEmptyString, wxSize( 980, 560 ) );
dlg.SetEvtHandlerEnabled( false );
wxTreebook* book = dlg.GetTreebook();
WX_TREEBOOK* book = dlg.GetTreebook();
PANEL_HOTKEYS_EDITOR* hotkeysPanel = new PANEL_HOTKEYS_EDITOR( this, book, false );
KIFACE* kiface = nullptr;
std::vector<int> expand;
Kiway().GetActions( hotkeysPanel->ActionsList() );
book->AddPage( new PANEL_COMMON_SETTINGS( &dlg, book ), _( "Common" ) );
book->AddPage( new PANEL_MOUSE_SETTINGS( &dlg, book ), _( "Mouse and Touchpad" ) );
book->AddLazyPage(
[]( wxWindow* aParent ) -> wxWindow*
{
return new PANEL_COMMON_SETTINGS( aParent );
},
_( "Common" ) );
book->AddLazyPage(
[]( wxWindow* aParent ) -> wxWindow*
{
return new PANEL_MOUSE_SETTINGS( aParent );
}, _( "Mouse and Touchpad" ) );
book->AddPage( hotkeysPanel, _( "Hotkeys" ) );
#ifdef KICAD_USE_SENTRY
book->AddPage( new PANEL_DATA_COLLECTION( &dlg, book ), _( "Data Collection" ) );
book->AddLazyPage(
[]( wxWindow* aParent ) -> wxWindow*
{
return new PANEL_DATA_COLLECTION( aParent );
}, _( "Data Collection" ) );
#endif
#define CREATE_PANEL( key ) kiface->CreateKiWindow( book, key, &Kiway() )
#define LAZY_CTOR( key ) \
[=]( wxWindow* aParent ) \
{ \
return kiface->CreateKiWindow( aParent, key, &Kiway() ); \
}
// If a dll is not loaded, the loader will show an error message.
@@ -1034,20 +1074,19 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "Symbol Editor" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SYM_DISP_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SYM_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SYM_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SYM_DISP_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SYM_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SYM_COLORS ), _( "Colors" ) );
if( GetFrameType() == FRAME_SCH )
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "Schematic Editor" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SCH_DISP_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SCH_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SCH_ANNO_OPTIONS ), _( "Annotation Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SCH_COLORS ), _( "Colors" ) );
book->AddSubPage( CREATE_PANEL( PANEL_SCH_FIELD_NAME_TEMPLATES ),
_( "Field Name Templates" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SCH_DISP_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SCH_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SCH_ANNO_OPTIONS ), _( "Annotation Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SCH_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_SCH_FIELD_NAME_TEMPLATES ), _( "Field Name Templates" ) );
}
catch( ... )
{
@@ -1063,29 +1102,29 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "Footprint Editor" ) );
book->AddSubPage( CREATE_PANEL( PANEL_FP_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_FP_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_FP_COLORS ), _( "Colors" ) );
book->AddSubPage( CREATE_PANEL( PANEL_FP_DEFAULT_VALUES ), _( "Default Values" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_FP_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_FP_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_FP_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_FP_DEFAULT_VALUES ), _( "Default Values" ) );
if( GetFrameType() == FRAME_PCB_EDITOR )
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "PCB Editor" ) );
book->AddSubPage( CREATE_PANEL( PANEL_PCB_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_PCB_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_PCB_COLORS ), _( "Colors" ) );
book->AddSubPage( CREATE_PANEL( PANEL_PCB_ACTION_PLUGINS ), _( "Action Plugins" ) );
book->AddSubPage( CREATE_PANEL( PANEL_PCB_ORIGINS_AXES ), _( "Origins & Axes" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_PCB_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_PCB_EDIT_OPTIONS ), _( "Editing Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_PCB_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_PCB_ACTION_PLUGINS ), _( "Action Plugins" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_PCB_ORIGINS_AXES ), _( "Origins & Axes" ) );
if( GetFrameType() == FRAME_PCB_DISPLAY3D )
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "3D Viewer" ) );
book->AddSubPage( CREATE_PANEL( PANEL_3DV_DISPLAY_OPTIONS ), _( "General" ) );
book->AddSubPage( CREATE_PANEL( PANEL_3DV_OPENGL ), _( "Realtime Renderer" ) );
book->AddSubPage( CREATE_PANEL( PANEL_3DV_RAYTRACING ), _( "Raytracing Renderer" ) );
book->AddSubPage( CREATE_PANEL( PANEL_3DV_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_3DV_DISPLAY_OPTIONS ), _( "General" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_3DV_OPENGL ), _( "Realtime Renderer" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_3DV_RAYTRACING ), _( "Raytracing Renderer" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_3DV_COLORS ), _( "Colors" ) );
}
catch( ... )
{
@@ -1101,9 +1140,9 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "Gerber Viewer" ) );
book->AddSubPage( CREATE_PANEL( PANEL_GBR_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_GBR_COLORS ), _( "Colors" ) );
book->AddSubPage( CREATE_PANEL( PANEL_GBR_EXCELLON_OPTIONS ), _( "Excellon Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_EXCELLON_OPTIONS ), _( "Excellon Options" ) );
}
catch( ... )
{
@@ -1118,10 +1157,14 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
expand.push_back( book->GetPageCount() );
book->AddPage( new wxPanel( book ), _( "Drawing Sheet Editor" ) );
book->AddSubPage( CREATE_PANEL( PANEL_DS_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddSubPage( CREATE_PANEL( PANEL_DS_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_DS_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_DS_COLORS ), _( "Colors" ) );
book->AddPage( new PANEL_PCM_SETTINGS( book ), _( "Plugin and Content Manager" ) );
book->AddLazyPage(
[]( wxWindow* aParent ) -> wxWindow*
{
return new PANEL_PCM_SETTINGS( aParent );
}, _( "Plugin and Content Manager" ) );
}
catch( ... )
{
@@ -1149,7 +1192,7 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
dlg.Kiway().CommonSettingsChanged( false, false );
}
#undef CREATE_PANEL
#undef LAZY_CTOR
}
@@ -1230,7 +1273,7 @@ bool EDA_BASE_FRAME::IsWritable( const wxFileName& aFileName, bool aVerbose )
void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
{
if( !IsGUI() )
if( !Pgm().IsGUI() )
return;
wxCHECK_RET( aFileName.IsOk(), wxT( "Invalid file name!" ) );
@@ -1261,6 +1304,9 @@ void EDA_BASE_FRAME::CheckForAutoSaveFile( const wxFileName& aFileName )
// the file name.
if( response == wxYES )
{
// Preserve the permissions of the current file
KIPLATFORM::IO::DuplicatePermissions( aFileName.GetFullPath(), autoSaveFileName.GetFullPath() );
if( !wxRenameFile( autoSaveFileName.GetFullPath(), aFileName.GetFullPath() ) )
{
wxMessageBox( _( "The auto save file could not be renamed to the board file name." ),
+4
View File
@@ -144,6 +144,10 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
wxFileName currentFileName( fullfilename );
// Use wxWidgets to resolve any "." and ".." in the path
currentFileName.MakeAbsolute();
fullfilename = currentFileName.GetFullPath();
wxString file_ext = currentFileName.GetExt();
if( file_ext.Lower() == wxT( "pdf" ) )
+62 -45
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2004-2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2004-2023 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
@@ -27,6 +27,7 @@
#include <bitmaps.h>
#include <confirm.h>
#include <core/arraydim.h>
#include <core/kicad_algo.h>
#include <dialog_shim.h>
#include <eda_draw_frame.h>
#include <file_history.h>
@@ -78,12 +79,16 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
EVT_ACTIVATE( EDA_DRAW_FRAME::onActivate )
END_EVENT_TABLE()
bool EDA_DRAW_FRAME::m_openGLFailureOccured = false;
EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
long aStyle, const wxString& aFrameName, const EDA_IU_SCALE& aIuScale ) :
KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName, aIuScale )
long aStyle, const wxString& aFrameName,
const EDA_IU_SCALE& aIuScale ) :
KIWAY_PLAYER( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName, aIuScale ),
m_socketServer( nullptr )
{
m_socketServer = nullptr;
m_mainToolBar = nullptr;
@@ -171,8 +176,8 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
OnMove( dummy );
// we need to kludge the msg panel to the correct size again
// especially important even for first launches as the constructor of the window here usually doesn't
// have the correct dpi awareness yet
// especially important even for first launches as the constructor of the window
// here usually doesn't have the correct dpi awareness yet
m_frameSize.y += m_msgFrameHeight;
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
m_frameSize.y -= m_msgFrameHeight;
@@ -212,15 +217,31 @@ EDA_DRAW_FRAME::~EDA_DRAW_FRAME()
void EDA_DRAW_FRAME::ReleaseFile()
{
m_file_checker = nullptr;
if( m_file_checker.get() != nullptr )
m_file_checker->UnlockFile();
}
bool EDA_DRAW_FRAME::LockFile( const wxString& aFileName )
{
m_file_checker = ::LockFile( aFileName );
// We need to explicitly reset here to get the deletion before
// we create a new unique_ptr that may be for the same file
m_file_checker.reset();
return m_file_checker && !m_file_checker->IsAnotherRunning();
m_file_checker = std::make_unique<LOCKFILE>( aFileName );
if( !m_file_checker->Valid() && m_file_checker->IsLockedByMe() )
{
// If we cannot acquire the lock but we appear to be the one who
// locked it, check to see if there is another KiCad instance running.
// If there is not, then we can override the lock. This could happen if
// KiCad crashed or was interrupted
if( !Pgm().SingleInstance()->IsAnotherRunning() )
m_file_checker->OverrideLock();
}
// If the file is valid, return true. This could mean that the file is
// locked or it could mean that the file is read-only
return m_file_checker->Valid();
}
@@ -285,7 +306,7 @@ void EDA_DRAW_FRAME::ToggleUserUnits()
else
{
SetUserUnits( GetUserUnits() == EDA_UNITS::INCHES ? EDA_UNITS::MILLIMETRES
: EDA_UNITS::INCHES );
: EDA_UNITS::INCHES );
unitsChangeRefresh();
wxCommandEvent e( UNITS_CHANGED );
@@ -609,7 +630,8 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
{
wxString msg;
msg.Printf( wxS( "grid %s" ), MessageTextFromValue( GetCanvas()->GetGAL()->GetGridSize().x, false ) );
msg.Printf( _( "grid %s" ), MessageTextFromValue( GetCanvas()->GetGAL()->GetGridSize().x,
false ) );
SetStatusText( msg, 4 );
}
@@ -736,21 +758,21 @@ void EDA_DRAW_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
void EDA_DRAW_FRAME::AppendMsgPanel( const wxString& aTextUpper, const wxString& aTextLower,
int aPadding )
{
if( m_messagePanel )
if( m_messagePanel && !m_isClosing )
m_messagePanel->AppendMessage( aTextUpper, aTextLower, aPadding );
}
void EDA_DRAW_FRAME::ClearMsgPanel()
{
if( m_messagePanel )
if( m_messagePanel && !m_isClosing )
m_messagePanel->EraseMsgBox();
}
void EDA_DRAW_FRAME::SetMsgPanel( const std::vector<MSG_PANEL_ITEM>& aList )
{
if( m_messagePanel )
if( m_messagePanel && !m_isClosing )
{
m_messagePanel->EraseMsgBox();
@@ -763,10 +785,9 @@ void EDA_DRAW_FRAME::SetMsgPanel( const std::vector<MSG_PANEL_ITEM>& aList )
void EDA_DRAW_FRAME::SetMsgPanel( const wxString& aTextUpper, const wxString& aTextLower,
int aPadding )
{
if( m_messagePanel )
if( m_messagePanel && !m_isClosing )
{
m_messagePanel->EraseMsgBox();
m_messagePanel->AppendMessage( aTextUpper, aTextLower, aPadding );
}
}
@@ -837,26 +858,15 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
// Not all classes derived from EDA_DRAW_FRAME can save the canvas type, because some
// have a fixed type, or do not have a option to set the canvas type (they inherit from
// a parent frame)
FRAME_T allowed_frames[] =
{
FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR,
FRAME_PCB_EDITOR, FRAME_FOOTPRINT_EDITOR,
FRAME_GERBER,
FRAME_PL_EDITOR
};
static std::vector<FRAME_T> s_allowedFrames =
{
FRAME_SCH, FRAME_SCH_SYMBOL_EDITOR,
FRAME_PCB_EDITOR, FRAME_FOOTPRINT_EDITOR,
FRAME_GERBER,
FRAME_PL_EDITOR
};
bool allow_save = false;
for( unsigned ii = 0; ii < arrayDim( allowed_frames ); ii++ )
{
if( m_ident == allowed_frames[ii] )
{
allow_save = true;
break;
}
}
if( !allow_save )
if( !alg::contains( s_allowedFrames, m_ident ) )
return false;
if( aCanvasType < EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE
@@ -866,9 +876,7 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
return false;
}
APP_SETTINGS_BASE* cfg = Kiface().KifaceSettings();
if( cfg )
if( APP_SETTINGS_BASE* cfg = Kiface().KifaceSettings() )
cfg->m_Graphics.canvas_type = static_cast<int>( aCanvasType );
return false;
@@ -878,7 +886,7 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
VECTOR2I EDA_DRAW_FRAME::GetNearestGridPosition( const VECTOR2I& aPosition ) const
{
const VECTOR2I& gridOrigin = GetGridOrigin();
VECTOR2D gridSize = GetCanvas()->GetGAL()->GetGridSize();
VECTOR2D gridSize = GetCanvas()->GetGAL()->GetGridSize();
double xOffset = fmod( gridOrigin.x, gridSize.x );
int x = KiROUND( (aPosition.x - xOffset) / gridSize.x );
@@ -892,7 +900,7 @@ VECTOR2I EDA_DRAW_FRAME::GetNearestGridPosition( const VECTOR2I& aPosition ) con
VECTOR2I EDA_DRAW_FRAME::GetNearestHalfGridPosition( const VECTOR2I& aPosition ) const
{
const VECTOR2I& gridOrigin = GetGridOrigin();
VECTOR2D gridSize = GetCanvas()->GetGAL()->GetGridSize() / 2.0;
VECTOR2D gridSize = GetCanvas()->GetGAL()->GetGridSize() / 2.0;
double xOffset = fmod( gridOrigin.x, gridSize.x );
int x = KiROUND( (aPosition.x - xOffset) / gridSize.x );
@@ -985,8 +993,8 @@ static const wxString productName = wxT( "KiCad E.D.A. " );
void PrintDrawingSheet( const RENDER_SETTINGS* aSettings, const PAGE_INFO& aPageInfo,
const wxString& aFullSheetName, const wxString& aFileName,
const TITLE_BLOCK& aTitleBlock,
const wxString& aSheetName, const wxString& aSheetPath,
const wxString& aFileName, const TITLE_BLOCK& aTitleBlock,
const std::map<wxString, wxString>* aProperties, int aSheetCount,
const wxString& aPageNumber, double aMils2Iu, const PROJECT* aProject,
const wxString& aSheetLayer, bool aIsFirstPage )
@@ -998,7 +1006,8 @@ void PrintDrawingSheet( const RENDER_SETTINGS* aSettings, const PAGE_INFO& aPage
drawList.SetPageNumber( aPageNumber );
drawList.SetSheetCount( aSheetCount );
drawList.SetFileName( aFileName );
drawList.SetSheetName( aFullSheetName );
drawList.SetSheetName( aSheetName );
drawList.SetSheetPath( aSheetPath );
drawList.SetSheetLayer( aSheetLayer );
drawList.SetProject( aProject );
drawList.SetIsFirstPage( aIsFirstPage );
@@ -1028,9 +1037,10 @@ void EDA_DRAW_FRAME::PrintDrawingSheet( const RENDER_SETTINGS* aSettings, BASE_S
DC->SetAxisOrientation( true, false );
}
::PrintDrawingSheet( aSettings, GetPageSettings(), GetScreenDesc(), aFilename, GetTitleBlock(),
aProperties, aScreen->GetPageCount(), aScreen->GetPageNumber(), aMils2Iu,
&Prj(), aSheetLayer, aScreen->GetVirtualPageNumber() == 1 );
::PrintDrawingSheet( aSettings, GetPageSettings(), GetScreenDesc(), GetFullScreenDesc(),
aFilename, GetTitleBlock(), aProperties, aScreen->GetPageCount(),
aScreen->GetPageNumber(), aMils2Iu, &Prj(), aSheetLayer,
aScreen->GetVirtualPageNumber() == 1 );
if( origin.y > 0 )
{
@@ -1047,6 +1057,13 @@ wxString EDA_DRAW_FRAME::GetScreenDesc() const
}
wxString EDA_DRAW_FRAME::GetFullScreenDesc() const
{
// Virtual function. Base class implementation returns an empty string.
return wxEmptyString;
}
bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
const wxString& wildcard, const wxString& ext,
bool isDirectory, bool aIsGlobal,
+19 -8
View File
@@ -114,6 +114,12 @@ wxString EDA_ITEM::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
}
bool isWordChar( const wxUniChar& c )
{
return wxIsalnum( c ) || c == '_';
}
bool EDA_ITEM::Matches( const wxString& aText, const EDA_SEARCH_DATA& aSearchData ) const
{
wxString text = aText;
@@ -129,6 +135,12 @@ bool EDA_ITEM::Matches( const wxString& aText, const EDA_SEARCH_DATA& aSearchDat
searchText.MakeUpper();
}
auto isWordChar =
[]( const wxUniChar& c )
{
return wxIsalnum( c ) || c == '_';
};
if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WHOLEWORD )
{
int ii = 0;
@@ -143,8 +155,8 @@ bool EDA_ITEM::Matches( const wxString& aText, const EDA_SEARCH_DATA& aSearchDat
ii = next;
next += searchText.length();
bool startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
bool endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
bool startOK = ( ii == 0 || !isWordChar( text.GetChar( ii - 1 ) ) );
bool endOK = ( next == (int) text.length() || !isWordChar( text.GetChar( next ) ) );
if( startOK && endOK )
return true;
@@ -201,8 +213,8 @@ bool EDA_ITEM::Replace( const EDA_SEARCH_DATA& aSearchData, wxString& aText )
if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WHOLEWORD )
{
startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
startOK = ( ii == 0 || !isWordChar( text.GetChar( ii - 1 ) ) );
endOK = ( next == (int) text.length() || !isWordChar( text.GetChar( next ) ) );
}
else
{
@@ -392,10 +404,9 @@ static struct EDA_ITEM_DESC
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
REGISTER_TYPE( EDA_ITEM );
auto typeProp = new PROPERTY_ENUM<EDA_ITEM, KICAD_T>( wxS( "Type" ),
NO_SETTER( EDA_ITEM, KICAD_T ), &EDA_ITEM::Type );
typeProp->SetIsInternal( true );
propMgr.AddProperty( typeProp );
propMgr.AddProperty( new PROPERTY_ENUM<EDA_ITEM, KICAD_T>( wxS( "Type" ),
NO_SETTER( EDA_ITEM, KICAD_T ), &EDA_ITEM::Type ) )
.SetIsHiddenFromPropertiesManager();
}
} _EDA_ITEM_DESC;
+24
View File
@@ -412,6 +412,30 @@ bool EDA_COMBINED_MATCHER::Find( const wxString& aTerm, int& aMatchersTriggered,
}
bool EDA_COMBINED_MATCHER::Find( const wxString& aTerm )
{
for( const std::unique_ptr<EDA_PATTERN_MATCH>& matcher : m_matchers )
{
if( matcher->Find( aTerm ).start >= 0 )
return true;
}
return false;
}
bool EDA_COMBINED_MATCHER::StartsWith( const wxString& aTerm )
{
for( const std::unique_ptr<EDA_PATTERN_MATCH>& matcher : m_matchers )
{
if( matcher->Find( aTerm ).start == 0 )
return true;
}
return false;
}
wxString const& EDA_COMBINED_MATCHER::GetPattern() const
{
return m_pattern;
+33 -8
View File
@@ -417,11 +417,11 @@ void EDA_SHAPE::RebuildBezierToSegmentsPointsList( int aMinSegLen )
// Ensure last point respects aMinSegLen parameter
if( m_bezierPoints.size() > 2 )
{
int idx = m_bezierPoints.size()-1;
int idx = m_bezierPoints.size() - 1;
if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx]-1 ).EuclideanNorm() < aMinSegLen )
if( VECTOR2I( m_bezierPoints[idx] - m_bezierPoints[idx] - 1 ).EuclideanNorm() < aMinSegLen )
{
m_bezierPoints[idx]-1 = m_bezierPoints[idx];
m_bezierPoints[idx - 1] = m_bezierPoints[idx];
m_bezierPoints.pop_back();
}
}
@@ -1687,21 +1687,36 @@ static struct EDA_SHAPE_DESC
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
REGISTER_TYPE( EDA_SHAPE );
auto isNotPolygon =
[]( INSPECTABLE* aItem ) -> bool
{
// Polygons, unlike other shapes, have no meaningful start or end coordinates
if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
return shape->GetShape() != SHAPE_T::POLY;
return false;
};
auto shape = new PROPERTY_ENUM<EDA_SHAPE, SHAPE_T>( _HKI( "Shape" ),
NO_SETTER( EDA_SHAPE, SHAPE_T ), &EDA_SHAPE::GetShape );
propMgr.AddProperty( shape );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Start X" ),
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ) );
ORIGIN_TRANSFORMS::ABS_X_COORD ) )
.SetAvailableFunc( isNotPolygon );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Start Y" ),
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ) );
ORIGIN_TRANSFORMS::ABS_Y_COORD ) )
.SetAvailableFunc( isNotPolygon );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "End X" ),
&EDA_SHAPE::SetEndX, &EDA_SHAPE::GetEndX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ) );
ORIGIN_TRANSFORMS::ABS_X_COORD ) )
.SetAvailableFunc( isNotPolygon );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "End Y" ),
&EDA_SHAPE::SetEndY, &EDA_SHAPE::GetEndY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ) );
ORIGIN_TRANSFORMS::ABS_Y_COORD ) )
.SetAvailableFunc( isNotPolygon );
// TODO: m_arcCenter, m_bezierC1, m_bezierC2, m_poly
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ) );
@@ -1721,7 +1736,17 @@ static struct EDA_SHAPE_DESC
filled->SetAvailableFunc(
[=]( INSPECTABLE* aItem ) -> bool
{
SHAPE_T itemShape = aItem->Get<SHAPE_T>( shape );
SHAPE_T itemShape;
try
{
itemShape = aItem->Get<SHAPE_T>( shape );
}
catch( std::runtime_error& err )
{
wxFAIL_MSG( err.what() );
return false;
}
switch( itemShape )
{
+74 -58
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2022 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004-2023 KiCad Developers, see change_log.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,6 +37,7 @@
#include <callback_gal.h>
#include <eda_text.h> // for EDA_TEXT, TEXT_EFFECTS, GR_TEXT_VJUSTIF...
#include <gal/color4d.h> // for COLOR4D, COLOR4D::BLACK
#include <font/glyph.h>
#include <gr_text.h>
#include <string_utils.h> // for UnescapeString
#include <math/util.h> // for KiROUND
@@ -90,6 +91,7 @@ GR_TEXT_V_ALIGN_T EDA_TEXT::MapVertJustify( int aVertJustify )
EDA_TEXT::EDA_TEXT( const EDA_IU_SCALE& aIuScale, const wxString& aText ) :
m_text( aText ),
m_IuScale( aIuScale ),
m_render_cache_font( nullptr ),
m_bounding_box_cache_valid( false ),
m_bounding_box_cache_line( -1 ),
m_bounding_box_cache_inverted( false )
@@ -110,15 +112,19 @@ EDA_TEXT::EDA_TEXT( const EDA_TEXT& aText ) :
m_attributes = aText.m_attributes;
m_pos = aText.m_pos;
m_render_cache_font = aText.m_render_cache_font;
m_render_cache_text = aText.m_render_cache_text;
m_render_cache_angle = aText.m_render_cache_angle;
m_render_cache_offset = aText.m_render_cache_offset;
m_render_cache.clear();
for( const std::unique_ptr<KIFONT::GLYPH>& glyph : aText.m_render_cache )
{
KIFONT::OUTLINE_GLYPH* outline_glyph = static_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() );
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( *outline_glyph ) );
if( KIFONT::OUTLINE_GLYPH* outline = dynamic_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() ) )
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( *outline ) );
else if( KIFONT::STROKE_GLYPH* stroke = dynamic_cast<KIFONT::STROKE_GLYPH*>( glyph.get() ) )
m_render_cache.emplace_back( std::make_unique<KIFONT::STROKE_GLYPH>( *stroke ) );
}
m_bounding_box_cache_valid = aText.m_bounding_box_cache_valid;
@@ -142,15 +148,19 @@ EDA_TEXT& EDA_TEXT::operator=( const EDA_TEXT& aText )
m_attributes = aText.m_attributes;
m_pos = aText.m_pos;
m_render_cache_font = aText.m_render_cache_font;
m_render_cache_text = aText.m_render_cache_text;
m_render_cache_angle = aText.m_render_cache_angle;
m_render_cache_offset = aText.m_render_cache_offset;
m_render_cache.clear();
for( const std::unique_ptr<KIFONT::GLYPH>& glyph : aText.m_render_cache )
{
KIFONT::OUTLINE_GLYPH* outline_glyph = static_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() );
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( *outline_glyph ) );
if( KIFONT::OUTLINE_GLYPH* outline = dynamic_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() ) )
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( *outline ) );
else if( KIFONT::STROKE_GLYPH* stroke = dynamic_cast<KIFONT::STROKE_GLYPH*>( glyph.get() ) )
m_render_cache.emplace_back( std::make_unique<KIFONT::STROKE_GLYPH>( *stroke ) );
}
m_bounding_box_cache_valid = aText.m_bounding_box_cache_valid;
@@ -388,10 +398,18 @@ void EDA_TEXT::SetTextY( int aY )
void EDA_TEXT::Offset( const VECTOR2I& aOffset )
{
if( aOffset.x == 0 && aOffset.y == 0 )
return;
m_pos += aOffset;
for( std::unique_ptr<KIFONT::GLYPH>& glyph : m_render_cache )
static_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() )->Move( aOffset );
{
if( KIFONT::OUTLINE_GLYPH* outline = dynamic_cast<KIFONT::OUTLINE_GLYPH*>( glyph.get() ) )
outline->Move( aOffset );
else if( KIFONT::STROKE_GLYPH* stroke = dynamic_cast<KIFONT::STROKE_GLYPH*>( glyph.get() ) )
glyph = stroke->Transform( { 1.0, 1.0 }, aOffset, 0, ANGLE_0, false, { 0, 0 } );
}
m_bounding_box_cache_valid = false;
}
@@ -451,23 +469,26 @@ std::vector<std::unique_ptr<KIFONT::GLYPH>>*
EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolvedText,
const VECTOR2I& aOffset ) const
{
if( getDrawFont()->IsOutline() )
if( aFont->IsOutline() )
{
EDA_ANGLE resolvedAngle = GetDrawRotation();
if( m_render_cache.empty()
|| m_render_cache_font != aFont
|| m_render_cache_text != forResolvedText
|| m_render_cache_angle != resolvedAngle
|| m_render_cache_offset != aOffset )
{
m_render_cache.clear();
KIFONT::OUTLINE_FONT* font = static_cast<KIFONT::OUTLINE_FONT*>( getDrawFont() );
TEXT_ATTRIBUTES attrs = GetAttributes();
const KIFONT::OUTLINE_FONT* font = static_cast<const KIFONT::OUTLINE_FONT*>( aFont );
TEXT_ATTRIBUTES attrs = GetAttributes();
attrs.m_Angle = resolvedAngle;
font->GetLinesAsGlyphs( &m_render_cache, GetShownText(), GetDrawPos() + aOffset, attrs );
font->GetLinesAsGlyphs( &m_render_cache, forResolvedText, GetDrawPos() + aOffset,
attrs );
m_render_cache_font = aFont;
m_render_cache_angle = resolvedAngle;
m_render_cache_text = forResolvedText;
m_render_cache_offset = aOffset;
@@ -514,7 +535,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
BOX2I bbox;
wxArrayString strings;
wxString text = GetShownText();
wxString text = GetShownText( true );
int thickness = GetEffectiveTextPenWidth();
if( IsMultilineAllowed() )
@@ -542,12 +563,16 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
// bounding box will be moved later according to the actual text options
wxSize textsize = wxSize( extents.x, extents.y );
VECTOR2I pos = drawPos;
int fudgeFactor = extents.y * 0.17;
if( font->IsStroke() )
textsize.y += fudgeFactor;
if( IsMultilineAllowed() && aLine > 0 && aLine < (int) strings.GetCount() )
pos.y -= KiROUND( aLine * font->GetInterline( fontSize.y ) );
if( text.Contains( wxT( "~{" ) ) )
overbarOffset = extents.y / 14;
overbarOffset = extents.y / 6;
if( aInvertY )
pos.y = -pos.y;
@@ -555,7 +580,7 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
bbox.SetOrigin( pos );
// for multiline texts and aLine < 0, merge all rectangles (aLine == -1 signals all lines)
if( IsMultilineAllowed() && aLine < 0 && strings.GetCount() )
if( IsMultilineAllowed() && aLine < 0 && strings.GetCount() > 1 )
{
for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
{
@@ -569,6 +594,8 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * font->GetInterline( fontSize.y ) );
}
textsize.y += overbarOffset;
bbox.SetSize( textsize );
/*
@@ -597,14 +624,16 @@ BOX2I EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
switch( GetVertJustify() )
{
case GR_TEXT_V_ALIGN_TOP:
bbox.Offset( 0, -fudgeFactor );
break;
case GR_TEXT_V_ALIGN_CENTER:
bbox.SetY( bbox.GetY() - ( bbox.GetHeight() + overbarOffset ) / 2 );
bbox.SetY( bbox.GetY() - bbox.GetHeight() / 2 );
break;
case GR_TEXT_V_ALIGN_BOTTOM:
bbox.SetY( bbox.GetY() - ( bbox.GetHeight() + overbarOffset ) );
bbox.SetY( bbox.GetY() - bbox.GetHeight() );
bbox.Offset( 0, fudgeFactor );
break;
}
@@ -652,7 +681,7 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
{
std::vector<VECTOR2I> positions;
wxArrayString strings;
wxStringSplit( GetShownText(), strings, '\n' );
wxStringSplit( GetShownText( true ), strings, '\n' );
positions.reserve( strings.Count() );
@@ -663,7 +692,8 @@ void EDA_TEXT::Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset,
}
else
{
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, GetShownText(), GetDrawPos() );
printOneLineOfText( aSettings, aOffset, aColor, aFillMode, GetShownText( true ),
GetDrawPos() );
}
}
@@ -851,18 +881,33 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( bool aTriangulate,
bool aUseTextRotation ) const
const BOX2I& aBBox,
const EDA_ANGLE& aAngle ) const
{
std::shared_ptr<SHAPE_COMPOUND> shape = std::make_shared<SHAPE_COMPOUND>();
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
KIFONT::FONT* font = getDrawFont();
int penWidth = GetEffectiveTextPenWidth();
wxString shownText( GetShownText( true ) );
VECTOR2I drawPos = GetDrawPos();
TEXT_ATTRIBUTES attrs = GetAttributes();
if( aUseTextRotation )
attrs.m_Angle = GetDrawRotation();
std::vector<std::unique_ptr<KIFONT::GLYPH>>* cache = nullptr;
if( aBBox.GetWidth() )
{
drawPos = aBBox.GetCenter();
attrs.m_Halign = GR_TEXT_H_ALIGN_CENTER;
attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER;
attrs.m_Angle = aAngle;
}
else
attrs.m_Angle = ANGLE_0;
{
attrs.m_Angle = GetDrawRotation();
if( font->IsOutline() )
cache = GetRenderCache( font, shownText, VECTOR2I() );
}
if( aTriangulate )
{
@@ -884,7 +929,10 @@ std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( bool aTriangula
shape->AddShape( triShape );
} );
font->Draw( &callback_gal, GetShownText(), GetDrawPos(), attrs );
if( cache )
callback_gal.DrawGlyphs( *cache );
else
font->Draw( &callback_gal, shownText, drawPos, attrs );
}
else
{
@@ -901,7 +949,10 @@ std::shared_ptr<SHAPE_COMPOUND> EDA_TEXT::GetEffectiveTextShape( bool aTriangula
shape->AddShape( aPoly.Clone() );
} );
font->Draw( &callback_gal, GetShownText(), GetDrawPos(), attrs );
if( cache )
callback_gal.DrawGlyphs( *cache );
else
font->Draw( &callback_gal, shownText, drawPos, attrs );
}
return shape;
@@ -942,41 +993,6 @@ int EDA_TEXT::Compare( const EDA_TEXT* aOther ) const
}
void EDA_TEXT::TransformBoundingBoxToPolygon( SHAPE_POLY_SET* aBuffer, int aClearance ) const
{
if( GetText().Length() == 0 )
return;
VECTOR2I corners[4]; // Buffer of polygon corners
BOX2I rect = GetTextBox();
// TrueType bounding boxes aren't guaranteed to include all descenders, diacriticals, etc.
// Since we use this for zone knockouts and DRC, we need something more accurate.
if( getDrawFont()->IsOutline() )
rect = GetEffectiveTextShape( false, false )->BBox();
rect.Inflate( aClearance );
corners[0].x = rect.GetOrigin().x;
corners[0].y = rect.GetOrigin().y;
corners[1].y = corners[0].y;
corners[1].x = rect.GetRight();
corners[2].x = corners[1].x;
corners[2].y = rect.GetBottom();
corners[3].y = corners[2].y;
corners[3].x = corners[0].x;
aBuffer->NewOutline();
for( VECTOR2I& corner : corners )
{
RotatePoint( corner, GetDrawPos(), GetDrawRotation() );
aBuffer->Append( corner.x, corner.y );
}
}
bool EDA_TEXT::ValidateHyperlink( const wxString& aURL )
{
if( aURL.IsEmpty() || IsGotoPageHref( aURL ) )
+4 -1
View File
@@ -65,7 +65,7 @@ int EDA_UNIT_UTILS::Mils2mm( double aVal )
}
void EDA_UNIT_UTILS::FetchUnitsFromString( const wxString& aTextValue, EDA_UNITS& aUnits )
bool EDA_UNIT_UTILS::FetchUnitsFromString( const wxString& aTextValue, EDA_UNITS& aUnits )
{
wxString buf( aTextValue.Strip( wxString::both ) );
unsigned brk_point = 0;
@@ -92,6 +92,9 @@ void EDA_UNIT_UTILS::FetchUnitsFromString( const wxString& aTextValue, EDA_UNITS
aUnits = EDA_UNITS::INCHES;
else if( unit == wxT( "de" ) || unit == wxT( "ra" ) ) // "deg" or "rad"
aUnits = EDA_UNITS::DEGREES;
else
return false;
return true;
}
+11 -3
View File
@@ -120,10 +120,18 @@ FUTURE_FORMAT_ERROR::FUTURE_FORMAT_ERROR( const PARSE_ERROR& aParseError,
const wxString& aRequiredVersion ) :
PARSE_ERROR()
{
init( aRequiredVersion );
if( const FUTURE_FORMAT_ERROR* ffe = dynamic_cast<const FUTURE_FORMAT_ERROR*>( &aParseError ) )
{
requiredVersion = ffe->requiredVersion;
problem = ffe->Problem();
}
else
{
init( aRequiredVersion );
if( !aParseError.Problem().IsEmpty() )
problem += wxS( "\n\n" ) + _( "Full error text:" ) + wxS( "\n" ) + aParseError.Problem();
if( !aParseError.Problem().IsEmpty() )
problem += wxS( "\n\n" ) + _( "Full error text:" ) + wxS( "\n" ) + aParseError.Problem();
}
lineNumber = aParseError.lineNumber;
byteIndex = aParseError.byteIndex;
-5
View File
@@ -253,11 +253,6 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName, const wxStri
// first attempt to use the name as specified:
wxString tname = aFileName;
#ifdef _WIN32
// translate from KiCad's internal UNIX-like path to MSWin paths
tname.Replace( wxT( "/" ), wxT( "\\" ) );
#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

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