Compare commits

...

994 Commits

Author SHA1 Message Date
Wayne Stambaugh 931a9697ca Tag stable version 8.0.5 release candidate 1. 2024-08-26 17:15:42 -04:00
Seth Hillbrand 5ffc58844f Update translations 2024-08-26 14:05:46 -07:00
Hanna Breisand 3ea2c6f1ff Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-08-26 23:03:53 +02:00
Balázs Meskó 2cba724659 Translated using Weblate (Hungarian)
Currently translated at 3.3% (312 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/hu/
2024-08-26 23:03:52 +02:00
Ulices 254260a616 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-08-26 23:03:52 +02:00
Pferd O 45b13d513b Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:52 +02:00
CloverGit ba86c3ac75 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
YÜKSEL AÇIKGÖZ 19d4c31fcc Translated using Weblate (Turkish)
Currently translated at 59.4% (5470 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:52 +02:00
CloverGit 160f69d720 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 4fa42960e9 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 9c4ca6da14 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
Jan Straka c113385016 Translated using Weblate (Czech)
Currently translated at 83.8% (7710 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-08-26 23:03:52 +02:00
Henrik Kauhanen 68e37a93ec Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-08-26 23:03:52 +02:00
109247019824 9b158e70f5 Translated using Weblate (Bulgarian)
Currently translated at 7.6% (704 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/bg/
2024-08-26 23:03:52 +02:00
Free_squire ab536192c3 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:52 +02:00
Tokita, Hiroshi bc87b0db60 Translated using Weblate (Japanese)
Currently translated at 99.4% (9140 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-08-26 23:03:52 +02:00
ivit VT 981f82db93 Translated using Weblate (Czech)
Currently translated at 82.9% (7624 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-08-26 23:03:52 +02:00
CloverGit b6f5aeba1e Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:52 +02:00
CloverGit 4fa34677ea Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:51 +02:00
Ulices c67346991f Translated using Weblate (Spanish (Mexico))
Currently translated at 99.6% (9165 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-08-26 23:03:51 +02:00
Laurens Holst 811de6a462 Translated using Weblate (Dutch)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-08-26 23:03:51 +02:00
YÜKSEL AÇIKGÖZ cfe7992723 Translated using Weblate (Turkish)
Currently translated at 59.3% (5456 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:51 +02:00
Pferd O 8c84f2ac23 Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
YÜKSEL AÇIKGÖZ fb23d62b6b Translated using Weblate (Turkish)
Currently translated at 58.5% (5383 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-08-26 23:03:51 +02:00
dsa-t 84f182ef03 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:51 +02:00
Ignas Brašiškis 987d151977 Translated using Weblate (Lithuanian)
Currently translated at 50.7% (4670 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/lt/
2024-08-26 23:03:51 +02:00
Toni Laiho c622da5fbf Translated using Weblate (Finnish)
Currently translated at 99.8% (9182 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-08-26 23:03:51 +02:00
Pferd O 19f163b724 Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
ZbeeGin 3fcf207443 Translated using Weblate (Polish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-08-26 23:03:51 +02:00
Pferd O 4814f29fbd Translated using Weblate (German)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
Alex Life 39f4ea5ffa Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-08-26 23:03:51 +02:00
tct123 5d08531ecb Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
Pferd O 4a0fdfd2ab Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-08-26 23:03:51 +02:00
CloverGit c88aab3a4f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-08-26 23:03:51 +02:00
Seth Hillbrand bf4aebff4d Update Altium importer to use textbox flag
Textboxes in Altium might have intrinsic borders that don't count in
their text width, so we need to buffer this in KiCad

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

(cherry picked from commit ecd27883b6)
2024-08-26 14:02:35 -07:00
Alex Shvartzkop 39627bfcfa Parse more Altium data related to Text6.
(cherry picked from commit 881d0184bb)
2024-08-26 13:22:23 -07:00
jean-pierre charras 55fafe3401 Fix incorrect flip for graphic segments.
For some obscure reason, the end points of segments were swapped.
Note graphic RECTANGLE shapes have still an issue when flipped, but this
is a very different issue.
From master branch
2024-08-26 19:50:39 +02:00
jean-pierre charras dd870deec5 RENDER_SETTINGS: try a slightly modified dot calculation. 2024-08-25 17:18:30 +02:00
jean-pierre charras 7ecf18ba80 EEschema, print: fix incorrect sheet order and uninitialized sheet number
The displayed sheet number was not updated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18594
2024-08-25 16:14:43 +02:00
jean-pierre charras 68e4ccf196 RENDER_SETTINGS: fix issue when using dotted lines.
At some levels, these lines (drawn as dots) were not visible.
They are now drawn as short lines.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16757
2024-08-24 20:48:02 +02:00
jean-pierre charras 0a28398944 Gerbview: fix arc to segment approximation when drawing Regions (polygons)
The approx was 36 segments per 360 deg. But this is not good for arcs having
a small arc angle and a large radius.
The fix uses a max error (currently 5 microns) to calculate the approximation.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18587
2024-08-23 10:47:55 +02:00
jean-pierre charras 27002f568b BOARD::GetBoardPolygonOutlines(): Protect against malformed NPTH pads
In some cases, when modifying a pad (SMD -> NPTH from properties panel, one
can generate a NPTH pad with a zero sized hole. Pcbnew can crash with such a pad,
especially if the 3D viewer is shown during modification.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18585
2024-08-22 11:12:47 +02:00
Maciej Suminski 9b5840b7ee Text variable resolving in footprint text boxes
Mostly a code copy from PCB_TEXT::GetShownText() to
PCB_TEXTBOX::GetShownText().

Cherry-picked 5ad5be09 (sans m_ResolveTextRecursionDepth advanced
config, not present in 8.0).
2024-08-17 00:08:14 +00:00
Mark Roszko 5a3f8b4235 Disconnect events in ~ACTION_TOOLBAR 2024-08-16 07:13:39 -04:00
Mark Roszko 7be78d50a4 Unbind events in KISTATUSBAR destructor 2024-08-16 07:04:40 -04:00
Mark Roszko b1f861137e Add missing unbinds to STD_BITMAP_BUTTON 2024-08-16 07:04:35 -04:00
Mark Roszko 3e3a958d4f Add missing unbind to PANEL_KICAD_LAUNCHER 2024-08-16 07:04:30 -04:00
Mark Roszko cc5a3eb61f Disconnect events used in EDA_BASE_FRAME 2024-08-16 07:03:16 -04:00
Mark Roszko eabf2f57aa Don't see horizontal layout on the vertical toolbar
Wild glitching on arm64 Windows revealed this was set, lol.
2024-08-16 07:02:53 -04:00
Mark Roszko 1667b1312e Unbind the char events in KICAD_MANAGER_FRAME destructor 2024-08-16 07:02:15 -04:00
Mark Roszko 1123a25f04 unbind/disconnect in PROJECT_TREE_PANE destructor 2024-08-15 22:26:28 -04:00
Mark Roszko ef757ffd28 Unbind BITMAP_BUTTON events during destruct 2024-08-15 22:26:02 -04:00
JamesJCode f63d018f1c PNS: Use correct diff pair width / gap settings when starting route
(cherry picked from commit 364f6d4213)
2024-08-15 19:52:03 +01:00
Wayne Stambaugh 83de056de9 Fix missing schematic symbol instance data.
This fix adds missing symbol instance data that defaults the instance
data to no annotation which will will trigger a annotation request on
any operations that require a fully annotated schematic.

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

(cherry picked from commit 0cf1110367)
2024-08-15 07:31:25 -04:00
JamesJCode 015906d862 PNS: Include net when querying DRC for initial track width
(cherry picked from commit 67b9170146)
2024-08-15 09:09:06 +01:00
Jan Wichmann c288c469fb pcbnew: The checkbox 'Center on footprint' was not disabled when the actionButton was changed. 2024-08-14 21:40:18 +00:00
JamesJCode 7a8efc1d27 Report track clearance constraint from DRC rule if >= board minimum
(cherry picked from 013fa4824b)
2024-08-14 22:11:35 +01:00
JamesJCode aaaa8a8835 Use correct track width constraint when starting PNS from footprint
(cherry picked from a6a62b1be5)
2024-08-14 22:07:09 +01:00
JamesJCode 2891c580b1 Correctly handle track clearance constraints in router
(cherry picked from 72a0c41e3d)
2024-08-14 21:48:46 +01:00
Seth Hillbrand 97d75ae844 Remove last cherry-pick
Already existed in 8 branch.
2024-08-14 13:41:03 -07:00
Seth Hillbrand 7ccc89196b Avoid losing the last point when simplifying
line chains that are not closed should avoid simplifying between
beginning and end points.  Make sure that we keep the finishing point
for these chains

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

(cherry picked from commit b71eb1186f)
(cherry picked from commit 6ed537753c)
2024-08-14 13:05:40 -07:00
JamesJCode 7774145a8f Update message panel when placing a via with interactive router
(cherry picked from commit 41ff744f1e)
2024-08-14 17:40:19 +01:00
Kacper Słomiński 0bf2d2ca32 Fix build issue with experimental GCC version 15.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18539

(cherry picked from commit e6bcc6d0a6)
2024-08-14 07:48:02 -04:00
jean-pierre charras 6338a69f17 Pcbnew: fix 2 issues after removing a track, especially ending on a teardrop
- Message panel display not always correctly updated (shows an old data)
- Incorrect updated ratsnest is some cases when removing a track ending on
a teardrop.

From master branch.
2024-08-14 08:27:22 +02:00
Jeff Young 5f8ba6f9a1 Revert commit not meant for 8.0. 2024-08-13 21:30:20 -06:00
Jeff Young a53bbd92f5 Don't presume CreatePin/RepeatPin() return something.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18540

(cherry picked from commit 7c4fe35589)
2024-08-13 21:13:07 -06:00
Jeff Young aa71423d5f Fix missing parameter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18530

(cherry picked from commit 8a487c2c86)
2024-08-13 21:11:23 -06:00
Jeff Young f3ae7afec2 Set sheetpath for ERCE_MISSING_UNIT errors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18445

(cherry picked from commit 22d37f6c34)
2024-08-13 21:11:15 -06:00
Mark Roszko 29194761e5 Update vcpkg-configuration.json 2024-08-13 23:49:44 +00:00
Jon Evans f56c05ac3e Fix broken cherry-pick 2024-08-12 23:06:56 -04:00
Jon Evans 15256b379c Ensure constraints when changing pad hole properties
Also expose hole shape to properties system

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

(cherry picked from commit c9af2f318f)
2024-08-12 23:06:09 -04:00
Jon Evans b4113decc5 Fixes for snapping in free via placer
Support snapping to graphics at all
Don't skip snapping to pads with no net
Treat placing vias as placing tracks for magnetic settings

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


(cherry picked from commit 960a9ef7d5)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-08-13 02:49:34 +00:00
aris-kimi b249932888 Fixes cherry-pick for 2 previous commits 2024-08-11 21:54:18 +00:00
Jeff Young 6b6057b194 Clean up more exception processing in simulation GUI.
This allows us to more correctly report errors without
dialog issues, logs popping up, etc.

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

7f6ab7043b from master
2024-08-11 21:54:18 +00:00
aris-kimi b9623e9359 Fixes a crash when ctrl+x a kicad var from the field
and leave as a starting char '/'

Also fixes a typo and updates the wxFormBuilder file

e59417aff3 from master
2024-08-11 21:54:18 +00:00
Wayne Stambaugh 735b05ba30 Add '?' to list of forbidden file name characters.
(cherry picked from commit aace2271df)
2024-08-11 07:19:35 -04:00
jean-pierre charras 62724f9cb6 pcbnew, PCB_IO_ALTIUM_DESIGNER: fix issues when converting a lib to kicad format.
- add the patch from RigoLigoRLC
- fix issue with illegal chars in filename the char * was missing in list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18452
2024-08-11 09:30:22 +02:00
Wayne Stambaugh 2e4dd4bc3f Fix CLI PCB drill export when output path does not end with path separator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14438

(cherry picked from commit b6734c42f0)
2024-08-07 16:18:25 -04:00
jean-pierre charras 87139ce571 3E viewer: fix incorrect custom pad shape in some cases.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18495
2024-08-06 13:50:25 +02:00
jean-pierre charras 582d2e7bdb PCB_IO_GEDA: fix broken function GetEnumeratedFootprint().
The code was old and not updated to actual io code.
Just removed to use the generic code.
From master branch
2024-08-05 20:21:11 +02:00
Jeff Young 5c89937870 Make target length sticky within a session.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18109

(cherry picked from commit 937854c577)
2024-08-01 14:38:43 +01:00
Jeff Young 412e244d48 Text is a single-click-place.
Also, don't run normal undo code when in the middle of
placing an item.

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

(cherry picked from commit f6c723ba37)
2024-08-01 14:38:38 +01:00
jean-pierre charras 0940565025 DIALOG_SIM_MODEL: fix a focus issue (missing aEvent.Skip()).
From master branch.
2024-07-31 16:45:02 +02:00
jean-pierre charras c5b2e859c1 DRC test: Fix missing filter of DRCE_OVERLAPPING_FOOTPRINTS test.
When the DRCE_OVERLAPPING_FOOTPRINTS tests were disabled, the markers were
still created, because the code that created them did not test if the
DRCE_OVERLAPPING_FOOTPRINTS drc test is enabled or not.
From master branch
2024-07-30 14:21:36 +02:00
jean-pierre charras e06a8131c5 pcbnew: fix a bug when pasting a footprint (after a copy command)
The paste code removed items managed by the footprint when they are not on
an enabled layer.
This is a bug: all items must be kept in the parent footprint.
This is the only one command that tried to remove such items.
Other commands (Ctrl+D, load Footprint and read netlist) do not delete any item

Frm master branch
2024-07-28 20:08:18 +02:00
jean-pierre charras 16dee8608b DIALOG_FOOTPRINT_CHOOSER: fix some min sizes to avoid not visible widgets.
From master branch
2024-07-28 12:31:49 +02:00
Jeff Young 396e531e7c Cleanup. 2024-07-23 11:36:56 +01:00
Jeff Young 24c234fd93 Don't attempt to rename field more than once.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18330

(cherry picked from commit e9d376c912)
2024-07-23 11:36:56 +01:00
Jeff Young fdbe35e20c Give padstack warning violation a name.
Also regularises capitalisation & parens in some error
messages.

Also de-duplicates hole testing for PTH pads, and SMD
rationality testing.

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

(cherry picked from commit 8b948e7b9c)
2024-07-23 11:36:56 +01:00
Jeff Young cc3e3ee34c Clear fields when flag is set.
Also make sure we set aUpdated when deleting extra
text items or fields, and when updating fabrication
attributes or 3D models.

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

(cherry picked from commit dab3972165)
2024-07-23 11:36:56 +01:00
Jeff Young d0da1725ca Allow deleting text item out of parent footprint in PCB editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18425

(cherry picked from commit 87ee56b582)
2024-07-23 11:36:56 +01:00
Alex Shvartzkop 7e115249af Hide notification panel on focus loss.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17295
2024-07-22 13:33:08 +03:00
Jeff Young 07e8edfcdf Remove asserts for valid states.
(A pin won't have a connection until after the connection
graph has been rebuilt.)

KICAD-6S1

(cherry picked from commit c378e6f690)
2024-07-21 21:01:14 +01:00
Jeff Young cbb2c187bd Fix scoping of lock.
(cherry picked from commit d5c7ac5065)
2024-07-21 21:01:14 +01:00
Alex Shvartzkop 011018b002 Improve alignment of KiCad 16/24/32 px icons.
(cherry picked from commit 5b2ea411f8)
2024-07-21 21:29:42 +03:00
Alex Shvartzkop d3a44607e6 Generate hidpi variants for mid size (_24) application icons.
(cherry picked from commit 0e66adbca1)
2024-07-21 21:29:42 +03:00
Jeff Young 1ad3532740 Ooops. That commit wasn't for 8.0 (as the var doesn't exist there). 2024-07-21 13:40:14 +01:00
Jeff Young 26caad8b35 Tidy up string find API usages.
(cherry picked from commit bab97f91cc)
2024-07-21 13:40:14 +01:00
Alex Shvartzkop f1da2e90d7 Fix EasyEDA/JLCEDA Pro 2.2 footprint/symbol library import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18250

(cherry picked from commit 1613816e77)
2024-07-21 15:38:57 +03:00
Alex Shvartzkop 59492bd947 Add mutex include.
(cherry picked from commit cc96de29e6)
2024-07-21 15:26:58 +03:00
Jeff Young 7b96cc3d0c Hand-cherry-pick some fixes from master. 2024-07-21 13:22:01 +01:00
Jeff Young df873158bc Slight increase to round-off error tolerance.
(It's now 2nm, which is still significantly below the
clearance DRC epsilon of 500nm.  It's also what we
already use in EDA_SHAPE.)

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

(cherry picked from commit c8e8545e47)
2024-07-21 13:22:01 +01:00
Jeff Young f88e1aa279 Fix uninitialized variable.
(cherry picked from commit 1833330e5c)
2024-07-21 13:22:01 +01:00
Alex Shvartzkop a02f12c68a std::set::contains is C++20-only, use find instead. 2024-07-21 15:18:44 +03:00
Alex Shvartzkop cc141e346d Tweak GRID_CELL_STC_EDITOR offset on GTK.
(cherry picked from commit ab531a33d9)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop f5954b0d7d Fix some warnings.
(cherry picked from commit affcfed677)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop 6bb1e59e10 Improve grid cell editors appearance.
(cherry picked from commit 76b7cdd128)
2024-07-21 15:18:44 +03:00
Alex Shvartzkop ced6b1cbb7 Improve custom grid cell editors' margins on MSW.
(cherry picked from commit 1516aaf163)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop d1d7d0eb05 Remove macOS size tweak in custom grid cell editors.
Since the text field now has the no-border flag, it shouldn't be needed.

(cherry picked from commit aa51cc5167)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop e1e196f1b1 Fix default cell alignment and FBP file for Configure Paths dialog.
(cherry picked from commit 49dcd5f4fc)
2024-07-21 13:44:15 +03:00
Alex Shvartzkop b55d760cd5 Make grid cell editors with extra button consistent with normal text cell editors.
(cherry picked from commit 5d22c1adee)
2024-07-21 13:40:21 +03:00
Alex Shvartzkop b0a0408528 Create STATUS_TEXT_POPUP on demand when moving PCB items.
So we don't have to spend 115 ms destroying it.

(cherry picked from commit 8d7c60eb3e)
2024-07-21 13:31:45 +03:00
Alex Shvartzkop d238a149a6 Send data to correct sch port when changing selection in PCB editor.
Not that cross-probing works like this though.
But this prevents the UpdateAllLayersColor call.
(-356 ms in https://gitlab.com/kicad/code/kicad/-/issues/18148)

(cherry picked from commit e2b5f4559e)
2024-07-21 13:31:03 +03:00
Alex Shvartzkop 57d2f7209a Use std::set::contains instead of alg::contains in UpdateTeardrops.
(-356 ms on https://gitlab.com/kicad/code/kicad/-/issues/18148 when placing)

(cherry picked from commit 70296107b4)
2024-07-21 13:30:39 +03:00
Alex Shvartzkop 8d08992c24 Shut down curl operations before global cleanup.
Fixes KICAD-7DP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17103

(cherry picked from commit 0a53fc41a7)
2024-07-21 13:28:31 +03:00
Alex Shvartzkop 9938e7f723 Don't limit ngspice netlist lines to 1024 bytes.
Otherwise the loop just makes infinite 1-byte allocations
and keeps appending \n.

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

(cherry picked from commit a1b4e09cec)
2024-07-21 13:27:53 +03:00
Alex Shvartzkop 17ad578675 QA: add another test case for SHAPE_LINE_CHAIN::Slice.
This causes it to break on MSVC Release as well.

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

(cherry picked from commit 0e4ed5a032)
2024-07-21 13:25:57 +03:00
Alex Shvartzkop 044dd59c5c QA: add two more tests for SHAPE_LINE_CHAIN::Slice.
"Case 9: Start at middle of a 2nd arc, finish at end" should throw a fatal assert in Debug.

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

(cherry picked from commit 0b06ed987e)
2024-07-21 13:25:57 +03:00
Alex Shvartzkop 6ef90cfa18 Add bounds checking when slicing SHAPE_LINE_CHAIN from the middle of the last arc.
(and said arc is the last shape in the chain)

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

(cherry picked from commit 63eac0382c)
2024-07-21 13:24:17 +03:00
Jeff Young 7abf4c2d91 Save visible columns to correct settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18352

(cherry picked from commit 22321c93f0)
2024-07-21 11:16:57 +01:00
Jeff Young 896ff72019 Formatting.
(cherry picked from commit 8ae111bd82)
2024-07-21 11:16:57 +01:00
jean-pierre charras 9c2eeb54fc Ensure non handled text properties are never written in .kicad_pcb files
ctl_flags.h: fix two duplicate flag values.
From master branch
2024-07-21 08:46:44 +02:00
jean-pierre charras 69f583660f Move all CTL_OMIT_xxx flags definitions into a new file ctl_flags.h
Previously, they were defined in different files, and sometimes redefined.
This change should not create an actual code change.
However, this move shows there are the same value used for different flags,
so another fix should be made later.

From master branch
2024-07-21 08:46:44 +02:00
Mark Roszko 6334c733e1 Update 2 files
- /vcpkg-configuration.json
- /vcpkg.json
2024-07-21 01:19:06 +00:00
Mathieu Pilato a50144f889 Fix measurement format not saved when modified
Always update stored measurements name / format when updating measurement

(cherry picked from commit c8aa3f21aa)
2024-07-20 21:52:05 +01:00
Mathieu Pilato 1ed85d521d Move default format inside SPICE_VALUE_FORMAT
This ensures that the default format is the same, however the measurements are added

(cherry picked from commit 75141da53a)
2024-07-20 21:52:01 +01:00
Mathieu Pilato 793790b359 Fix spice errors when rerunning a simulation with measurements
Mark the simulation as not finished before starting it, preventing measurements from being requested
from spice right before simulation starts

(cherry picked from commit a5b7c65d7a)
2024-07-20 21:51:58 +01:00
Mathieu Pilato 154112d4cc Clear measurement grid while changing tab
Prevent a tab change while editing measurement from impacting measurements of target tab

(cherry picked from commit 98b4a58059)
2024-07-20 21:51:54 +01:00
Mathieu Pilato 97d8ddeb4f Fix measurements not being loaded with workbook
onPlotChanging() was overwriting loaded measurements. Do not read grid from onPlotChanging().

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

(cherry picked from commit c6e8838178)
2024-07-20 21:51:51 +01:00
Mathieu Pilato 4809b00206 Increase default measurement precision to 3 digits
(cherry picked from commit 414ac2b83c)
2024-07-20 21:51:47 +01:00
Jeff Young 5bc1040a8b Fix missing From_UTF8().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18406

(cherry picked from commit 756445dd19)
2024-07-20 21:26:52 +01:00
Jeff Young f6c8dbe81e Fix RecombinePad when pad is rotated.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18348

(cherry picked from commit 556efd836b)
2024-07-20 21:26:52 +01:00
Jeff Young 0280989920 Undo for Repeat Pin.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18261

(cherry picked from commit 0b4d0bcb6c)
2024-07-20 21:26:52 +01:00
Jeff Young 0b762fb804 Show footprint change/update immediately.
Also, don't deselect selected footprints.

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

(cherry picked from commit e450258c0f)
2024-07-20 21:26:52 +01:00
Seth Hillbrand b71eb1186f Avoid losing the last point when simplifying
line chains that are not closed should avoid simplifying between
beginning and end points.  Make sure that we keep the finishing point
for these chains

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18409
2024-07-20 13:02:01 -07:00
Seth Hillbrand c78273cb99 Avoid throwing spurious substitution warnings
If the original font is a bold singleton (not a mod on a face), then we
need to avoid the mismatch between the bold marker and the asked-for
boldness.

At the end, if the font name is the same within case differences, then
it is the same font and we should not warn

(cherry picked from commit 0f84ddaf39)
2024-07-20 11:41:44 -07:00
Seth Hillbrand 26b8978b3e Fix potentially incorrect libid when using save as
If you use save as into a different library and change the symbol name
while overwriting an existing symbol, the libid didn't get updated,
leading to an error message when trying to load the newly saved symbol.

(cherry picked from commit b38357a5ea)
2024-07-20 11:41:44 -07:00
Jon Evans 618bbfda8d Support SWIG 4.1
(cherry picked from commit 58a2159fa9)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-07-19 22:49:52 +00:00
JamesJCode ee573a1480 Remove unnecessary erase of netclasses from netclass map
We start from an empty map now, so no need to delete entries
individually

(Cherry-picked from 90304e0639)
2024-07-16 20:37:22 +01:00
JamesJCode 20efc3b6e6 Resolve netclasses on vector buses embedded in buses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16545

(Cherry-picked from 924b027503)
2024-07-16 19:57:54 +01:00
JamesJCode 8632e74c5c Update BOARD_LISTENERs after calculating connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18277
(For v8)
2024-07-16 19:57:54 +01:00
Wayne Stambaugh 6f35fd7058 Begin version 8.0.5 development. 2024-07-16 14:42:07 -04:00
Wayne Stambaugh 761bfcd291 Tag stable version 8.0.4. 2024-07-16 14:39:53 -04:00
Seth Hillbrand 7663928a66 Update translations 2024-07-16 11:00:39 -07:00
boromyr dd3c846f4a Translated using Weblate (Italian)
Currently translated at 99.9% (9191 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-16 20:00:06 +02:00
CloverGit 6877bc32bc Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
Jan Straka 64564825c7 Translated using Weblate (Czech)
Currently translated at 82.8% (7616 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-07-16 20:00:06 +02:00
CloverGit b1ec1011b6 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
Toni Laiho 80539790c3 Translated using Weblate (Finnish)
Currently translated at 99.8% (9181 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-16 20:00:06 +02:00
CloverGit 981772887a Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-16 20:00:06 +02:00
dsa-t 896b80652f Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-16 20:00:06 +02:00
Wellington Terumi Uemura 968cf4267a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-07-16 20:00:06 +02:00
jean-pierre charras f3567cda99 Pcbnew, Properties panel: mask 2 properties irrelevant for pcb fields.
Color and Hyperlink properties have no meaning for pcb fields, but if set
created unreadable .kicad_pcb files.

From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18368
2024-07-14 14:06:29 +02:00
Seth Hillbrand df372baff8 Update translations 2024-07-11 09:41:19 -07:00
dsa-t dec96e6a77 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
alevtina-karashokova 8a1de8c6f8 Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
dsa-t 255975f5fd Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-10 23:46:07 +02:00
Toni Laiho aa608ca147 Translated using Weblate (Finnish)
Currently translated at 99.8% (9181 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-10 23:46:07 +02:00
Seth Hillbrand 682b74f7d2 Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-10 23:46:06 +02:00
JamesJCode d662b2c34b Fix tuning pattern moves and undo / redo
(Cherry-picked from 230c297691)
2024-07-09 15:23:02 +01:00
Seth Hillbrand 7740c66479 Update translations 2024-07-08 09:55:01 -07:00
Seth Hillbrand 4d4f6a810c Properly count multiple Altium version settings
There is a fair amount of gradation in different Altium products

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

(cherry picked from commit 6aaaaad37f)
2024-07-08 09:54:46 -07:00
alevtina-karashokova d74dca3a7a Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:38 +02:00
Wellington Terumi Uemura 6513ca9168 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-07-08 18:53:37 +02:00
aris-kimi 6782bb73bd Translated using Weblate (Greek)
Currently translated at 99.8% (9177 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-07-08 18:53:37 +02:00
CloverGit 9c35689b04 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-08 18:53:37 +02:00
Ulices 8aff7cad17 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9154 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-07-08 18:53:37 +02:00
Henrik Kauhanen c2c6cad525 Translated using Weblate (Swedish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-07-08 18:53:37 +02:00
alevtina-karashokova 9b17ec5d2d Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:37 +02:00
CloverGit e971f90adc Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9158 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-07-08 18:53:37 +02:00
ZbeeGin 06c61a4831 Translated using Weblate (Polish)
Currently translated at 99.9% (9192 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-07-08 18:53:37 +02:00
Laurens Holst 7977f0f745 Translated using Weblate (Dutch)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-07-08 18:53:37 +02:00
Seth Hillbrand 38a2b8eba7 Translated using Weblate (German)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-08 18:53:37 +02:00
Marco Ciampa 951f0065ed Translated using Weblate (Italian)
Currently translated at 99.9% (9191 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-08 18:53:37 +02:00
Bahtiyar Bayram 22c06c7ed8 Translated using Weblate (Turkish)
Currently translated at 57.3% (5269 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-07-08 18:53:37 +02:00
dsa-t 4f086271aa Translated using Weblate (Russian)
Currently translated at 100.0% (9194 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-08 18:53:37 +02:00
ZbeeGin 297999cb43 Translated using Weblate (Polish)
Currently translated at 99.6% (9159 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-07-08 18:53:37 +02:00
Arnau Llovet Vidal 91aec9ac7f Translated using Weblate (Catalan)
Currently translated at 47.3% (4354 of 9194 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ca/
2024-07-08 18:53:37 +02:00
jean-pierre charras 9105b380c3 Fix compil issue created by my commit b2f8a43c (Windows only) 2024-07-07 15:39:42 +02:00
jean-pierre charras a285f86240 French translation update 2024-07-07 13:23:25 +02:00
jean-pierre charras b2f8a43c24 DIALOG_USER_DEFINED_SIGNALS: workaround to solve an issue on Windows.
See: https://gitlab.com/kicad/code/kicad/-/issues/15837
This is not a fix, but a workaround to make this dialog usable on Windows.
Without this workaround, it is barely possible to edit a user signal name.
The root cause needs to be fixed.
From master branch
2024-07-07 13:22:33 +02:00
Wayne Stambaugh 8383165269 Tag stable version 8.0.4 release candidate 2. 2024-07-01 16:20:03 -04:00
Seth Hillbrand bc8af77aba Fix docs redirect for v8 2024-07-01 12:57:57 -07:00
Seth Hillbrand 7d0e1670ee Update translations 2024-07-01 10:55:23 -07:00
jean-pierre charras 877f7daa2b do not flag an empty string as translatable.
(cherry picked from commit 1c9e96c89a)
2024-07-01 10:55:09 -07:00
Seth Hillbrand 4c563e5ef3 Update translations 2024-07-01 10:53:10 -07:00
Seth Hillbrand d6d6075a60 Translated using Weblate (Italian)
Currently translated at 99.9% (9190 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/it/
2024-07-01 19:21:15 +02:00
Pferd O 49c528f3ef Translated using Weblate (German)
Currently translated at 99.6% (9158 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-07-01 19:21:15 +02:00
Henrik Kauhanen ae1bccfb85 Translated using Weblate (Swedish)
Currently translated at 99.9% (9191 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-07-01 19:21:15 +02:00
dsa-t c2c13a5226 Translated using Weblate (Russian)
Currently translated at 100.0% (9193 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-07-01 19:21:15 +02:00
Toni Laiho 5b2e0d113a Translated using Weblate (Finnish)
Currently translated at 99.8% (9177 of 9193 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-07-01 19:21:15 +02:00
dsa-t 7ee8f786f2 Don't try to clear empty bitmap cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18310


(cherry picked from commit e5a5b59ac1)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-07-01 15:23:55 +00:00
Alex Shvartzkop bd14224b42 QA: remove 8.99 files for issue17967. 2024-07-01 14:47:38 +03:00
Seth Hillbrand ccfec170b0 Modify some int32 ops to avoid potential overflow
(cherry picked from commit f48a105357)
2024-07-01 14:30:43 +03:00
Seth Hillbrand 9852b535e7 Fix nl.po from bad merge 2024-06-30 11:16:44 -07:00
jean-pierre charras 758ac90069 SIMULATOR_FRAME_UI: catch all nlohmann::json::xxx errors.
Previously, only nlohmann::json::type_error was captured, and other errors
were not handled, creating unhandled exception issue when reading broken
*.wks files.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18309
2024-06-30 18:51:31 +02:00
Alex Shvartzkop 697ff382f8 Fix edit point ordering for arcs in symbol editor.
Was fixed for SCH_SHAPE in f6994702aa
but 8.0 uses LIB_SHAPE for symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18307
2024-06-30 18:07:53 +03:00
jean-pierre charras 6b6aa84158 French translation update 2024-06-30 09:06:42 +02:00
Marco Ciampa a0d219c2d1 Updated Italian translation 2024-06-30 01:11:36 +02:00
Seth Hillbrand 8af1af7f76 Update translations 2024-06-29 12:41:36 -07:00
Jan Straka 991d5812e2 Translated using Weblate (Czech)
Currently translated at 82.8% (7605 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:37:14 -07:00
김랑기 b019ce4515 Translated using Weblate (Korean)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:14 -07:00
김랑기 168a1b3e75 Translated using Weblate (Korean)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:13 -07:00
김랑기 e8a6e579e4 Translated using Weblate (Korean)
Currently translated at 99.9% (9174 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-06-29 12:37:12 -07:00
aris-kimi f2b1422ed5 Translated using Weblate (Greek)
Currently translated at 99.9% (9176 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-06-29 12:37:00 -07:00
Jan Straka 63f4d45665 Translated using Weblate (Czech)
Currently translated at 82.1% (7543 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
ivit VT 96ab1e47c9 Translated using Weblate (Czech)
Currently translated at 81.5% (7490 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
ivit VT 4d69d966ee Translated using Weblate (Czech)
Currently translated at 81.4% (7481 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:36:51 -07:00
pominglee e9294bee9e Translated using Weblate (Chinese (Traditional))
Currently translated at 99.7% (9162 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-06-29 12:36:49 -07:00
CloverGit d2b052b12c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-06-29 12:36:37 -07:00
Pferd O 34f0a97cca Translated using Weblate (German)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-29 12:35:33 -07:00
Laurens Holst ad5ca38cc2 Translated using Weblate (Dutch)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-06-29 12:35:06 -07:00
Nguyễn Ngọc Khánh 58bd7f3b24 Translated using Weblate (Vietnamese)
Currently translated at 21.7% (2000 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-29 12:34:38 -07:00
Jan Straka 5b2b4832d4 Translated using Weblate (Czech)
Currently translated at 81.1% (7452 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-29 12:34:36 -07:00
Nguyen Van Dien a3618cbfeb Translated using Weblate (Vietnamese)
Currently translated at 21.7% (1994 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-29 12:34:10 -07:00
Seth Hillbrand 8c6edc0414 Fix via layer test for DXF plotting
Vias might have their primary layer set to a single layer but cross
multiple layers that should be included when plotting

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

(cherry picked from commit 64c36e8bda)
2024-06-29 12:25:15 -07:00
Seth Hillbrand 1308fd7c4a Altium import
- Handle intermediate Altium version with some fields but not others
- Ensure that we are properly moving text that is not a box and not a
  field

(cherry picked from commit 9aba808366)
2024-06-29 12:19:25 -07:00
Seth Hillbrand b241e09914 Don't knock out anti-text box
Knockout text should only prevent filling directly around the text
itself, not the larger anti-text fill around it.  This prevents minimum
width provisions from kicking in unneccesarily

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

(cherry picked from commit a12bc3a410)
2024-06-29 12:18:54 -07:00
Seth Hillbrand 0a29c0dea3 Fixup Altium import rectangle handling
Ensure we have positive sizes
Keep rectangles when rotating by multiples of 90

(cherry picked from commit d033f93d89)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 8832b22952 Fixup for Altium pad/fill importer
The previous commit merged pads with copper areas.  This was appealing
but broke when the pad and the area were meant to have different
size/shape technical layers.  Small pads = Small paste.  Instead, we do
not merge the pads but we assign them to have the appropriate nets in
KiCad, allowing the same effective result but keeping the technical
layers correct

(cherry picked from commit 51eb7aa5b5)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 33b93a3824 Altium import: handle polygons on copper
In Altium, copper polys will be connected automatically to their
associated pads.  In KiCad, we need to do the equivalent when parsing,
which is to combine the joining copper into the underlying pad.  We also
don't want to treat copper polys as proxy pads without the original
anymore.

(cherry picked from commit 7102d9f72a)
2024-06-29 12:17:53 -07:00
Seth Hillbrand b589da63d8 Cleanup Altium text import
Handle inverted text
Correct location for flags
Add mechanics to detect inverted_rect (like text boxes)

(cherry picked from commit b11e030f8f)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 48077d77c4 Altium: Handle textboxes
Also, corrects a minor issue with the text width calculation where
Altium calculates centerline to centerline but KiCad text heights are to
the edge of the stroke font.  Need to still do better adjustments for
the various altium stroke fonts

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

(cherry picked from commit 7e561acf53)
2024-06-29 12:17:53 -07:00
Alex Shvartzkop a605c4b6ff Disable hidpi cursors on GTK and OSX.
wxCursor scale factors won't be supported before wx 3.3.
MSW doesn't scale cursors, so it works as expected there.

(cherry picked from commit e3e63fb1b8)
2024-06-29 21:43:47 +03:00
Seth Hillbrand 092ce30b40 Altium: Handle footprint vias
These are treated as pads in KiCad

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

(cherry picked from commit 7ea013b96c)
2024-06-29 11:38:36 -07:00
Seth Hillbrand 28eb6dab97 Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

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

(cherry picked from commit 5f16c5892c)
2024-06-29 11:26:03 -07:00
Seth Hillbrand fb82130530 Fixup cherry-picks for v8 2024-06-29 11:22:11 -07:00
Seth Hillbrand a3d218ffbc Fixup arc check in dp coupled
Handle arcs starting at candidate end point.
Fix total arc size

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

(cherry picked from commit 015b93b474)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 471f72a340 Handle arcs dp coupling
Calculate coupled arcs and spacing

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

(cherry picked from commit 75ab3d9e8b)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 2abbc601a0 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

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

(cherry picked from commit ab0426d620)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 522f1c7bea Ensure nets are referenced to main board
We set new elements to the temporary board's netlist.  These need to be
updated when moving the fooprint to the main board

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

(cherry picked from commit 54efd32f7a)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 828f32649f Hookup footprint reload to redraw icon
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7195

(cherry picked from commit 6537f9fa15)
2024-06-29 11:22:11 -07:00
Seth Hillbrand b39b54a92e Fallback to scientific notation when fixed-point is long
Fixed point output can create arbitrarily long string representations of
floating points.  When this happens, we would like to just represent the
scientific notation to a limited precision

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

(cherry picked from commit 24f02e72d0)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 6a55a47276 Subtract all holes in board area calc
When we say "Subtract holes from board area", we should also subtract
those holes in pads and vias

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

(cherry picked from commit 91f6c534b9)
2024-06-29 11:22:11 -07:00
Wayne Stambaugh 648d463b32 Tag stable version 8.0.4 release candidate 1. 2024-06-29 11:58:56 -04:00
Seth Hillbrand 489f345fb2 ADDED: Handle PIECHART in Altium import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16895

(cherry picked from commit 5bd94f118d)
2024-06-29 08:05:04 -07:00
Seth Hillbrand e308d65108 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

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

(cherry picked from commit 416033e8e5)
2024-06-29 08:02:57 -07:00
Seth Hillbrand ee0be76fb4 Don't list IPC-2581 import
We don't currently support importing 2581 files.  We need to clear
IO_FILE_DESC to prevent this from accidentally showing

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

(cherry picked from commit eeee63186d)
2024-06-29 08:02:27 -07:00
Seth Hillbrand 813fce2d2d Fully expand all text variables in 3d output
We were doing half of the job but we need to get the board variables as
well

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

(cherry picked from commit 79166510e9)
2024-06-29 08:01:33 -07:00
Frank Muenstermann e0a27b430a kicad-cli: The --precision parameter was not recognized, if unit was inch, the export crashed
(Cherry-picked from 63d828d5ff)
2024-06-29 03:43:06 +01:00
Ian McInerney 73b2180c06 Take footprint edge cuts into account in the board statistics
Reported in https://gitlab.com/kicad/code/kicad/-/issues/18245

(Cherry-picked from 10988478da)
2024-06-29 03:27:42 +01:00
Ian McInerney b3f53ac862 Always include footprint edgecuts in board edge bounding box
The footprint edgecuts should always be part of the board edge bounding
box, even if the layer the footprint is on is hidden from view.

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

(Cherry-picked from 672d2c6af8)
2024-06-29 03:27:14 +01:00
Ian McInerney 9b49fc5a0d Display unit name in symbol context menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18285

(Cherry-picked from cc81ccf79a)
2024-06-29 02:16:26 +01:00
Jeff Young 03c71b22d5 Improve consistency of clearance line painting.
Showing the clearance area is not obvious as the clearance
extends from the pad on flashed copper layers and from the
hole on non-flashed copper layers.  Because of this, we
choose to not display clearance lines at all on non-copper
active layers as it's not clear which we'd be displaying.

We follow the same rule for tracks for consistency (even
though they don't have the same issue).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18287
2024-06-28 21:46:49 +01:00
Jeff Young 7d79bebcc6 Don't overload error dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18195

(cherry picked from commit 441da8dfb6)
2024-06-28 20:59:29 +01:00
Jeff Young 5c2300022b Don't flip alignment of non-side-specific text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18235

(cherry picked from commit 0040c290ed)
2024-06-28 20:58:47 +01:00
jean-pierre charras 91b042990f footprint selector in symbol properties: fix footprint selection issue.
When using the button to select a footprint using the footprint chooser
dialog, the new footprint was not always taken in account (perhaps MSW specific).
It was due to the code to update the footprint name was between Disable() and
Enable, thus creating a loss of some events in the complex grid edition stuff.
This is now replaced by a lock flag to protect this code to be executed when
it should not.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18270
2024-06-27 20:07:38 +02:00
Jeff Young 265e2d61be Clear timestamp when clearing cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913

(cherry picked from commit 5a9b681009)
2024-06-25 13:56:33 +01:00
Jeff Young df3924421d enclosedByArea test for zone needs to be outline-based.
(Otherwise it's order-specific when filling, which
is pretty unpredictable.)

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

(cherry picked from commit 5ba2896968)
2024-06-25 13:55:51 +01:00
Jeff Young 4ee2a007eb Hidden footprint libraries are not yet supported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18183

(cherry picked from commit b7161181e8)
2024-06-25 13:54:56 +01:00
Jeff Young b19a47fa2a Performance for large hierarchies: ERC
Share constructs between ERC tests.

Large SCH_SHEET_LISTs, in particular, can be very
expensive to construct.

(cherry picked from commit 68fbe98b1d)
2024-06-25 13:34:49 +01:00
jean-pierre charras 7f3ca3b889 Gerber plots: Ensure reserved chars are not used in Gerber field strings.
In gerber fields, reserved chars (,*%) must be replaced, because they are separators.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18275
2024-06-25 11:26:03 +02:00
Seth Hillbrand a3d64d604c Silence font replace warnings for libs
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive

(cherry picked from commit 11c6164934)
2024-06-24 12:01:30 -07:00
Alex Shvartzkop 006f0a95c1 Optimize testCourtyardClearances when moving footprints (33%->0.69%)
Check bounding boxes without hidden text first before trying to check courtyards.

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

(cherry picked from commit 4bf8ed32cd)
2024-06-24 06:44:28 +03:00
Alex Shvartzkop 6afd865259 Optimize testCourtyardClearances when moving a board.
CPU usage: 86% -> 33%

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

(cherry picked from commit dc56364cf2)
2024-06-24 02:03:33 +03:00
Alex Shvartzkop d319cd4b89 Improve error message when trying to Open non-KiCad schematic files.
See https://gitlab.com/kicad/code/kicad/-/issues/18241
2024-06-22 20:35:23 +03:00
Wayne Stambaugh 566fefafc5 Fix Eagle schematic importer incorrect symbol value field and visibility.
Also fix a crash if an XML_PARSER_ERROR exception is thrown when importing
Eagle symbol libraries.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18232
2024-06-22 12:22:03 -04:00
Seth Hillbrand 66bd0f850a Allow NIC pins to be stacked
Previously, we only allowed pins of the same time as well as passive
pins to be stacked.  This change allows NIC pins as well since they are
not internally connected, there is no reason that they cannot be tied to
another pin electrically

(cherry picked from commit 0e0ada8e4e)
2024-06-22 08:12:51 -07:00
Alex Shvartzkop 491bb6e57a Altium schematic import: fix power port styles.
Need to use the symbol name with style, like "VCC_CIRCLE", not "VCC".

Issue was introduced in d939004bbd

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18209
2024-06-22 06:58:41 +03:00
dsa-t 4fe74a9870 Fix arc edit points ordering in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18254


(cherry picked from commit f6994702aa)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-22 03:20:02 +00:00
Seth Hillbrand 8f03f7c367 Allow non-identical schematic/pcb nets
The schematic net names are fully unique but if we have multiple pads
that are mapped to a NC pin, they need to have unique net names so that
they do not get connected to each other in the ratsnest.  This breaks
the schematic parity check as we have modified the netname for some
pads.  To work around this, we first maintain the zero-th net without
suffix and then add an additional check in DRC to ensure that we allow
unconnected nets as long as the share a common prefix with the schematic
netname.

(cherry picked from commit f61d400d88)
2024-06-21 12:26:23 -07:00
Seth Hillbrand 7f690d596b Resolve worksheet variables in SCH_FIELD
Sheet fields should also resolve the worksheet of that sheet and not the
parent sheet

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

(cherry picked from commit 6540c3ec9f)
2024-06-21 10:31:11 -07:00
Mark Roszko be4c2715ab Don't use message as part of the assert dedup
kimath overflow can generate thousands of unique messages in one run lolol


(cherry picked from commit acec5552c0)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-06-21 11:20:17 +00:00
Seth Hillbrand 02f8260e18 Clean git conflict markers 2024-06-20 09:25:04 -07:00
Seth Hillbrand a8871fdda4 Fix cherry-pick for v8 2024-06-20 09:13:12 -07:00
Alex Shvartzkop d552ce00aa Optimize redrawNetnames.
Using RTree is slower in this case.

RTree: 25 ms when moving cursor
This method: 5 ms when panning/zooming

(cherry picked from commit 62fb5697b4)
2024-06-20 18:49:32 +03:00
Alex Shvartzkop 37dd7c6df9 Backport BOX2I_MINMAX. 2024-06-20 18:49:32 +03:00
Alex Shvartzkop a5cbcd4abe Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.

(cherry picked from commit f5be388acd)
2024-06-20 18:49:32 +03:00
Alex Shvartzkop 4ede6f61b2 Fix build errors introduced in 994c1c971a 2024-06-20 18:37:39 +03:00
Seth Hillbrand 994c1c971a Respect schematic settings for hidden pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17941

(cherry picked from commit b8ccaae403)
2024-06-19 18:07:52 -07:00
Alex Shvartzkop ebdfeb4c0a Fix crash in wxSocketBase when the event handler has been destroyed.
Fixes KICAD-37B
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18234
2024-06-19 00:49:53 +03:00
Jon Evans e1ffd956e6 Try harder to keep searchable text hidden in SVG exports 2024-06-18 11:59:46 -04:00
Jeff Young 3f4dc01d97 Don't report reasonable solder mask bridges in a net-tie footprint.
(cherry picked from commit eae85742cc)
2024-06-15 16:56:12 +01:00
Jeff Young be192d5df0 Check mask apertures on the mask layer.
(Otherwise testing A:B and B:A will add items to the
m_maskApertureNetMap cache on different layers.)

(cherry picked from commit 8cddd40fc9)
2024-06-15 16:47:41 +01:00
Jeff Young efc35dec74 Footprint Editor doesn't have nets.
(Copper shapes, on the other hand, can.  Since we use
GetItemDescription() to report DRC errors and the like,
it's better to have it report the net even when it's
<no net>.)

(cherry picked from commit b2588e0bbf)
2024-06-15 16:47:35 +01:00
jean-pierre charras 096566e857 Schematic editor: fix some issues that can crash the editor on closing.
- Add a test to be sure a SCHEMATIC exists before trying to use it
- Delete items in Repeat list and undo/redo list before deleting the schematic
- Delete also these items when loading a new schematic (the repeat list was
not cleaned previously)
( include qa compatibility from master )
Before these fixes I saw a use after delete issue due to dangling pointers
stored in Repeat list.
From master branch
2024-06-15 09:22:02 +02:00
Jeff Young 944ee4af7d Normalize phase angles. 2024-06-14 19:01:37 +01:00
Jeff Young 245894e8eb Pull netname bug fixes and performance improvements back from master. 2024-06-14 19:01:37 +01:00
Jeff Young 74abb40e84 Don't lose value of cursor checkboxes when running sim.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit c633ac26eb)
2024-06-14 19:01:37 +01:00
Jeff Young 1eb2983efe Don't assume AC gains will always be voltages.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 4eb048bba2)
2024-06-14 19:01:37 +01:00
Jeff Young 63b3e0cc4f Correctly write phase/gain signals to workbook.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 300313ce73)
2024-06-14 19:01:37 +01:00
Jeff Young a8b127019c Don't use SI prefixes with degrees when auto-ranging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 5a3bad51d0)
2024-06-14 19:01:37 +01:00
Jeff Young 4d0ca33b47 Current gain is the first Y axis, not the second.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205

(cherry picked from commit 7b63429fe1)
2024-06-14 19:01:37 +01:00
JamesJCode e2c53df13b Fix shadowed variable warning 2024-06-12 08:13:40 +01:00
Wayne Stambaugh 03dd6c7a8e Clear parent symbol references when flattening derived library symbols.
Broken parent symbols could lead to invalid return values and flattened
library symbols cannot be derived from a parent symbol.

(cherry picked from commit 360d185e3b)
2024-06-10 16:14:54 -04:00
JamesJCode bdd5a752dc Don't re-add deleted netclass assignments in incremental connectivity
Ensures that if moving or deleting a netclass directive label, the
netclass on the previously-assigned net doesn't have the stale
netclass re-applied.

Cherry-picked from 0826c10a20

(Along with prior connectivity cherry-pick...)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18173
2024-06-10 20:40:20 +01:00
JamesJCode 8dbdc3717c Eeschema: Only assign nets with resolved netclasses to the label map
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.

Cherry-picked from 9e1a5eb1bd
2024-06-10 20:31:35 +01:00
Alex Shvartzkop f60b76696a Cairo GAL: improve alignment between arcs and segments and of odd-width lines. 2024-06-10 21:21:13 +03:00
dsa-t 695505fc71 Fix build error caused by commit 82c2bda52b.
(cherry picked from commit 012d3f098f)

Co-authored-by: Wayne Stambaugh <stambaughw@gmail.com>
2024-06-10 15:02:21 +00:00
Alex Shvartzkop b34dbf58c5 Altium PCB import: don't add thickness to Solid style fills. 2024-06-10 17:32:52 +03:00
Alex Shvartzkop 1fb19c0d81 Altium PCB import: make sure Polygon fill is contained within the outline. 2024-06-10 17:19:43 +03:00
Jeff Young d6162196ec Fix KeepUpright settings in Eagle gold files.
(cherry picked from commit aa1fb0604a)
2024-06-09 23:47:00 +01:00
Alex Shvartzkop 3ea314cb9f Altium PCB import: avoid integer overflows when rotating rectangular fills.
Fixes artifacts seen in https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-10 01:00:57 +03:00
Jeff Young 9d51fabe9b Don't default KeepUpright to true in Eagle importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18175
2024-06-09 22:17:39 +01:00
Alex Shvartzkop c6b483acb9 QA: update golden data for Altium "Tracks" PcbLib. 2024-06-09 23:01:26 +03:00
Alex Shvartzkop 96370f6665 Make sure to add start points to arcs in TransformOvalToPolygon.
Otherwise the long line segments can be non-parallel to the centerline.

This was the root cause of the slowdown in https://gitlab.com/kicad/code/kicad/-/issues/18156

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

(cherry picked from commit 76b2741a92)
2024-06-09 22:49:58 +03:00
Alex Shvartzkop ad7bd9b5f8 Revert "Pcbnew, Altium import: Fix issues with hatched zones."
This removed the hatch fill import functionality,
and is no longer needed now that the root cause was found.

This reverts commit 616510aca2.

(cherry picked from commit 80b7f5fcbf)
2024-06-09 22:49:58 +03:00
jean-pierre charras 2a1ef2d09d Pcbnew, Altium import: Fix issues with hatched zones.
- Filled zones using the hatch pattern cannot use the primitives from Altium.
the filled shapes must be rebuilt.
_ Filled zones using the hatch pattern with a very small gap are now converted
to a polygon pattern. Otherwise the calculation time can be very big.

From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-09 15:56:57 +02:00
Seth Hillbrand 9f9fa0dd8d Avoid referencing parents after deletion
We look at the parent when deleting EDA_ITEMs but when clearing the test
sheet, we delete the sheet before the pin, causing a use-after-free.
Avoid this by setting parents to null in this case

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

(cherry picked from commit b2e0c2606f)
2024-06-09 13:27:34 +01:00
Seth Hillbrand 6ecfa65c4c Free item memory when closing schematic window
This fires the dtor for each item on the screen, allowing us to properly
close and remove them from the connection graph

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

(cherry picked from commit 9fbda137cb)
2024-06-08 22:16:41 +01:00
Petri Hodju 831d438852 remove item from schematic's connection graph on destruction
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17961

(cherry picked from commit 4920c6b00b)
2024-06-08 22:14:39 +01:00
Jeff Young a9b5b1728a Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
2024-06-07 23:06:19 +01:00
Jeff Young d304a30155 Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.

(cherry picked from commit 758974f5aa)
2024-06-07 18:03:45 +01:00
Jeff Young 02ca96df48 No need to mapCoords when everything is in same coord system.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18172
2024-06-07 18:00:41 +01:00
Jeff Young 5ca3414707 Performance for large hierarchies: lookups
Don't bother to sort sheet lists when we're just looking
up a UUID, sheet count, other symbol units, etc.

(cherry picked from commit e543ff0578)
2024-06-07 18:00:41 +01:00
Seth Hillbrand 76a68b1f8d Add missing IsMandatory() fn 2024-06-07 09:58:54 -07:00
Seth Hillbrand 41ebd3c560 Do not allow trailing/leading whitespace in mandatory fields
Reference, Value, Footprint and Datasheet all reference elements that
should not use trailing/leading whitespace or similar hidden charaters.
Other fields may utilize leading/trailing whitespace for obscure
purposes but won't break functionality as they are display only

(cherry picked from commit 6dcb9bb664)
2024-06-07 08:13:34 -07:00
Mark Roszko fbc75656f4 Move vcpkg to wx 3.2.5
(cherry picked from commit ba65231f6b)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-06-07 00:34:00 +00:00
JamesJCode b882defb28 Update connectivity for SCH_LABELs if netclass field changed
Required for https://gitlab.com/kicad/code/kicad/-/issues/17797 fix
in 8.0. This was fixed in the rule area work in 8.99 but not
cherry-picked as it was wrapped up in the wider changes / bugfixes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17797
2024-06-06 08:16:15 +01:00
Seth Hillbrand 7d7decafd4 Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

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

Cherry-picked from 5f16c5892c
2024-06-06 07:59:30 +01:00
Mike Williams 8705bea9ab Symbol Fields Table: better handle variable fields with attributes
Attributes need to be checked first since we do some internally hackery
to make the checkboxes work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18005
2024-06-05 13:02:40 -04:00
Jon Evans 64da49f22e Remove extraneous cache fill per row
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18159
2024-06-05 12:08:08 -04:00
Jeff Young 0c9554a325 Hand cherry-pick fixes for #18042. 2024-06-05 13:00:36 +01:00
Jeff Young dc24d13fef Import child sheets relative to project, not parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17785

(cherry picked from commit 8e855156c8)
2024-06-05 12:03:39 +01:00
Jeff Young 78cbb8e994 PCB_GENERATOR_Ts are PCB_GROUP_Ts too.
Also, an item must already be in a commit to add it to a group.

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

(cherry picked from commit 9fb07d886e)
2024-06-05 12:03:39 +01:00
Sven Pauli ddd0ccbefd Implemented flip for tuning patterns.
(cherry picked from commit c7ad5efbed)
2024-06-05 12:03:39 +01:00
Marco Ciampa f5797d367f Updated Italian translation 2024-06-05 12:09:49 +02:00
JamesJCode 89dff6411b Clear all dirty connectivity flags on symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17984

When moving / deleting a power symbol, in some instances the
symbol is marked dirty, and sometimes the pin (depending on
whether the symbol is the primary edited item, or whether
the pin is identified through an edited item subgraph). If
the pin and the symbol are marked dirty, the pin dirty flag
was not being cleared.

Additionally, not all extracted items were being deleted
from subgraphs correctly.

Both resulted in dirty state and duplicated items in the
subgraphs during incremental connectivity, which resulted
in essentially corrupted subgraph states.
2024-06-04 21:01:50 +01:00
jean-pierre charras 093da7f73a Pcbnew, plot drill marks: fix incorrect plot drill mark in some cases.
If a non copper layers is added to a copper layer for plot with drill marks,
the drill mark was not visible (covered by shapes plotted from non copper layer).

Now copper layers are plotted after the non copper layers.
2024-06-04 18:28:15 +02:00
Mike Williams 2215e8906f SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 12:10:46 +00:00
Alex Shvartzkop d34df3e951 Don't construct an arc if we won't need it in pcbnew gfx importer. 2024-06-04 07:19:00 +03:00
Alex Shvartzkop 044a2305e3 Fix ellipse angles when importing DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18121
2024-06-04 07:16:42 +03:00
Jeff Young 05264424b3 Improve hole-to-hole error message. 2024-06-03 21:55:36 +01:00
jean-pierre charras 3e59c40283 symbol editor: allows rotation of fields in derived symbols.
Fields in derived symbols are editable, so the context menu must allow rotations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18003
2024-06-03 20:35:36 +02:00
Jeff Young 2a99464fc1 Don't attempt to plot rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18133

(cherry picked from commit dc8fd0996d)
2024-06-03 18:50:37 +01:00
Jeff Young 412da66cf6 Make sure ERC pin-to-pin checks are always in same order.
Comparing U1.pin1 : U2.pin1 will return the same
results as U2.pin1 : U1.pin1, but will result in a
different serialization of any exclusions.

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

(cherry picked from commit 11193d2cda)
2024-06-03 18:49:39 +01:00
Jeff Young c6215b08ed Use wxWidgets to track DPI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981

(cherry picked from commit 931de12072)
2024-06-03 18:47:43 +01:00
Jeff Young 769060c584 Setup 3D canvas for Footprint Chooser previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17910

(cherry picked from commit 3be6d5c5de)
2024-06-03 18:43:36 +01:00
Jeff Young 0b48a66cb0 Don't add things to the selection that aren't in the commit.
Don't process line-pairs when one has already been deleted.

Clean up created line segments when operation is cancelled.

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

(cherry picked from commit 6f0a1ade01)
2024-06-03 18:43:07 +01:00
Jeff Young 836b3219c1 Apply ExportPdf fix to remaining jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863

(cherry picked from commit c0635f222d)
2024-06-03 18:36:46 +01:00
Jeff Young 2c0010fbcb Make sure var overrides get synced to board properties.
Also allow the board properties to override title-block properties.

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

(cherry picked from commit 3cf424d929)
2024-06-03 18:36:06 +01:00
Jeff Young c1ed2506f9 Sorting is not implemented on LIB_TREE columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18101

(cherry picked from commit c828deee35)
2024-06-03 18:31:34 +01:00
Jeff Young 299495a0aa Repair merge errors. 2024-06-03 18:29:37 +01:00
Jeff Young 6f3b6e3ad8 Move pad checking to Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102

(cherry picked from commit 15d4e114e0)
2024-06-03 18:29:37 +01:00
jean-pierre charras cb9d78b46c FOOTPRINT::CheckPads(): better check for hole in PHT pad.
Hole not fully inside the pad copper area is now tested.

(cherry picked from commit 8165ec66e9)
2024-06-03 18:29:37 +01:00
Jeff Young 46b3dcba4f Trim punctuation from end of URLs.
(cherry picked from commit 513e68a04a)
2024-06-03 18:29:37 +01:00
Jeff Young 06150388d8 Trim trailing punctionation from doc URLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18089

(cherry picked from commit f3b57c20af)
2024-06-03 18:29:37 +01:00
Jeff Young b07de4f6af Trim covered region to bounding hull.
Otherwise a long track crossing a footprint will look
like it covers most of it.

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

(cherry picked from commit e400d49af6)
2024-06-03 18:29:37 +01:00
Jeff Young 6dd5422137 CmpNoCase() returns 0 for a match (which evals to false as a bool).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18087

(cherry picked from commit 26fe4c05e1)
2024-06-03 18:29:37 +01:00
Jeff Young 546ca18662 Delete tuning patterns in Unroute Selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18065

(cherry picked from commit a678d0d710)
2024-06-03 18:29:37 +01:00
Jeff Young de0f6ecf68 Fetch board finish before exporting stackup to clipboard.
Also fixes some backward logic in setting modified flag.

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

(cherry picked from commit 032b5a6d65)
2024-06-03 18:29:37 +01:00
Jeff Young 995c1a179e Honour shift-key for spin buttons in 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17541

(cherry picked from commit f7c7791b6c)
2024-06-03 18:29:37 +01:00
Jeff Young bee4856a7f Process clearance rules for plated holes in router.
Also makes sure the clearance is shown for a collision,
even if the preference for showing clearances is off.

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

(cherry picked from commit d5c3a4036c)
2024-06-03 18:29:37 +01:00
Jeff Young 9721559005 Push multi-sweep traces down into MathPlot.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17215

(cherry picked from commit edae328ca6)
2024-06-03 18:29:37 +01:00
Jeff Young 7a1ab44207 Rewrite Eagle rotated text algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019

(cherry picked from commit debc94ff49)
2024-06-03 18:29:37 +01:00
Jeff Young d269513857 Improve Eagle rotated text importing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019

(cherry picked from commit f4f3f52fd4)
2024-06-03 18:29:37 +01:00
Jeff Young b4928f20a6 We can only knockout a pad if we're plotting the pad shape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17166

(cherry picked from commit 0ff59bc60e)
2024-06-03 18:29:37 +01:00
Jeff Young 05d2893ac1 Don't suppress hole plotting for utility layers.
Also simplifies the handling of DXF outline plotting.

Also removes some comments which were no longer accurate.

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

(cherry picked from commit 826b72c499)
2024-06-03 18:29:37 +01:00
Mike Williams 7ea205222d pcb: grab unconnected needs to ignore same-footprint ratsnets items 2024-06-03 12:46:13 -04:00
Wayne Stambaugh e853b593b1 Begin version 8.0.4 development. 2024-06-03 07:40:36 -04:00
Wayne Stambaugh c2a41bad09 Tag stable version 8.0.3. 2024-06-03 07:37:50 -04:00
charrasjp 1a13bed1c1 French translation update 2024-06-02 17:32:18 +02:00
Seth Hillbrand 7b9c775cbd Update translations 2024-05-31 17:41:24 -07:00
Mark Hämmerling e9bf1daa5f Translated using Weblate (German)
Currently translated at 99.8% (9169 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-01 02:40:50 +02:00
Nguyễn Ngọc Khánh d6727934a5 Translated using Weblate (Vietnamese)
Currently translated at 21.6% (1987 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-01 02:40:50 +02:00
Wellington Terumi Uemura a8df90762d Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-06-01 02:40:50 +02:00
Nguyễn Ngọc Khánh 7b4bb28307 Translated using Weblate (Vietnamese)
Currently translated at 21.4% (1972 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-06-01 02:40:50 +02:00
CloverGit ee8744770f Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9182 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen ace480d3f6 Translated using Weblate (Swedish)
Currently translated at 99.9% (9181 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen 154795d32a Translated using Weblate (Finnish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen ce20c6ec77 Translated using Weblate (Swedish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
dsa-t 6380f29214 Translated using Weblate (Russian)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-06-01 02:40:50 +02:00
Jan Straka 1aaf767c5d Translated using Weblate (Czech)
Currently translated at 81.0% (7441 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-06-01 02:40:50 +02:00
Henrik Kauhanen bd4ffa493f Translated using Weblate (Swedish)
Currently translated at 99.9% (9178 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:50 +02:00
Wellington Terumi Uemura cf26b12478 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-06-01 02:40:49 +02:00
ZbeeGin cdb26a9c97 Translated using Weblate (Polish)
Currently translated at 99.9% (9181 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-06-01 02:40:49 +02:00
Laurens Holst b5687b87bd Translated using Weblate (Dutch)
Currently translated at 100.0% (9183 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-06-01 02:40:49 +02:00
Henrik Kauhanen e581ba4c7b Translated using Weblate (Swedish)
Currently translated at 99.9% (9177 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-06-01 02:40:49 +02:00
Toni Laiho a2064f85b1 Translated using Weblate (Finnish)
Currently translated at 99.9% (9180 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-06-01 02:40:49 +02:00
Pferd O 2dbe4485cc Translated using Weblate (German)
Currently translated at 99.8% (9167 of 9183 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-06-01 02:40:49 +02:00
Mark Roszko 6b7b6fa3e3 Revert "Don't reset the view controls state just because we are setting the already active tool state again"
This reverts commit e914c0c1a0
2024-05-30 12:30:40 +00:00
Wayne Stambaugh be71f776ce Tag stable version 8.0.3 release candidate 1. 2024-05-25 07:26:08 -04:00
Mark Roszko 51ba4763f0 Don't let CaptureCursor fight modal dialog
(cherry picked from commit e9fde0051f)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-25 01:17:17 +00:00
Alex Shvartzkop f9a9db6503 Fix very tall Plot dialog on GTK.
Some scrollable controls need wxFIXED_MINSIZE, on some platforms, apparently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16926
2024-05-24 23:35:21 +03:00
Alex Shvartzkop 8d001a8031 Switch length tuner settings action scope to global to make the hotkey work. 2024-05-24 17:46:15 +03:00
jean-pierre charras 88115e1dd2 Gerbview: fix a minor issue.
When the option "always hide all layers but active" is set, the active layer
changed using hotkeys or Toolbar layer selector did not update the visible
selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18059
2024-05-24 08:29:49 +02:00
Mark Roszko e914c0c1a0 Don't reset the view controls state just because we are setting the already active tool state again
(cherry picked from commit 132ecee665)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-24 02:49:27 +00:00
Jon Evans a1cd73e730 Fix bad clearance logic in cecc1a2f 2024-05-23 11:21:18 -04:00
Jon Evans cecc1a2ff1 Use true arc collision for segment<>arc
Using an approximation here results in different collision
results for segment<>arc than point<>arc, which
can cause odd behavior in the router.


(cherry picked from commit 5b3b0ff836)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-23 12:58:01 +00:00
John Beard dc08cf3252 Eeschema: Also make 'note' backgrounds translucent on selection
For the same reason as device backgrounds - it obscures everything
else while moving a filled shape.

(cherry pick of commit 0bcd5e5795)
2024-05-23 16:52:30 +08:00
John Beard e20a11cbb3 Eeschema: Fix selection of items inside filled shapes
The selection heuristic broke down when one item was a filled
shape. Because all hit tests would succeed with distance 0 for
these shapes, they would always be considered the closest item
to the exclusion of all else, which made it very hard to
click on a graphic inside a filled shape.

Now, recognise when an item would be "dominating" and
decline to promote it to the "closet" spot. It will still
be selectable if there are no other items nearby, or if
there are multiple shapes.

(cherry picked from commit fd4c15517f)
2024-05-23 15:41:28 +08:00
Seth Hillbrand c27ca33a2e Ensure that the copper conn check re-adds epsilon
When checking if the particular rule is what is being checked, we rely
on the value of the minimum width.  Since we modified that to allow
width checking, this re-adds it for the comparison

(cherry picked from commit f74d1060d4)
2024-05-22 16:31:52 -07:00
Seth Hillbrand 1073ca0760 Include DRC Epsilon in connection width checker
Avoids rounding errors flagging connections too small by nanometers

(cherry picked from commit bce560d05f)
2024-05-22 16:31:52 -07:00
Jeff Young 4440fe0935 Fix keep-upright algo for footprint text.
Also removes PCB_FIELDs from rotation centre calc in
footprint editor if there is other stuff selected.

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

(cherry picked from commit 25bb3f77fa)
2024-05-22 14:47:26 -07:00
Seth Hillbrand d1cd859765 Re-enable moving of all footprint text in board
Seems like a lot of people really like to be able to modify the text
positions/content of their footprints

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

(cherry picked from commit 47e4ebb32a)
2024-05-22 10:36:42 -07:00
John Beard 36119b869c Pcbnew: Fix context menu when moving
The EDIT_TOOL is actually 'co-operating' with the SELECTION_TOOL
by putting its tools into the SELECTION_TOOL's menu. This means
the EDIT_TOOL::m_menu is sad and empty inside, and if you show it,
it either doesn't show at all, or a tiny stub is shown.

(cherry picked from commit af74d2a746)
2024-05-22 11:24:47 +08:00
Roberto Fernandez Bautista 3e5ceaa319 kicad-cli sym export svg: Ensure bounding box is correctly calculated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18062
2024-05-21 21:59:38 +02:00
Seth Hillbrand 78cd01038f Update translations 2024-05-21 09:38:08 -07:00
Ivan Chuba 7b4952df11 Translated using Weblate (Ukrainian)
Currently translated at 87.5% (8031 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/uk/
2024-05-21 18:35:36 +02:00
CloverGit 73acc80c1d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9171 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-05-21 18:35:36 +02:00
pominglee 8b41207351 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-05-21 18:35:36 +02:00
pominglee 5dbc1c7b18 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-05-21 18:35:36 +02:00
Toni Laiho 5780a15468 Translated using Weblate (Finnish)
Currently translated at 99.9% (9168 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-05-21 18:35:36 +02:00
Ulices 15f6d5ad73 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9171 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-05-21 18:35:36 +02:00
Nguyễn Ngọc Khánh 421bc27181 Translated using Weblate (Vietnamese)
Currently translated at 21.1% (1937 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-05-21 18:35:36 +02:00
Tokita, Hiroshi afe41498c4 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-05-21 18:35:36 +02:00
Tokita, Hiroshi 92c40f2761 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-05-21 18:35:36 +02:00
Toni Laiho bb82d99a76 Translated using Weblate (Finnish)
Currently translated at 99.9% (9168 of 9171 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-05-21 18:35:36 +02:00
Andrew 1d0e118294 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: Andrew <yenchang.lin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
pominglee d40b12301d Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: pominglee <pominglee@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
Toni Laiho 138d22b26f Translated using Weblate (Finnish)
Currently translated at 99.9% (9165 of 9171 strings)

Co-authored-by: Toni Laiho <apelegeos@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
Translation: KiCad EDA/v8
2024-05-21 18:35:36 +02:00
zly20129 9c69ea9df3 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: zly20129 <zly20129@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Laurens Holst 3395738e55 Translated using Weblate (Dutch)
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: Laurens Holst <laurens@grauw.nl>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Henrik Kauhanen 6afc2e727b Translated using Weblate (Finnish)
Currently translated at 99.7% (9148 of 9171 strings)

Translated using Weblate (Finnish)

Currently translated at 99.7% (9148 of 9171 strings)

Translated using Weblate (Swedish)

Currently translated at 99.9% (9168 of 9171 strings)

Co-authored-by: Henrik Kauhanen <henrik@kauhanen.se>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Wellington Terumi Uemura f10864b3a7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9171 of 9171 strings)

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
ZbeeGin 892602c070 Translated using Weblate (Polish)
Currently translated at 99.9% (9169 of 9171 strings)

Co-authored-by: ZbeeGin <zbeegin@op.pl>
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
Translation: KiCad EDA/v8
2024-05-21 18:35:35 +02:00
Jeff Young d8f2a455e0 Reset zone offsets when exporting footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17794

(cherry picked from commit af5ed5a118)
2024-05-21 11:41:07 +01:00
Jeff Young 561b2d490d Handle font when reading render cache.
(Also fixes a bug where the cache's triangulation wasn't
cached.)

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

(cherry picked from commit e332320108)
2024-05-21 11:36:36 +01:00
jean-pierre charras 1869da0e7d Dialog Export step: fix an issue when exporting a modified board file.
the DIALOG_EXPORT_STEP uses a auto saved copy of the current board to
create the step file (using kicad_cli).
But this file is not associated to a corresponding .kicad_pro file, and
this can create some issues (like the KIPRJMOD not defined)
So create a copy of the current board prj to export associated prj file
to the auto saved board file.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16973
2024-05-21 11:06:02 +02:00
dsa-t be2f317f6d Vertically center the color swatch in grid layer selector.
(cherry picked from commit 5f153eef7f)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-05-21 02:35:49 +00:00
Seth Hillbrand c248993a84 Avoid snapping to edge cuts when routing
Snapping happens to elements on copper layers but edge cuts is only
_virtually_ on copper layers.  We need to set its routable flag off to
ensure we don't force-snap to the snap points
2024-05-20 15:08:12 -07:00
Seth Hillbrand 0a227ea916 Avoid int overflow in collisions
When calculating arc collisions, avoid overflowing the integer distance,
which gives a false nearest point
2024-05-20 15:08:12 -07:00
Seth Hillbrand f75e6dae84 Reserve shift for grid modification 2024-05-20 15:08:12 -07:00
Seth Hillbrand 160a493885 Ensure that arc closest positions are matched
We switch from squared to absolute calcualtion when calling into the arc
collision so be sure to catch the new positions and distances
2024-05-20 15:08:12 -07:00
Seth Hillbrand 625d241adf Avoid case where whole line is new head
If the whole line shifts, we may have no points of the old tail in the
new line.  In this case, we may not only not find the split point but we
may also have fewer points in the new line than were in the old head.
Clamping to the maximum potential point count prevents creating invalid
lines

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

(cherry picked from commit 586fddeec1)
2024-05-20 15:08:12 -07:00
Alex Shvartzkop 1264230973 STEP export: reverse Wire when adding it to Face as a hole.
Better fix for https://gitlab.com/kicad/code/kicad/-/issues/17446
2024-05-19 03:51:53 +03:00
Alex Shvartzkop 6dfd417767 Make IBIS errors visible / more obvious.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18041
2024-05-19 01:44:16 +03:00
Jon Evans 585f11a01d Clear undo/redo lists when removing board layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17613


(cherry picked from commit 90ee5e097a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 22:16:28 +00:00
Jon Evans d6a121d617 Don't drag multiple coincident vias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17915


(cherry picked from commit 7a3db2d176)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 21:51:09 +00:00
Alex Shvartzkop dfd8aa402d Fix an assert in isCopperOutside. 2024-05-18 22:50:13 +03:00
Alex Shvartzkop 5b1c84b5dd STEP export: allow closing (and constructing) the wire with 1nm edges.
This is ok (and required) because we don't mess with BRepBuilderAPI::Precision nowadays.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18030
2024-05-18 22:50:13 +03:00
Jon Evans 11586863cf Fix broken hit test for arcs in via placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844


(cherry picked from commit aaf3142e9a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 17:12:34 +00:00
Jon Evans d52e50a97a Altium: avoid crash when imported zone has no fill
Fix https://gitlab.com/kicad/code/kicad/-/issues/18025


(cherry picked from commit 4f3117aea0)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-18 00:16:22 +00:00
Jon Evans fee0028ee9 Support LIB_ID queries in searchFootprints too
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18039
2024-05-17 13:57:17 -04:00
Jon Evans a762311733 The upcoming Fedora 41 will use python 3.13
The Fedora folks are currently working on updating python to version
3.13 in Fedora 41.


(cherry picked from commit f8c8dcde13)

Co-authored-by: Steven A. Falco <stevenfalco@gmail.com>
2024-05-17 14:50:03 +00:00
Jon Evans e0581370e1 Fix bogus value field in spice test source.
(cherry picked from commit a0a368f47b)

Co-authored-by: Jeff Young <jeff@rokeby.ie>
2024-05-17 14:30:23 +00:00
Jon Evans 2cd0139cbf Remove extra NeedRIGHT in textbox parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18033
2024-05-17 09:01:59 -04:00
Jeff Young 28cd2a203e Fix compiler version issues. 2024-05-17 12:59:30 +01:00
Jeff Young 33715143e3 Honour LAYER, SHEETNAME and SHEETPATH variable overrides on CLI.
Also allows the LAYER variable to work automatically
if you're plotting/exporting a single layer.

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

(cherry picked from commit 3e0c598500)
2024-05-17 11:38:56 +01:00
Jeff Young ba6fd2716e Lazily re-evaluate worst-clearance cache.
This prevents crashes when trying to re-evaluate
during destruction, etc. and is a cleaner solution
than trying to keep a flag updated.

It should also be a performance win for very large
documents.

Also implements proper threadlocking for the cache.

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

(cherry picked from commit 498d2c9db1)
2024-05-17 11:37:04 +01:00
Jeff Young 882ff06e24 More PEGTL tomfoolery.
(cherry picked from commit 8aaca0509c)
2024-05-17 11:25:26 +01:00
Jeff Young f52a51dce3 Reimplement bracedExpr and token lists for CPL models only.
This prevents the incompatibility between token lists
and single-token param-value pairs.

(cherry picked from commit 086e609c3d)
2024-05-17 11:25:22 +01:00
Jeff Young a96e16b766 Tighter control over braced-expression list separators.
(cherry picked from commit 2921d47fb3)
2024-05-17 11:25:19 +01:00
Jeff Young 81e51b00ca Remove support for multiple token values for CPL models.
It breaks param lists which contain single-token params
(ie: those without the "=<value>" part).

(cherry picked from commit 8bb807f170)
2024-05-17 11:25:15 +01:00
Jeff Young c01681a32e Repair variable resolution recursion guard.
(cherry picked from commit c8d1c1f1a4)
2024-05-17 11:24:37 +01:00
Jeff Young eeb9133588 Support multiple brace-expressions for CPL model lines.
(Nested brace-expressions, on the other hand, are *not*
an ngspice thing.)

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

(cherry picked from commit 0008991f02)
2024-05-17 11:24:21 +01:00
Jeff Young d45769e508 Allow .ends to be preceeded by whitespace.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16560

(cherry picked from commit b934914c59)
2024-05-17 11:21:47 +01:00
Jeff Young a499bc9f66 Contour cache must be sensitive to size.
(While we scale the contours afterwards, font hint
data is size-sensitive so the contours are already
size-specific.)

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

(cherry picked from commit 98f4e60b90)
2024-05-17 11:20:38 +01:00
Jeff Young 341f102d79 Fix PEGTL flagParam grammar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393

(cherry picked from commit c5162f5483)
2024-05-17 11:20:26 +01:00
Jeff Young 3e50a03ce7 Expose violation severity for co-located holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18028

(cherry picked from commit 26906f383c)
2024-05-17 11:20:21 +01:00
Jon Evans 1defa3872e Clear field listener when quitting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18016


(cherry picked from commit 2836025402)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-17 00:50:48 +00:00
jean-pierre charras e66d25b6e8 Eeschema, Pin helpers: fix wrong label orientation if the symbol is rotated
From Master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18012
2024-05-16 19:53:23 +02:00
jean-pierre charras 76f38600af Fix a 100% CPU core usage is some editing cases.
In commit 7cb754dd a call to wxMilliSleep(50) was removed (because it created
lag in editing) but this removal created a 100% CPU core usage.
Using a much small sleep time (1ms) fixes these issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17979
2024-05-16 17:40:06 +02:00
John Beard 44b0ef64e8 No longer auto-set the Footprint field when setting the FPID
This avoids forcing the field to the footprint name in the
library editor, which gets in the way. This doesn't specifically
inhibit the use of the field, and doesn't interfere with fields
users may have set manually (it can be cleared manually if
wished).

Removing the footprint field entirely either from all footprints
or from footprints in fpedit is quite a bit more invasive to
existing designs.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/17998
2024-05-16 21:42:18 +08:00
John Beard c3e7509823 Allow to set LIB_FIELD size through property manager
This can be useful when managing auxiliary fields.

This is only for the 8.0 branch, as LIB_FIELD is merged
with SCH_FIELD in 8.99, so this is already handled.
2024-05-16 20:45:26 +08:00
Jeff Young 3622a296be Use consistent sorting for footprint libs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17731

(cherry picked from commit 02bc093b55)
2024-05-15 11:25:41 +01:00
Jeff Young 0b48913876 Add mirrored column to fields grid table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17956

(cherry picked from commit 0f3d14df38)
2024-05-15 11:25:02 +01:00
Jeff Young 9000cfb9cd Use display titles for axes in CSV output.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17324

(cherry picked from commit d9a6b2aec2)
2024-05-15 11:23:52 +01:00
Jeff Young c748645334 Fix typo.
(cherry picked from commit 5ba4900170)
2024-05-15 11:23:07 +01:00
Jeff Young 79443b7e59 Update signals & measurements when netlist might have changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17616

(cherry picked from commit 55b2c4dbf4)
2024-05-15 11:22:08 +01:00
Mark Roszko 02925fdecc Update file doxygen.yml
(cherry picked from commit 3a2b960f62)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-12 02:53:57 +00:00
Mark Roszko ef1e054bb6 Use our docker runner for doxygen
docker tag for shared gitlab runners was removed by gitlab

(cherry picked from commit 03459723b3)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-12 01:09:42 +00:00
Mark Roszko bb13ab2963 Remove the kicad-vcpkg xz override
(cherry picked from commit 695493fc3d)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-10 01:44:39 +00:00
Jeff Young 9c7fb0697c Don't double up ac and ph params.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-09 23:36:32 +01:00
Jeff Young c92b11900b Don't add duplicate SIM fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-09 23:36:32 +01:00
Jeff Young cde18d7ae7 The user can cancel the opening of many editors.
Don't play dice with the devil.

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

(cherry picked from commit a99377c1ec)
2024-05-09 23:36:32 +01:00
Jeff Young 1a932cb13b Don't modify radius when editing center.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17192

(cherry picked from commit 1290228fbf)
2024-05-09 23:36:32 +01:00
Jeff Young cc75d8c0af Exercise more care when comparing doubles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17249

(cherry picked from commit 62d4bd7c1d)
2024-05-09 23:36:32 +01:00
Wayne Stambaugh cb93d2940c Fix QA DRC regression test issue.
(cherry picked from commit f1e8495dc9)
2024-05-09 10:38:47 -04:00
Wayne Stambaugh 88e0d373d1 Do not test for effective annular width when it's already within limits.
(cherry picked from commit 0402c03468)
2024-05-09 10:38:32 -04:00
Wayne Stambaugh c2d59c6103 Fix false annular ring width DRC test failure.
The DRC annular ring width test failed to take into account that a pad
could be contained inside another pad having the same number (thermal
vias for example) which changes the effective annular width of the pad
contained within another pad.  A test was added to calculate the effective
annular ring width in this case.

Added some PNS log viewer helper and test code to the PNS playground QA
utility for testing the effective pad annular width code.

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

(cherry picked from commit a508f2e716)
2024-05-09 10:38:17 -04:00
Seth Hillbrand f8f48f922e Show disambiguated netname when needed
When using subsheets with nets that end in the same netname, it can be
confusing in pcbnew to know which net you are dealing with.  In these
cases, we show the full netname including path to assist when routing

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

(cherry picked from commit b346cde30b)
2024-05-09 02:57:48 +02:00
Alex Shvartzkop eb7e781bec Send project path to ngspice for code model input files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16527
2024-05-08 23:39:34 +03:00
Alex Shvartzkop 378300c733 Don't hide symbol/footprint preview widgets on scroll.
(cherry picked from commit dc8822b421)
2024-05-08 19:44:59 +03:00
Jon Evans ddd7c35586 DbLib: Prevent uncaught exception creating statement
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.
2024-05-06 16:59:49 -04:00
Seth Hillbrand 6482a322da Optionally use electrical type when shown.
We also need to consider electrical type as an exact hit when we are
showing it.  Otherwise, we get the pin added to our consideration list
but not selected without hitting close neighbors

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

(cherry picked from commit 3620887a22)
2024-05-06 10:38:28 -07:00
Seth Hillbrand dc6d421fa2 Avoid arbitrary string limits
Placing a limit on the number of values that a field is allowed to hold
makes it blank when we set more than this number.  There's not a good
reason to limit the number of digits we allow at the field level (we
round to 4 decimal points in the backend)

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

(cherry picked from commit cb71f2f207)
2024-05-06 10:00:51 -07:00
Mike Williams 7b19fb0c8d Legacy Libraries: fix Description field clobbering user field
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17943
2024-05-06 12:15:14 -04:00
Mark Roszko f6480d67eb Fix help for kicad-cli pcb export pos --side
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15815


(cherry picked from commit 030a251090)

0b94c436 fix https://gitlab.com/kicad/code/kicad/-/issues/15815
8e6bb91b Update file command_pcb_export_pos.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
2024-05-06 13:37:03 +00:00
Alex Shvartzkop 35c788a332 Fix polygon fill flag in pcbnew graphics (SVG) importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17957
2024-05-06 14:16:49 +03:00
Seth Hillbrand a0cba3a9af Re-initialize conversion settings on failure
When the conversion fails, it may be the result of the settings values,
so reset them to their original values afterward

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

(cherry picked from commit 4c0fd6e791)
2024-05-06 11:42:54 +01:00
Jeff Young af6835e766 Improve bounding hull error message.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17886

(cherry picked from commit 651cc5c838)
2024-05-06 11:42:34 +01:00
Mike Williams 1f88d33c81 BOM Export: remember filename per project
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17704
(cherry picked from commit 9c058503d9)
2024-05-06 11:38:15 +01:00
Jeff Young 6aee6f857e Don't leak output file path between projects.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17846

(cherry picked from commit 0e9b547f94)
2024-05-06 11:37:52 +01:00
jean-pierre charras 6d69fee097 PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(): ensure texts are not mirrored
When not specified as mirrored, texts must be not mirrored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17955
2024-05-06 11:17:17 +02:00
Alex Shvartzkop c7dd993439 Add OpenGL info to About.
(cherry picked from commit 5e14ae9698)
2024-05-05 21:58:10 +03:00
Jeff Young 7e5dd02ef1 Don't abort on failure to backup file if it was never saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17810

(cherry picked from commit 0e0432d194)
2024-05-05 14:59:07 +01:00
Jon Evans ca16ff05df Altium pcbimport: handle various dimension items, fix dimension_kind enum
(cherry picked from commit ce32dfd077)

e627d587 handle various dimension items, fix dimension_kind enum, this doesn't parse...
e89d1826 fix formating
07686833 change to Reporter for logging
a535d13d remove old comments
554c9565 Update file altium_pcb.cpp

Co-authored-by: Stefan <2252537-stefan_test@users.noreply.gitlab.com>
2024-05-04 16:38:32 +00:00
Jon Evans b8fa10ab2b Add optional reporting of non-KiCad design issues
Also add HTML reporter to PCB side to match schematic
2024-05-04 11:27:22 -04:00
Jon Evans 09736ebf2c Get rid of relative position in pad properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17246
2024-05-03 23:31:36 -04:00
Jeff Young 897b9fe6a1 Restore accidentally deleted text size constraint algo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17284

(cherry picked from commit c998234dec)
2024-05-03 22:16:16 +01:00
Jeff Young 48f14d6dea Handle orientation when pasting footprint items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17518

(cherry picked from commit 94223ca794)
2024-05-03 22:15:53 +01:00
Jeff Young 1ef916086d pruneItemLayers() is not the right place to filter refdes & value.
(And we already filter all mandatory fields in
pasteFootprintItemsToFootprintEditor() anyway.)

Also, don't nuke a footprint which contains only fields
during a paste.

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

(cherry picked from commit eb13dec265)
2024-05-03 22:15:05 +01:00
Jeff Young 0b44ba61d8 Improve consistency in free-via ambiguity tests.
Also removes a magic number.

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

(cherry picked from commit 58ddffe3dd)
2024-05-03 22:15:05 +01:00
Jon Evans 3c99a3797e DbLib: Fill entire table if cache is empty when loading one part
The "already placed parts" feature causes a situation where many
single-part queries are placed before the cache is even filled.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17940
2024-05-03 17:03:55 -04:00
Seth Hillbrand 76c98859bf Fix renaming sheet check
If we are renaming a sheet that exists only once in the schematic, then
we don't need to warn about case sensitivity.  If the sheet exists
multiple times, we do.  We can't check this using SCREENS because the
screens don't maintain full state information about where they are used.

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

(cherry picked from commit ba4974749c)
2024-05-03 13:23:51 -07:00
Seth Hillbrand 57c8fbc9fe Special-case copy/paste of footprint fields on board
When editing the board, footprint fields _look_ like text items, so copy
and paste of these items should logically result in a text item, not a
footprint copy.

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

(cherry picked from commit 71b020eb14)
2024-05-03 11:00:19 -07:00
Seth Hillbrand bbac5430cf DRC: special case circles for annular width check
Circles only use one dimension and we tend to ignore the other in our UI
but it is kept and reflects the previous second dimensional value.  When
checking DRC, we should only be concerned with the single value used
unless the pad has two dimensions

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

(cherry picked from commit e3d2f338de)
2024-05-03 10:07:29 -07:00
Seth Hillbrand 279ef4210d Use StandardPrimitive library for vias
Some 2581 parsers don't like to consider UserPrimitive even though they
are essentially the same thing and required by the standard.  ¯\_(ツ)_/¯

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

(cherry picked from commit 13735050da)
2024-05-03 09:12:43 -07:00
Jon Evans 2ef18ad4ca Fix deduplication of already-placed symbols
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.
2024-05-03 11:39:01 -04:00
Jon Evans 1a76fce255 Make sure database library has updated pointer to library table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17903
2024-05-03 11:39:01 -04:00
Mark Roszko ee75a50d84 Update vcpkg wxpython
(cherry picked from commit 1a1be2d542)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-03 02:17:30 +00:00
Mark Roszko 99d8d0bc63 Use the new kmb toolchain file for vars
(cherry picked from commit f00a1ab517)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-05-03 02:15:52 +00:00
Mark Roszko f859fe37ca Add updated tooltips on update dialog
(cherry picked from commit cb81de5a74)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-03 01:39:50 +00:00
Alex Shvartzkop 451cb7a194 Fix warnings. 2024-05-03 00:09:24 +03:00
Alex Shvartzkop 17175fe71e EasyEDA Std/Pro: import (some) component metadata for symbols.
Also fixes Reference numbering.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17806
2024-05-03 00:05:39 +03:00
Seth Hillbrand f8b02f99dd Keep FP chooser on top of KiCad but not system
We don't need to float the window over other programs, so setting to
parental floating keeps it focused just the right amount

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

(cherry picked from commit 60f59ae851)
2024-05-02 13:12:21 -07:00
Seth Hillbrand 69fb86322c Re-allow moving footprint text
This is a temporary solution until we modify loading to convert existing
text to fields

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

(cherry picked from commit b649932dbf)
2024-05-02 13:00:37 -07:00
Seth Hillbrand 4d683232b7 Remove faulty tooltip
Copy-pasta error

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

(cherry picked from commit b211625e53)
2024-05-02 12:46:26 -07:00
Jon Evans cb7e0e4383 Altium: apply power filter to symbol libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17922
2024-05-01 22:47:19 -04:00
Jon Evans 90b62762d3 Support ortho dragging labels off sheet pins 2024-05-01 22:10:18 -04:00
Jon Evans 787a9ae4e4 Pin helpers can help sheet pins also
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17923
2024-05-01 22:10:02 -04:00
Jon Evans 83be5ba63d Move ALTIUM_PCB to use REPORTER for logging
Change not-yet-supported messages to debug level

(cherry picked from commit e973c15087)
2024-05-01 19:17:09 -04:00
Jeff Young e1cad6189e Don't assume that a SMD pad has copper layers.
(cherry picked from commit 9a6efd43e1)
2024-05-01 18:29:36 +01:00
Mike Williams f29fc2a025 PCB Fields: fix v7 imported board hidden description field pos
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17684
2024-05-01 09:24:54 -04:00
Mark Roszko 43d4c8d801 Point BEGIN_EVENT_TABLE at the correct base class, fix current lang indication
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17825


(cherry picked from commit aaf776db9e)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-05-01 02:48:19 +00:00
Wayne Stambaugh c179f4d4f1 Use correct value field text when importing Eagle schematic symbols.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17130

(cherry picked from commit 865225fcca)
2024-04-30 13:02:29 -04:00
jean-pierre charras ac8b3989be DIALOG_EXPORT_2581:fix incorrect size of widgets when a very long field name exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17911
2024-04-30 18:22:22 +02:00
Mark Roszko 9a7b1a20dc Update sentry-native to 0.7.2
(cherry picked from commit 2f0ff4e557)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-30 11:39:47 +00:00
Alex Shvartzkop cff58bae7f Fix internal simulation errors when using some IBIS models.
Usage of GC_PWR0 looked like a copy/paste.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17701
2024-04-29 23:24:46 +03:00
Jeff Young 2ee2d7d5d9 Separate Compare Footprints from DRC.
(We want to ignore some of the flags for DRC.)

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

(cherry picked from commit 43e6006306)
2024-04-29 16:27:24 +01:00
Jeff Young 743759578d Use a lighter touch keeping internal data structures in sync.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17493

(cherry picked from commit d0df8df7c7)
2024-04-29 13:45:17 +01:00
Mark Roszko 9f1d1fc45e Delete m_locale in the pgm_base destructor instead of manual destroy method
We need the object in m_locale for a bit more things during program cleanup,
especially on macOS

The destructor of PGM_BASE is sufficient allowance of lifetime.

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


(cherry picked from commit 9ffa5db667)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-29 11:48:22 +00:00
Mark Roszko b4ea25dccb Bump kicad-vcpkg baseline 2024-04-29 11:10:29 +00:00
Alex Shvartzkop f15551a6b5 3D viewer: apply OCC colors in order: XCAFDoc_ColorSurf > XCAFDoc_ColorCurv > XCAFDoc_ColorGen
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14906
2024-04-29 01:25:31 +03:00
Jeff Young 5c0a654e1e Save project settings after Schematic Setup.
This prevents data from getting lost if we later crash.

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

(cherry picked from commit d8d816236c)
2024-04-28 21:54:16 +01:00
Jeff Young edace908fb Make sure color settings are saved when modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17864

(cherry picked from commit 3b3de58e5e)
2024-04-28 21:54:16 +01:00
Jeff Young ff966eaf62 Gracefully handle DNP & Excl-from-brd components in nets list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17146

(cherry picked from commit 9be60cb45d)
2024-04-28 21:54:16 +01:00
Jeff Young a39b9b8890 Support legacy Length Tuning Settings workflow.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17748

(cherry picked from commit 978ef352d0)
2024-04-28 21:54:16 +01:00
Jeff Young 9f39420808 Layer column should be shown by default, not italic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17758

(cherry picked from commit 9dab855f8d)
2024-04-28 21:54:16 +01:00
Jeff Young 67b5e86cc4 Default to target lib when no lib tree sel exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17808

(cherry picked from commit f51d227dc7)
2024-04-28 21:54:16 +01:00
Jeff Young baaa8b6537 Fix merge error. 2024-04-28 21:54:16 +01:00
Jeff Young 4f776050e6 Clean up selection logic.
Don't try to do too many things at once.  Separate
out fooptrint-children handling, visibility-handling,
and footprintEditor vs boardEditor differences.

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

(cherry picked from commit 3958d1bf14)
2024-04-28 21:54:16 +01:00
Jeff Young fa490644dd Allow selection promotion when editing wrong field type.
Also fixes a bug where a CHT_MODIFY on a parent symbol with a
selected child doesn't trigger a selection modified event.

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

(cherry picked from commit 1aa59b806c)
2024-04-28 21:54:16 +01:00
Jeff Young 0363806e7e Allow no-net teardrops on no-net pads with no-net tracks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17566

(cherry picked from commit 50567764b5)
2024-04-28 21:54:16 +01:00
Jeff Young c0a608bfdd Keep internal data consistent when changing pad type.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17493

(cherry picked from commit 859f553c91)
2024-04-28 21:54:16 +01:00
Jeff Young fe26628113 Internationalise pin info when language changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17224

(cherry picked from commit c5c65f23a4)
2024-04-28 21:54:16 +01:00
Alex Shvartzkop c7ead70e0f Fix orientations of some footprint STEP models.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17631

(cherry picked from commit 7d37cebfdf)
2024-04-28 23:19:34 +03:00
Wayne Stambaugh 31177be88f Property grid navigation improvements.
* Do not handle tab key event when committing property changes so the
  property grid tab navigation works correctly.
* Do not call commit property changes on tab key when no changes are
  pending.
* Skip event handling in the base object value change and changing event
  handlers in case they do not get overloaded in derived objects.
* Do not force focus to canvas on property change so arrow and tab key
  grid navigation work properly.  Forcing the user to click the property
  grid control to edit a single property doesn't make sense.
* Pass properties panel show event up the event stack.
* Do not set focus to canvas in tool dispatcher if it already has the
  focus.

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

manully cherry picked from commit 8a1347d2c8
2024-04-28 08:25:24 -04:00
Wayne Stambaugh 48fd6bab7b Symbol chooser dialog layout improvements.
(cherry picked from commit 33869dbb61)
2024-04-28 07:43:43 -04:00
Wayne Stambaugh 9fd2b32665 Do not show click to start wire cursor for hidden pins.
Selecting show hidden pins will allow users to connect to hidden pins.

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

(cherry picked from commit ca18dc8ec8)
2024-04-28 07:39:34 -04:00
Wayne Stambaugh 1ba05d4c9c Improve symbol instance data file save ordering.
Use the root schematic UUID to order projects and sort symbol instance
data by KIID_PATH.  This will ensure file changes to instance data are
more consistent by using a fixed ordering.

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

(cherry picked from commit a86a258f66)
2024-04-28 07:15:22 -04:00
Wayne Stambaugh bae3ccdfb5 Use correct project name when adding new symbol instances.
When adding a sheet using a schematic from another project, set the
project name for the new symbol instance data to the current project
rather than the project name from the copied instance data.

(cherry picked from commit 5d99aaf0a4)
2024-04-28 07:06:03 -04:00
Alex Shvartzkop dd2f15c96d QA: update Altium footprint library golden file. 2024-04-27 23:34:39 +03:00
Marek Roszko 7e04a1b8d3 Hackfix macOS to keep erc/drc on top
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14356
2024-04-27 13:38:41 -04:00
Mark Roszko aea70a14ff Fix win32 proxy parsing when the old IE options for scheme based configuration was set
If you uncheck in the old IE options "Use the same proxy server for all protocols", then it returns an annoying string
like http=blah:1232;https=blah:1232;ftp=blah:2321 which we have to parse.


(cherry picked from commit 60d5780c1c)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-27 17:30:03 +00:00
dsa-t 8edfc23679 Altium PCB import: pad thermal spoke angle is 90 deg by default.
(cherry picked from commit 11ba59b690)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 17:27:07 +00:00
dsa-t 87f3d45109 Require Wayland 1.20 libraries.
KiCad doesn't build with older versions due to missing definitions.


(cherry picked from commit e26778c599)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 17:26:57 +00:00
Wayne Stambaugh 2ca07b47af Begin version 8.0.3 development. 2024-04-27 13:10:22 -04:00
Wayne Stambaugh 61a17e4c8b Tag stable version 8.0.2. 2024-04-27 13:08:12 -04:00
Mark Roszko 67dda92437 Hackfix crash in configure paths using non-ascii chars in column headers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17743


(cherry picked from commit a565db58c5)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-04-27 14:17:22 +00:00
Seth Hillbrand 4dfe564243 Update translations 2024-04-26 19:52:18 -07:00
CloverGit 5b3c0028ea Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 53d219e9d5 Translated using Weblate (Japanese)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
2tama3 a4da356ac7 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
Ulices 2915a9d1a2 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.8% (9156 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 6778eb8352 Translated using Weblate (Japanese)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
CloverGit bdf8c04daf Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
Henrik Kauhanen a32ca5d0c4 Translated using Weblate (Swedish)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-27 04:50:46 +02:00
Tokita, Hiroshi 992bee7ec9 Translated using Weblate (Japanese)
Currently translated at 99.9% (9167 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:46 +02:00
Henrik Kauhanen 7216527224 Translated using Weblate (Finnish)
Currently translated at 99.7% (9148 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-04-27 04:50:46 +02:00
Jan Straka 09bbabeef3 Translated using Weblate (Czech)
Currently translated at 80.9% (7422 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-27 04:50:46 +02:00
CloverGit 3ee74e2966 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:46 +02:00
dsa-t 312356c284 Translated using Weblate (Russian)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-27 04:50:46 +02:00
Nicoara Alex 6b9dba3d45 Translated using Weblate (Romanian)
Currently translated at 27.0% (2479 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-04-27 04:50:46 +02:00
ZbeeGin 02c03ba2b6 Translated using Weblate (Polish)
Currently translated at 99.9% (9169 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-27 04:50:45 +02:00
Laurens Holst c35ba8f4cd Translated using Weblate (Dutch)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-27 04:50:45 +02:00
taotieren c344e170b9 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9166 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-27 04:50:45 +02:00
taotieren 5b5253b6e2 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
ZbeeGin 2954378f58 Translated using Weblate (Polish)
Currently translated at 99.9% (9165 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-27 04:50:45 +02:00
Pferd O eea71b9209 Translated using Weblate (German)
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-27 04:50:45 +02:00
Hubert Hu 8eb98a2094 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
CloverGit 85d9feefff Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-27 04:50:45 +02:00
Henrik Kauhanen c059cbce12 Translated using Weblate (Swedish)
Currently translated at 99.9% (9168 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-27 04:50:45 +02:00
dsa-t a84aa449b2 Translated using Weblate (Russian)
Currently translated at 99.9% (9169 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-27 04:50:45 +02:00
Tokita, Hiroshi a4a2ec07c4 Translated using Weblate (Japanese)
Currently translated at 99.8% (9154 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:45 +02:00
Pferd O d5557caa33 Translated using Weblate (German)
Currently translated at 99.9% (9164 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-27 04:50:45 +02:00
Wellington Terumi Uemura 47717ca779 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9170 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-04-27 04:50:45 +02:00
Tokita, Hiroshi d7f742f911 Translated using Weblate (Japanese)
Currently translated at 99.6% (9135 of 9170 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-27 04:50:44 +02:00
Seth Hillbrand 86ebc85404 Avoid assert on unhandled properties call 2024-04-26 19:50:00 -07:00
jean-pierre charras 5d4ed4b21a French translation: fix a typo 2024-04-26 09:58:07 +02:00
Seth Hillbrand 1ca0737c34 Replace stale pin references with UNDO copy
When we replace a symbol with one that has fewer pins, the old pins
are released, which leaves points to them in the connection graph
dangling.  This updates the pointer to use the cloned copy in the undo
stack until the connection graph is rebuilt with the new data

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

(cherry picked from commit 315ad0e071)
2024-04-24 12:55:30 -07:00
Seth Hillbrand 3a29fa44e3 Ensure that missing pins are added to extraction
When changing from a larger part to a smaller part, the previously
existing pins may be removed from the screen but still linked to
elements in the connection graph because we don't set them dirty unless
the changed element overlaps

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

(cherry picked from commit 0cd3e17db7)
2024-04-23 19:37:59 -07:00
Wayne Stambaugh 3517d25aec Tag stable version 8.0.2 release candidate 2. 2024-04-18 16:21:19 -04:00
Wayne Stambaugh 8d62a5fd3f Fix missing instance data when reusing an already loaded schematic.
Remove duplicate sheet instance page numbering.  It's already done when
the sheet is loaded from an exiting file or an already loaded schematic.
Remove the unnecessary page update code from the drawing tool.

(cherry picked from commit 17bcc27ff6)
2024-04-18 16:07:36 -04:00
Seth Hillbrand 9e5876df5c Remember to set the root sheet before loading
This is done in the frame for GUI loading so we need to explicitly set
this when loading files in the cli

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

(cherry picked from commit f8a25d20f8)
2024-04-18 10:48:15 -07:00
Seth Hillbrand fdc3806ed1 Protect courtyard cache regen
The courtyards are referenced by multiple calls and will be rebuilt on
command.  If this happens during zone fill (because the board timestamp
has incremented since the start) multiple threads may generate the cache
at the same time, leaving one with an invalid pointer

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

(cherry picked from commit df5dd15c6f)
2024-04-18 08:41:43 -07:00
jean-pierre charras 798b827a12 Plot pads: Do not use pad offset twice when plotting chamfered rect pads
from Master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17793
2024-04-18 14:03:11 +02:00
Seth Hillbrand 4ade0ac73d Don't sort on lost references
The arraystring reference is lost when we don't keep the wxFileName
variable in scope.

This also adds removing invalid paths and checking for correct version
before sorting

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

(cherry picked from commit d2701323a8)
2024-04-17 12:24:17 -07:00
Seth Hillbrand 65fd8d22ed Mask aperture pads can have multiple layers
But as long as they don't have copper, we should treat them as mask
apertures

(cherry picked from commit 02cdb0c6b9)
2024-04-16 15:54:36 -07:00
Alex Shvartzkop 481c1592ae STEP export: don't fail when can't construct a wire.
This can happen with very small shapes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17774
2024-04-17 01:35:00 +03:00
Mark Roszko 9af12e60d2 Close bom file earlier
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17779

(cherry picked from commit 5d7e96841b)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-04-16 14:30:13 +00:00
Marco Ciampa 048448296d Updated Italian translation 2024-04-15 23:38:28 +02:00
Wayne Stambaugh e03308e5ca Tag stable version 8.0.2 release candidate 1. 2024-04-15 06:20:59 -04:00
Wayne Stambaugh 16691c8d03 Fix string so it gets translated properly. 2024-04-15 06:18:20 -04:00
jean-pierre charras dac0296e3a French translation update 2024-04-15 10:41:22 +02:00
Seth Hillbrand 52ce4c0313 Update translations 2024-04-14 14:22:32 -07:00
Henrik Kauhanen 1956204635 Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:57 +02:00
pominglee b4bd14ba10 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.6% (8583 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
pominglee 8f7f6739c3 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.6% (8583 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
pominglee 4eebd8ad6c Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8573 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:57 +02:00
Marek 4b3d67ffda Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:57 +02:00
Ulices f3e3236a43 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:57 +02:00
Ulices 82ee4a81ed Translated using Weblate (Spanish)
Currently translated at 99.1% (9082 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es/
2024-04-14 23:19:57 +02:00
Alex Gellen 55fbdddbb7 Translated using Weblate (Romanian)
Currently translated at 27.0% (2477 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ro/
2024-04-14 23:19:57 +02:00
Henrik Kauhanen 7cce1901b2 Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:57 +02:00
김랑기 0f4f1c0d3b Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:57 +02:00
j.Kolod 78849ba5c0 Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:56 +02:00
김랑기 a066c57fcc Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:56 +02:00
CloverGit 8684c0f9be Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:56 +02:00
ssantos db94f8c8ef Translated using Weblate (Portuguese)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt/
2024-04-14 23:19:56 +02:00
co8 j db0f7ec457 Translated using Weblate (Japanese)
Currently translated at 99.6% (9128 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-04-14 23:19:56 +02:00
Jan Straka 2bf4cca58a Translated using Weblate (Czech)
Currently translated at 80.6% (7390 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-14 23:19:56 +02:00
Laurens Holst 4470f4e6d8 Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:56 +02:00
pondahai e516ab5114 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8572 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:56 +02:00
김랑기 0282b142b8 Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:56 +02:00
Ulices 676108952e Translated using Weblate (Spanish (Mexico))
Currently translated at 99.7% (9141 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:56 +02:00
aris-kimi 8470091a4b Translated using Weblate (Greek)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-04-14 23:19:56 +02:00
Jan Straka 3302ef537f Translated using Weblate (Czech)
Currently translated at 80.1% (7348 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-04-14 23:19:56 +02:00
CloverGit 366f7aea6b Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:56 +02:00
Dmitry Mikhirev eed2221651 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:56 +02:00
Laurens Holst 90093c0fdd Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
simmon 2adccce3b8 Translated using Weblate (Korean)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:55 +02:00
CloverGit 6bf9653bef Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:55 +02:00
dsa-t 04c083ac48 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:55 +02:00
Laurens Holst 9a236e5972 Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
pominglee 521e773f2c Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8572 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:55 +02:00
Andrej Valek e28aa6d16c Translated using Weblate (Slovak)
Currently translated at 65.0% (5956 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:55 +02:00
Andrej Valek 001c90c69f Translated using Weblate (Slovak)
Currently translated at 64.8% (5944 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:55 +02:00
Laurens Holst cba73e6cea Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:55 +02:00
Ulices 5af4f3f9df Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9125 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:55 +02:00
pominglee e1b922ae19 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8568 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-04-14 23:19:55 +02:00
CloverGit f1d988788a Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:55 +02:00
dsa-t 8e6cb7b350 Translated using Weblate (Russian)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:55 +02:00
Toni Laiho 6685eefc8e Translated using Weblate (Finnish)
Currently translated at 99.9% (9159 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-04-14 23:19:55 +02:00
aris-kimi 8d231b8c96 Translated using Weblate (Greek)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-04-14 23:19:54 +02:00
ZbeeGin 313e09cfd3 Translated using Weblate (Polish)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-04-14 23:19:54 +02:00
Laurens Holst 5a05a1337e Translated using Weblate (Dutch)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:54 +02:00
Ulices a40929fa71 Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (9120 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-04-14 23:19:54 +02:00
CloverGit 37eb5f4a8d Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-04-14 23:19:54 +02:00
Henrik Kauhanen b7d1fb944c Translated using Weblate (Swedish)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-04-14 23:19:54 +02:00
Marcel Hecko 9797d2d133 Translated using Weblate (Slovak)
Currently translated at 64.6% (5923 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-04-14 23:19:54 +02:00
dsa-t e34bb98ba1 Translated using Weblate (Russian)
Currently translated at 99.9% (9161 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-04-14 23:19:54 +02:00
Pedro Moreira 60440094ba Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-04-14 23:19:54 +02:00
Laurens Holst c198e5ee15 Translated using Weblate (Dutch)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-04-14 23:19:54 +02:00
김랑기 ceedfd9b7e Translated using Weblate (Korean)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:54 +02:00
Pedro Moreira a4fbbaaa0b Translated using Weblate (Korean)
Currently translated at 99.9% (9162 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-04-14 23:19:54 +02:00
Pferd O 6cbdac5bf1 Translated using Weblate (German)
Currently translated at 100.0% (9163 of 9163 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-04-14 23:19:54 +02:00
Seth Hillbrand 26629928c3 Incremental updates should not clear globals
Netclass assignments are stored in the project level but
CONNECTION_GRAPH updates would clear the assignments.  This keeps
existing netname->netclass assignments but updates any netnames that
were changed by the incremental updates.  Absolute updates are not
affected and fully recreate the net name to netclass map

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

(cherry picked from commit e538b98286)
2024-04-14 14:14:38 -07:00
Seth Hillbrand 55c864ec45 Fix incremental connectivity
The connectivity routine would consider symbols, overwriting unused
subgraphs for pins that were not in the change list.  This is resolved
by updating the full connectivity to only use pins in the graph since
symbols are not connected independently.

In the process of adding QA tests for this change, additional issues
with the schematic QA were discovered.  Specifically, we were not
properly setting the root sheet UUID.  This was partially masked by a
const_cast setting of the RefDes in sch_symbol when called the RefDes
getter.  This exposed the fact that our QA ERC numbers did not match the
schematic editor stand alone ERC numbers.  So the test value for one
check needed to be updated

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

(cherry picked from commit a9f35ba42e)
2024-04-14 14:14:38 -07:00
Seth Hillbrand 07b5fd342a Ensure that we are not calculating self-collision
Ratsnest may have connections from a zone to two different items.  This
should be avoided as we never want to draw the ratsnest line with the
same element as start and finish

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

(cherry picked from commit 8760519a87)
2024-04-14 13:50:44 -07:00
Seth Hillbrand 4481fcc75e Check for valid shared pointer before locking
We don't neccesarily have a valid pointer to the parent lib symbol when
checking if it is a power symbol, so fall back to the local flag if this
is the case

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17182
2024-04-11 14:42:53 -07:00
Seth Hillbrand a155dd32e8 Do not set optional defaults
In the file format, the 'mirror' tag is optional (not written unless on)
so we cannot default the new text to 'mirror' on just because the
footprint is on the back layer as it won't be turned off by the
footprint loader.

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

(cherry picked from commit d0fe2e06aa)
2024-04-11 09:43:55 -07:00
Wayne Stambaugh c4c804edf7 Update hierarchy navigator when undoing or redoing sheet name changes.
Use new schematic commit object in the edit sheet properties dialog.

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

(cherry picked from commit ec310ac3ed)
2024-04-11 10:51:04 -04:00
Wayne Stambaugh b26ca0e21a Maintain hierarchy navigator expansion state between edits.
Prevent the hierarchy navigator from being rebuilt unless there are actual
sheet changes that would cause a change to the tree.

Save the tree expansion state before rebuilding the tree and then restore
the expansion state to the previous state sans edits.

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

(cherry picked from commit 797ab998cc)
2024-04-11 10:32:40 -04:00
Alex Shvartzkop 97b15a1708 Show actual IO_ERROR message at VRML import.
https://gitlab.com/kicad/code/kicad/-/issues/17727
2024-04-11 14:36:44 +03:00
Seth Hillbrand e808ab7409 Re-add routine to remove duplicate points
The router needs to elimitate duplicate points but keep colinear
segments.  This re-creates the partial routine from the old Simplify()
function

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

(cherry picked from commit 59f99d9a6a)
2024-04-11 14:20:50 +03:00
Huang Rui 7dc8527022 libgit2-1.8.0 compatibility: adjusted parent pointer type
- Adjusted parent pointer type in git_commit_create call for compatibility
  with libgit2 1.8.0 and above.
- Included preprocessor checks to maintain support for versions older than
  1.8.0.
- Ensures consistent function behavior across different libgit2 versions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536
Signed-off-by: Huang Rui <vowstar@gmail.com>


(cherry picked from commit 1cbf6a1872)
2024-04-11 08:45:19 +00:00
afkiwers f7765ea5b9 add support to update an already existing field
(cherry picked from commit d45911f54b)
2024-04-09 23:37:52 +00:00
Marco Ciampa f1d687cfdb Updated Italian translation 2024-04-08 23:17:23 +02:00
Marek Roszko 57468c29f9 Use kicad-vcpkg fork of liblzma to fix builds
(cherry picked from commit 6ac1f39e62)
2024-04-07 14:55:55 +00:00
Jon Evans 30df673ffa Check for bus no-connects in ERC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13285


(cherry picked from commit ce846f5c22)
2024-04-07 12:50:45 +00:00
Jon Evans 55b7852a65 Disable lazy-loading of 3D models on macOS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17198


(cherry picked from commit b36312ff24)
2024-04-07 12:21:11 +00:00
JamesJ 026685ee48 Check a SHAPE_POLY_SET outline exists before attempting to get it by index
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17687
2024-04-06 20:17:39 +02:00
Jon Evans 8b5c292397 Fix SWIG wrapper for AddPrimitive
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17676


(cherry picked from commit c1e7668d80)
2024-04-05 03:09:35 +00:00
Marek Roszko 941420abed Add missing gltf find in occ 7.8
(cherry picked from commit 58913a0616)
2024-04-03 01:07:18 +00:00
Jon Evans a042d1aab4 Show all library children if library name matches search 2024-04-02 18:51:19 -04:00
Jon Evans 53c2543474 Fix parsing of legacy text hide token 2024-04-02 18:26:30 -04:00
Alex Shvartzkop bac0820864 Improve moving, rendering and plotting of very small angle arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17110


(cherry picked from commit b905b4eac8)
2024-04-02 21:41:09 +00:00
Seth Hillbrand e0381f25f7 Prevent OOB access in polygon split
Check for vertex placement against original size.  Since we are
potentially adding vertices that are out of order with the original
polygon, we only want to check against the first set of vertices when
checking for polygon collision

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

(cherry picked from commit 8260c174e9)
2024-04-02 11:23:30 -07:00
Mike Williams ce2ea3f3ae PCB: update footprint field when changing footprints
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17598
2024-04-02 08:18:23 -04:00
Seth Hillbrand c0d38de280 Add some corrections to IPC2581 export syntax
Outline fonts need lineDesc
Padstack def need the location for the pad relative to the padstack

(cherry picked from commit 2123e2ca9c)
2024-04-01 22:59:40 -07:00
Marek Roszko 9a728c37df Use macro not function for the occ lib find
(cherry picked from commit 303bc19ce8)
2024-04-02 01:55:08 +00:00
Seth Hillbrand 6be6210b67 Recreate teardrop QA board for v8 2024-04-01 17:55:29 -07:00
Seth Hillbrand b21165722b Forward and reverse test for point in poly collisions
(cherry picked from commit 4e6cd0d293)
2024-04-01 17:55:29 -07:00
Seth Hillbrand fd5d68ca9b Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

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

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9f26cbb89a Add colored tab to fileicons
Allows differentiation when Windows badges the bottom left

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

(cherry picked from commit e11cc322fd)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 0dc894356b Check singular arcs connection
Even if there are no other segments in the line chain, we still should
check for arc connections in cases of individual arcs on a line chain

(cherry picked from commit 6b915049d1)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6b5acdea1f When dragging a via, we need to get all obstacles
The clearance epsilon should not be used to limit which force elements
we return in the query.  Otherwise, we can drag elements into a
DRC-violating space

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

(cherry picked from commit 5e850911c5)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 892c5726f5 Move logging message after vertex check
When creating the list, we may have fewer than needed vertices, which
prevents calculating the area

(cherry picked from commit 6c05f2c67c)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6c7261a223 Utilize hash_combine to avoid hash collision
Most of our pointers will share the top 32 or more bits of their pointer
addresses, making cache collisions highly likely.  This uses a hash
combiner to mix the bits more effectively

(cherry picked from commit e4756c811e)
2024-04-01 17:55:29 -07:00
Seth Hillbrand ae11213622 Handle small holes in DRC Connection width test
If there is a small hole (smaller than the conn width), we can loop
around in a circle checking all points and not move past the mimimum
distance.

To avoid this, if we detect a loop, we exit the substantial checker.
This should return with true because a large hole will return true and
we are only checking to see if there is a minimum amount of copper
between two open areas

(cherry picked from commit c841d0df6d)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 4bf35cbed8 Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

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

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 7916e56963 Avoid crashing on missing tracks in CADSTAR
We can't assume that the ignored connection exists when trying to set
the junction size.  We use int_max for the default instead of 0 so that
later, we don't try to create a minor track with 0 width in loadNets()

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

(cherry picked from commit 00d108498f)
2024-04-01 17:55:29 -07:00
StefanBruens b9b4ff6f5e Fix triangulationValid check race for zone fill
The m_triangulationValid flag is used in several places without holding
the mutex, thus it should only ever be set when the triangulation is
guaranteed to be valid.

This can either be done by protecting both data and flag by the same
mutex, or updating the flag only after the triangulation has finished.

Also fix the case when the triangulation actually fails, the flag should
not be set in this case.

While at it, simplify the recalculation check. Only if both the
triangulation is valid, and the data hash is unchanged the recalculation
can be skipped - this is typically the case when two threads try to
update the cache concurrently, the second one will block at the mutex,
and will see the valid data after the first thread has finished.

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

(cherry picked from commit e07b4ce8e4)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 734222bd88 Fix race condition in zone fill
When checking collisions, the SHAPE_POLY_SET::Collide() routine is not
const because it will regenerate the triangulation cache if it is out of
date (using a const_cast, grrr).  This sidesteps the issue by assigning
a mutex to the triangulation caching

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

(cherry picked from commit 81cb6d0c3f)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 01590385c7 Handle issue with alternate SHAPE_LINE_CHAIN
SHAPE_LINE_CHAIN_BASE can include things that are not SHAPE_LINE_CHAIN
like the triangle SHAPE_LINE primitive.  To check arcs, we need to avoid
these elements as they do not have the full SHAPE_LINE_CHAIN class
available.

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

(cherry picked from commit 347c50b26d)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9be4bf0d14 Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

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

(cherry picked from commit 3cc1617f5a)
2024-04-01 17:55:29 -07:00
Seth Hillbrand b1677d5f47 Clean and standardize cross-probing action
Between schematic and pcb editors, we want the following actions:

- Single click on ERC/DRC item should show the item in the ERC/DRC
  window.  But if the window is not visible, it should only update the
  status bar
- Double click on ERC/DRC item should show and raid the ERC/DRC window
  as well as select the line item

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

(cherry picked from commit 0f57d76ecd)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 1e13a7640e Tidy up some remaining triangulation cases
Found and fixed a few corner cases where triangulation point removal
could reset expected points

(cherry picked from commit 553e4a25bf)
2024-04-01 17:55:29 -07:00
Marek Roszko 804283877c Fix cmake find of opencascade libraries for occt 7.8
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17654


(cherry picked from commit c8e41dcfe8)
2024-04-02 00:50:12 +00:00
jean-pierre charras 65ace8d03d 3D viewer: Allow setting colors not in board stackup, when use board stackup option is set.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17632
2024-04-01 09:38:24 +02:00
Seth Hillbrand 890376d04f Do not use cache when we modify vertices
When we add vertices to the tesselation routines, we cannot reuse these
without the original vertex points.

It may be possible to copy and modify the vertices from the hint data so
that they are properly positioned but naive attempts (moving based on
first point) did not work, so for now, we disable the hint cache when
the vertex sizes do not match as this prevents OOB access

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

(cherry picked from commit 06b199fd41)
2024-03-31 15:01:16 -07:00
JamesJ 18990587b9 Only delete grouped / generated BOARD_ITEMS from the root item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527

This is required as during an undo / redo operation, rebuilding
the previous selection can result in a group / generator being
selected as well as all of their contained items. This prunes
the contained items to remove the possibility of a double-delete.

(cherry picked from commit 6c73f1feef28925bf26fcc3669cb6333aad5f1d3)
2024-03-30 14:20:58 +00:00
James J 75ef003747 Add option to preserve custom power flag values in Update Symbols from Library dialog
(cherry picked from commit bf7896a0e1)
2024-03-30 14:15:29 +00:00
Marek Roszko b9a6f47929 Fix DRC slowdown due to UI yields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17434


(cherry picked from commit fd501b4bc8)
2024-03-30 03:34:27 +00:00
Jeff Young 857219d70d Fix merge error. 2024-03-29 18:26:14 +00:00
Jeff Young 92275c41cc ADDED: Expose units and DeMorgan to properties system.
(Also fixes inheritance bug in LIB_PIN's properties.)

(cherry picked from commit 58df9c96f4)
2024-03-29 17:49:48 +00:00
Jeff Young 09985988e7 Fix footprint undo for new UUID caches.
The footprint's children get swapped by the parent's std::swap
call, so they need to get removed/added to their parent around
the swap.

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

(cherry picked from commit 2c21ef1ed0)
2024-03-29 17:48:12 +00:00
Jeff Young 524d431438 More defensive coding for KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit 2f2c42a06b)
2024-03-29 17:46:07 +00:00
Jeff Young ccd052cc99 Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit a53bc9e026)
2024-03-29 17:46:04 +00:00
Jeff Young 1f461c7508 Close active cell editor when showing/hiding columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17425

(cherry picked from commit f3ce3bc758)
2024-03-29 17:45:35 +00:00
Jeff Young 4bea619855 Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543

(cherry picked from commit fc572bfbc6)
2024-03-29 17:45:13 +00:00
Jeff Young f3621496fb Don't show hidden text in symbol previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17526

(cherry picked from commit 1e6eb652aa)
2024-03-29 17:44:47 +00:00
Jeff Young 1238c081c6 Expose groups to property manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17496

(cherry picked from commit 82c851a4a7)
2024-03-29 17:44:14 +00:00
jean-pierre charras 663e857df6 3D viewer: fix some graphic issues:
Avoid issue when a copper layers thickness is 0 (min value is now 1 micrometer)
Fix incorrect rendering of plated graphic items and vias (vertical walls not drawn)
From master branch
2024-03-29 07:39:49 +01:00
Seth Hillbrand 92ffd898f5 Update triangulation to handle poly-intersection
Polygon intersections happen against the original outline, not against
the currently remaining polygon.  This avoids pathalogical cases

Adds new simplification system to avoid duplicated points
Adds new edge-splitting algorithm to provide additional fall-back
Verifies that polygon cuts do not swap holes for outlines (negative
area)

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

(cherry picked from commit c3f6a84d66)
2024-03-28 13:55:06 -07:00
Céleste Wouters 76e0f94532 Improve SHAPE_POLY_SET fracture performance
Refactors `SHAPE_POLY_SET::fractureSingle()` to be more efficient, while
not changing the actual algorithm:

* increase cache locality by using contiguous arrays instead of what was
effectively a linked list
* reduce latency and jitter by replacing per-edge allocator calls with
ahead-of-time std::vector reserves
* increase cache efficiency by making the vertex struct smaller
* replace O(n^2) leftmost edge search with O(n log n) std::sort
* sort the polygons instead of the edges
* cut iteration count in half in the remaining O(polygons * edges) part

(cherry picked from commit e98c9f283f)
2024-03-28 13:10:43 -07:00
Seth Hillbrand ff2d0cfb10 Fix typo in triangulation return
(cherry picked from commit a793fa8b17)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 1cc10be443 Skip small triangles
The minor triangles cost the same amount of compute time as larger ones
but do not have a material effect on the zone display.  This skips these
minor triangles when earcutting

(cherry picked from commit a58e7b37ff)
2024-03-28 13:10:43 -07:00
Seth Hillbrand d2db96886d Add logging and area check to tesselation
Logging is useful when we find an area that cannot be triangulated.
This will be used to generated test cases.

Skipping minor untesselated areas means that the polygon will still be
considered fully tesselated (and not sent back again and again) even if
the tesselation misses an area less than the configured limit.
Currently, this is 31^2nm.

(cherry picked from commit 7e7fec69f6)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 3d4a7c7c3f Update triangulation
(cherry picked from commit 4f03bb2fb6)
2024-03-28 13:10:43 -07:00
arturo182 d46139d5e3 kicad_advanced: Make OCE tesselation deflection configurable
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17168

(cherry picked from commit 41147dc3b3)
2024-03-28 13:10:43 -07:00
Seth Hillbrand 40f938dc75 Sort netnames in properties panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15590

(cherry picked from commit c3a5b92ed0)
2024-03-28 13:06:18 -07:00
JamesJ 30dbafaf7c Use bulk BOARD_LISTENER calls following undo or redo operations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17561
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17420

(cherry picked from commit f51e775f26)
2024-03-24 19:39:25 +00:00
Alex Shvartzkop 05dedbd892 Fix spelling mistake.
(cherry picked from commit bd59fb7768)
2024-03-23 18:43:47 +00:00
Alex Shvartzkop c0dba1e00d Don't print unnecessary digits after decimal point for imperial units.
1 nm = 0.00003937 mils = 0.00000003937 inches,
So there's no reason to print more decimal places than 5 for mils and 8 for inches.

Related: https://gitlab.com/kicad/code/kicad/-/issues/15539


(cherry picked from commit 93581607a8)
2024-03-23 18:40:11 +00:00
JamesJ cc3e57b52f Don't re-highlight nets on every bulk segment change in net inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17068
2024-03-23 15:35:21 +00:00
Alex Shvartzkop 70a6697c16 Fix warning due to unused angle in EasyEDA Pro schematic parser.
(cherry picked from commit 1c7e3871b5)
2024-03-23 14:52:05 +00:00
wh201906 869f30e291 Add toggleHV45Mode item to the measure tool's context menu
The behavior of the measure tool is influenced by the
horizontal/vertical/45-degree mode, but the context menu of the measure
tool lacks an option to toggle this mode. In contrast, the drawing
tools are also affected by this mode, and their context menu has the
item to toggle this mode.


(cherry picked from commit 806daecf85)
2024-03-23 13:33:32 +00:00
Jeff Young 4c78652690 Ignore graphic shapes that implement netties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit 88c1fa3e26)
2024-03-23 13:19:37 +00:00
jean-pierre charras afcda88ee3 GERBER_JOBFILE_WRITER: use UTF8 encoding according to current specif.
Since 2020, non ASCII7 chars are encoded using UTF8 encoding.
A old but incorrect encoding was previously used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17534
2024-03-22 10:09:47 +01:00
dsa-t 605fe4ce99 Disallow cross-probing when not on Symbol Fields Table Edit tab.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17531


(cherry picked from commit db12f2af49)

ce625541 Disallow cross-probing when not on Symbol Fields Table Edit tab.
2024-03-21 19:09:34 +00:00
Jeff Young a3ee317277 Fix copy/pasta in tooltips.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17515

(cherry picked from commit 913e6b47d7)
2024-03-21 18:19:48 +00:00
Jeff Young f7bce264bb Don't take too long worrying about very small exposed areas.
(And in particular, don't take forever if the min / 10 results
in step being 0.)

(cherry picked from commit b285545aee)
2024-03-21 18:19:48 +00:00
jean-pierre charras dfe6cb7afa Do not run DRAWING_TOOL::PlaceTuningPattern() inside the footprint editor
The footprint editor cannot run the router.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17522
2024-03-21 15:22:13 +01:00
jean-pierre charras 8bdc62c111 Avoid using a nullptr. 2024-03-20 18:35:26 +01:00
Alex Shvartzkop 350687f355 STEP export: add location info to edge add failures.
(cherry picked from commit 800ff9ffb1)
2024-03-19 23:11:20 +03:00
Alex Shvartzkop 3a5a911012 STEP export: handle small segments connecting two arcs better.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17499

(cherry picked from commit 75037dd1d1)
2024-03-19 22:55:17 +03:00
Roberto Fernandez Bautista b40d19eb79 nanodbc: Fix use after free
Cherry picked from upstream commit e24383436703c9151af1e22652e7d4dbbb52fc15

https://github.com/nanodbc/nanodbc/commit/e24383436703c9151af1e22652e7d4dbbb52fc15
(cherry picked from commit 69107816f1)
2024-03-19 18:56:43 +01:00
jean-pierre charras 3e4ca3a1c7 Step exporter: workaround to fix issue for boards with main round outline
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17446
2024-03-19 16:13:13 +01:00
Mark Roszko 663918107e Add missing text var override to cli gerbers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17283

(cherry picked from commit d904535a15)
2024-03-19 14:35:30 +00:00
Mike Williams 1ac1f0445f prettifier: add newlines to golden samples 2024-03-19 09:46:42 -04:00
Mike Williams bce982877c prettifier: add newline to end of file
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17480
2024-03-19 09:46:42 -04:00
Jeff Young 9704543b7a Don't assume all glyphs are outline with an outline font.
Underline and overbar may be stroke glyphs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17478
2024-03-18 22:20:44 +00:00
jean-pierre charras f90c3ef075 hotkey selector dialog: accept hotkey using Alt key modifier on Windows.
On Windows, Alt key is specific, and the dialog did not accept the modifier

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17453
2024-03-18 18:19:39 +01:00
wh201906 11177bf658 Fix selected item count in the properties panel
The code for updating selected item count is skipped if the properties
items don't change.


(cherry picked from commit 3f2e3d89e2)
2024-03-17 22:27:05 +00:00
Jeff Young 81f55dfc9c Fix layer swapping for multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17371

(cherry picked from commit 44c14b1935)
2024-03-17 12:40:58 +00:00
Roberto Fernandez Bautista c935ef890a Database library cache: fix memory leak
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17435

(cherry picked from commit 4851b0f1ac)
2024-03-17 11:41:46 +01:00
jean-pierre charras 71af5b106a Demos update 2024-03-16 14:55:47 +01:00
jean-pierre charras d24012bef5 Revert "Demos update."
This reverts commit b4131f2575.
Files from 8.99 were committed by mistake
2024-03-16 14:55:47 +01:00
Wayne Stambaugh e904731e28 Do not update schematic connectivity for irrelevant property changes.
Prior to this change, the schematic connectivity was updated any time a
change was made to a connectable object.  Now the connectivity is only
updated when an object change actually affects the connectivity.  Other
properties like line width, fill type, custom fonts, etc. will not cause
the connectivity graph to be rebuilt.

The SCH_COMMIT flag SKIP_CONNECTIVITY has been removed.  All schematic
objects can test if they are connectable and if there have been changes
to any connection properties that require a connectivity rebuild.

Remove duplicate rebuild connectivity calls from editor control tool.
This was causing the tangling end test to get called four times on every
undo and redo action because the dangling end test is already called in
the connectivity graph calculation code.

Update connectivity when changing label names which fixes an unreported
connectivity bug.

(cherry picked from commit c5a02fc266)
2024-03-16 09:36:56 -04:00
Mojca Miklavec dcd304c5d8 Change the platform detection order
Make sure that windows-specific getWindowsKiCadRoot() is only called on Windows


(cherry picked from commit 01cb1543bb)
2024-03-16 12:23:04 +00:00
Jeff Young 8275176792 Report location of FUTURE_FORMAT_ERRORs when reading footprints. 2024-03-15 22:47:00 +00:00
Jeff Young 8589bd3773 Correctly handle locked token for PCB_TEXTBOX and PCB_TABLECELL.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17439

(cherry picked from commit d17151ac1b)
2024-03-15 22:24:53 +00:00
Jeff Young c07604bb03 Add autocomplete accept & cancel to the hotkeys list.
(cherry picked from commit da2610b93b)
2024-03-15 22:24:53 +00:00
jean-pierre charras b4131f2575 Demos update. 2024-03-15 15:41:16 +01:00
jean-pierre charras b718c228fe Symbol Editor: do not allow to select fully invisible pins and fields
Of course, invisible pins or fields shown by using option Show invisible
pins or Show invisible fields can be selected.
From master branch
2024-03-15 15:03:38 +01:00
jean-pierre charras 3d04d78f76 Symbol Editor do not display bounding box of invisible pins and fields 2024-03-15 15:03:38 +01:00
Yon Uriarte 6ebccdecc6 Responsive: Avoid excessive repaints when toggling a netclass' rastnest visibility.
Toggling netclasses visibility toggles the member nets' visibility one by one. Defer redrawing until all toggling is done.

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

(cherry picked from commit 4e8e14ae3a)
2024-03-15 09:45:09 -04:00
Yon Uriarte 4e8d6de1de Responsive: OPENGL_GAL::DrawArc reserve linequads to reduce drawing time
(cherry picked from commit 77576e1a80)
2024-03-15 09:45:09 -04:00
Yon Uriarte 8b281b4d1c Performance: Cache BOARD::GetMaxClearanceValue
(cherry picked from commit fe1c73ed7c)

1b35a512  Performance
2024-03-15 13:34:19 +00:00
Wayne Stambaugh 8ce12fb1af Fix Eagle footprint library QA test failure.
Unfortunately the KiCad library I/O does not unescape file names so do not
escape them in the Eagle board plugin.

(cherry picked from commit cf97432833)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh 9e4efe5d72 Fix Eagle board import when footprint library versions exist.
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.

The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.

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

(cherry picked from commit 34ec57958d)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh ab6c64b49a Clean up debugging output accidentally left in previous commit.
(cherry picked from commit 33566f88a9)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh dd71173263 Fix broken paste special keep existing symbol annotations.
This was only broken for symbols on the sheet where the symbols were
copied from.  The symbol annotation for all sub-sheets was preserved.

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

(cherry picked from commit 0ff8d21459)
2024-03-15 07:59:20 -04:00
Alex Shvartzkop 89ed09744b Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351

(cherry picked from commit b56ee20e22)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop ddec1d5317 Disable infinite panning when using XWayland.
Cursor warping doesn't work properly in this scenario.

https://gitlab.com/kicad/code/kicad/-/issues/14109
(cherry picked from commit 463b609993)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 50dd6185bb Do not write alpha to the main framebuffer when performing antialiasing.
This allows correct background display when the main framebuffer has alpha.
Noticeable on Wayland with Mesa 24.0.2 Iris driver.

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

(cherry picked from commit bf6ff5b805)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 6df17bba99 Fix rendering/plotting of arcs with tiny angle and huge radius.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17343

(cherry picked from commit 4d66a8ebdb)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop ed89827908 Fix zone cross-probing from DRC dialog.
(cherry picked from commit aa68a3817a)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop b61f6c35c7 Fabmaster (CADENCE ASCII): import dimensions graphics.
See https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit a4da829ccc)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop f9253485da Fabmaster (CADENCE ASCII) import: fix position and orientation of footprint graphics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit cb4ace5561)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 7dc554ec34 EasyEDA Std: fix importing footprints from footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17264

(cherry picked from commit 30573beb48)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop c7608c4bad EasyEDA Std: support multiple schematic sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17219

(cherry picked from commit c056ef407a)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 10ca34e2a7 EasyEDA Std: support Dot and Clock symbol pin styles.
(cherry picked from commit cc181df916)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop e4fc918b11 EasyEDA Std: hide invisible text in symbols.
(cherry picked from commit 69b15e83c5)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop c1a21c9ab1 EasyEDA Pro schematic: place items on root sheet when it's the only sheet.
(cherry picked from commit 563278d0f6)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 4ac848f18a EasyEDA Std PCB: fix crash when Name/Prefix type text is not in a footprint.
(cherry picked from commit 951c550c1e)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop 46faa0f678 Fix assert in BOARD_ADAPTER::createLayers.
(cherry picked from commit f9ad0a434d)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop 4072bc05af Define __cplusplus according to C++ standard version on MSVC.
Otherwise, macros like KI_FALLTHROUGH are not defined properly.

(cherry picked from commit fa6dc95553)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop e196f71d58 Support Altium Schematic ASCII import
(cherry picked from commit defcb49ac8)
2024-03-15 01:17:49 +03:00
Jon Evans b9d3b571bc Allow specifying a minimum for a via_count constraint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17234


(cherry picked from commit 3a3ceb8ffc)
2024-03-14 21:01:30 +00:00
Jon Evans 816e3efbd5 Fix a few LIB_TREE search issues
Don't apply pruning to libraries that don't have
any children, since the point of the pruning is to
hide libraries that don't directly match a search
term if they don't have any children that match.

Fix searching for full LIB_IDs that got broken by
the implementation of "AND"

Fix searching for library names alone

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


(cherry picked from commit 0c2a084a47)
2024-03-14 21:01:13 +00:00
Jon Evans 8afbe544a3 Set description on Altium imported symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16943


(cherry picked from commit 4bc69183ab)
2024-03-14 21:00:58 +00:00
Jon Evans c7b7830495 Add environment variable for configuring stock data home
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15687


(cherry picked from commit 9b54537e38)
2024-03-14 21:00:40 +00:00
Jeff Young af3654d389 Reset penWidth before stroking.
(PlotPoly will have set it to "1".)

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

(cherry picked from commit f22f5f47cb)
2024-03-14 18:07:53 +00:00
Jeff Young 838cefaf48 Default is a valid netclass, even if it's not in m_NetClasses.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17388

(cherry picked from commit dac16a02cc)
2024-03-14 18:07:48 +00:00
Jeff Young 4dca966c5d Don't test non-overlapping non-through-hole vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17426

(cherry picked from commit a091767551)
2024-03-14 18:07:28 +00:00
Jeff Young 2609882346 Update m_LastLegendPosition after setting dirty bit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17411

(cherry picked from commit 7341d4bf37)
2024-03-14 18:07:07 +00:00
Jeff Young 36fc9191b9 Remove netclass/custom rule handling from Track & Via Properties.
(These should be done in Edit > Edit Track & Via Properties.)

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

(cherry picked from commit 4b6a1f4dbd)
2024-03-14 18:06:44 +00:00
Jeff Young 4583522ea2 Make Edit Track & Via Sizes "specified sizes" dropdowns clearer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17216

(cherry picked from commit 1844bf1708)
2024-03-14 18:06:41 +00:00
Jeff Young f0e2adc3df Don't allow selection of footprint text in board editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17271

(cherry picked from commit 25e181db5c)
2024-03-14 18:06:11 +00:00
Jeff Young 091b34c05f Don't show normal cut/copy/paste items in Signals grid.
(Do allow a copy of signal names though.)

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

(cherry picked from commit ed61c5593f)
2024-03-14 18:05:47 +00:00
Jeff Young 09bc9cd77a Grid properties for GerbView.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17372

(cherry picked from commit 1152b0462c)
2024-03-14 18:05:18 +00:00
Jeff Young e893ed4590 Pass symbol's netlist to footprint preview widget.
This allows us to show the pin functions on the corresponding
pads.

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

(cherry picked from commit 72ba31ba27)
2024-03-14 18:04:52 +00:00
Jeff Young c0ad519e53 Run Edge.Cuts & Margin clearance tests on zone layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17292

(cherry picked from commit d1d9636598)
2024-03-14 18:04:06 +00:00
Jeff Young 03af8dcc88 Convert OP text variables pin names/numbers to SPICE vectors.
Also fixes a wrap-around bug in SPICE_VALUE::Normalize() where
it would lose the run of itself if the value was already
normalized to either the largest or smallest UNIT_PREFIX.

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

(cherry picked from commit ff8ddae9bd)
2024-03-14 18:03:42 +00:00
Jeff Young 45e17307a1 Resolve double-indirection CURRENT_DATE in title blocks.
If ${COMMENT1} resolves to ${CURRENT_DATE} then we need to resolve again.

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

(cherry picked from commit da634a618f)
2024-03-14 18:02:50 +00:00
Wayne Stambaugh 357226eb71 Begin version 8.0.2 development. 2024-03-13 11:58:22 -04:00
Wayne Stambaugh ac408046cf Tag release version 8.0.1. 2024-03-13 11:55:00 -04:00
Jeff Young 1b3cf70eef Fix copy/pasta in GetLayerColors().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17374

(cherry picked from commit c8d897ed0f)
2024-03-11 17:48:32 +00:00
jean-pierre charras d295014a8c DIALOG_ERC: fix crash when set to ignore a an ERC violation.
If a ERC violation is set to ignore, all corresponding markers are deleted.
But if one of these markers is selected, a crash happens.
Now all selected objects are deselected before deleting markers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17375
2024-03-11 14:30:08 +01:00
jean-pierre charras c0fd138706 Pcbnew, pdf plotter: fixes and enhancements.
* To select a footprint info, Use the bbox with not text as selectable area
* Fix also incorrect position of footprint bbox when plotting with offset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17355
2024-03-10 13:09:41 +01:00
jean-pierre charras 2af35ac4f1 Gerbview: update view items after reordering/modifying view layers.
Previously, after updating the gerber layer order, displayed D_codes where
not always those corresponding to the active layer.
2024-03-09 18:15:17 +01:00
Wayne Stambaugh b7a193dc3a Tag stable version 8.0.1 release candidate 2. 2024-03-09 07:26:46 -05:00
jean-pierre charras 79e264249c GERBVIEW_FRAME::RemapLayers(), fix incorrect handling of layers visibility
When modifying the gerber layers visibility, other (non gerber) layers must
be not modified.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17282
2024-03-09 08:59:56 +01:00
Seth Hillbrand 51d335c0e8 Temporary fix to disable zone-zone clearance display
When selecting two objects, we display the measured clearance between
them.  This can be problematic with large zones as they have thousands
of triangles.

This is a temporary fix for 8.0.1 to disable the check until we have a
performant version

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

(cherry picked from commit 686a62cbe6)
2024-03-08 10:32:37 -08:00
Seth Hillbrand 2f010e77ea Update Translations 2024-03-07 23:59:22 +01:00
pominglee 848dbb4d43 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.5% (8568 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:16 +01:00
Pedro Moreira 6384e7aea5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:16 +01:00
김랑기 519e7bbfd4 Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:16 +01:00
Pedro Moreira 1ad15075f8 Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:16 +01:00
pominglee e21b4517d6 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.4% (8561 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:15 +01:00
CloverGit 31c756addb Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:15 +01:00
김랑기 4ea53e045b Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:15 +01:00
Tokita, Hiroshi 4ceb03a9ce Translated using Weblate (Japanese)
Currently translated at 99.6% (9125 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ja/
2024-03-07 23:56:15 +01:00
109247019824 d0b840697b Translated using Weblate (Bulgarian)
Currently translated at 7.6% (700 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/bg/
2024-03-07 23:56:15 +01:00
pominglee 57b6e5cb85 Translated using Weblate (Chinese (Traditional))
Currently translated at 93.4% (8559 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hant/
2024-03-07 23:56:15 +01:00
Nguyễn Ngọc Khánh fb3790398d Translated using Weblate (Vietnamese)
Currently translated at 20.9% (1915 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/vi/
2024-03-07 23:56:15 +01:00
YÜKSEL AÇIKGÖZ 2a3e2d8f9f Translated using Weblate (Turkish)
Currently translated at 57.4% (5267 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-03-07 23:56:15 +01:00
Wellington Terumi Uemura 0f260d51c5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:15 +01:00
Laurens Holst 28afbe37ec Translated using Weblate (Dutch)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-03-07 23:56:15 +01:00
CloverGit 13aafe828f Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:15 +01:00
ZbeeGin 1769b565f7 Translated using Weblate (Polish)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:15 +01:00
Ranforingus a4ecb998aa Translated using Weblate (Dutch)
Currently translated at 99.5% (9118 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-03-07 23:56:15 +01:00
김랑기 a54af04f4e Translated using Weblate (Korean)
Currently translated at 99.9% (9160 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:15 +01:00
aris-kimi 4a260f74fa Translated using Weblate (Greek)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-03-07 23:56:15 +01:00
Jan Straka 984c777286 Translated using Weblate (Czech)
Currently translated at 79.6% (7301 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-03-07 23:56:15 +01:00
CloverGit 33ced12295 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9123 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:14 +01:00
Andrej Valek be6d07e962 Translated using Weblate (Slovak)
Currently translated at 64.3% (5895 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
pedrolinharesmoreira d0de1723ed Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.5% (9122 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pt_BR/
2024-03-07 23:56:14 +01:00
aris-kimi 39378fec87 Translated using Weblate (Greek)
Currently translated at 99.8% (9145 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/el/
2024-03-07 23:56:14 +01:00
CloverGit e8bf38fb24 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.5% (9120 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-03-07 23:56:14 +01:00
Andrej Valek d27f17cef8 Translated using Weblate (Slovak)
Currently translated at 63.3% (5808 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
ZbeeGin c43892814e Translated using Weblate (Polish)
Currently translated at 99.9% (9152 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:14 +01:00
김랑기 41b8e704b7 Translated using Weblate (Korean)
Currently translated at 99.9% (9157 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Pferd O b55c04ddfa Translated using Weblate (German)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/de/
2024-03-07 23:56:14 +01:00
김랑기 587c9f8a27 Translated using Weblate (Korean)
Currently translated at 97.6% (8948 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Henrik Kauhanen a8768b7a20 Translated using Weblate (Swedish)
Currently translated at 99.9% (9159 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sv/
2024-03-07 23:56:14 +01:00
Andrej Valek 10e8dfaca5 Translated using Weblate (Slovak)
Currently translated at 56.9% (5221 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-03-07 23:56:14 +01:00
dsa-t f2d9df65ff Translated using Weblate (Russian)
Currently translated at 100.0% (9161 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ru/
2024-03-07 23:56:14 +01:00
ZbeeGin 749ada552e Translated using Weblate (Polish)
Currently translated at 99.7% (9142 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/pl/
2024-03-07 23:56:14 +01:00
김랑기 044e7090be Translated using Weblate (Korean)
Currently translated at 96.9% (8886 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-03-07 23:56:14 +01:00
Toni Laiho 3a2b633e28 Translated using Weblate (Finnish)
Currently translated at 99.4% (9107 of 9161 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/fi/
2024-03-07 23:56:14 +01:00
Jeff Young 6ced4f72d0 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:02:16 +00:00
Armin Schoisswohl 0f8dac81cb add include <mutex> to fix compilation under linux 2024-03-07 12:13:42 +00:00
Armin Schoisswohl 1f1b97212b change m_CachesMutex to shared_mutex and do shared locking for read access in zone BBox calculations 2024-03-07 12:13:42 +00:00
Armin Schoisswohl aff3064187 fix deadlock in DRC "Checking keeopouts & disallow constraints" 2024-03-07 12:13:42 +00:00
Armin Schoisswohl d1867bd728 protect cache lookups in pcbnew/zone by locking the mutex before calling find, fix #17237 2024-03-07 12:13:42 +00:00
Mike Williams 1b5e18d95f schematic: legacy kicad schematic files don't have a default description field
Without this, we would parse a legacy schematic symbol field at the same
index as the new description field's index into description, instead of into
a user field.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17202
2024-03-06 11:03:00 -05:00
Jeff Young b57184efe0 Apply anti-walk algorithm only to textboxes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16481

(cherry picked from commit 20efeef5ae)
2024-03-06 13:53:09 +00:00
jean-pierre charras 8a66a7eab0 PROPERTIES_FRAME: fixes a focus issue (perhaps Windows specific).
From master branch
2024-03-06 13:09:28 +01:00
jean-pierre charras e769fdfab0 Pcbnew: do not select a PCB_REFERENCE_IMAGE if the LAYER_DRAW_BITMAPS is not visible.
LAYER_DRAW_BITMAPS layer controls transparency and visibility of images on the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2024-03-06 13:08:07 +01:00
Jon Evans 31ae825b9d Prevent use-after-free of symbol screens
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17204


(cherry picked from commit 1600d8bead)
2024-03-06 03:54:14 +00:00
Jon Evans 98d26e77c9 Update a few more list/tree views for macOS
(cherry picked from commit 1988aac2b3)
2024-03-05 13:39:39 +00:00
Jon Evans 03120161d3 Fix macOS tree icons
Now that we have backported HiDPI support,
we need to actually use it because the old
imagelist functions are explicitly not going
to work on HiDPI systems anymore

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


(cherry picked from commit 34a6e605de)
2024-03-05 13:03:42 +00:00
Marek Roszko ec7abb7bff Fix update notification to use majorminorpatch
(cherry picked from commit 7933dee274)
2024-03-05 01:13:41 +00:00
Wayne Stambaugh fa2ccdd083 Tag stable version 8.0.1 release candidate 1. 2024-03-03 17:08:06 -05:00
Alex Shvartzkop 4096c073b7 EasyEDA Pro import: make sure to use UTF-8 for project.json and device.json.
Also catch exceptions.

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

(cherry picked from commit 219d0c399d)
2024-03-03 21:51:32 +03:00
Alex Shvartzkop 2ad3ccc4d8 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.

(cherry picked from commit 85b1978408)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop 3bab589405 Do not reload window sizes when changing 3D viewer settings.
(cherry picked from commit 337489c77d)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop fab52bd95a Add add_choices accepting std::vector to argparse for convenience.
(cherry picked from commit 1126227206)
2024-03-03 21:47:23 +03:00
Alex Shvartzkop 27e4b2276b Update argparse.
Otherwise .choices doesn't work properly.
See https://github.com/p-ranav/argparse/issues/307

(cherry picked from commit 991b4299d6)
2024-03-03 21:47:23 +03:00
Jan Wichmann 64f8310a94 Don't show hidden directories and files in the project tree browser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16207


(cherry picked from commit 5cdf9fe8a0)

4b9fffa3 Don't show hidden directories and hidden files in the Project tree browser
c433874c Changed file name conversation to utf16
aeba54ba Moved os-specific function to lib KIPLATFORM::IO
561709ac Implemented KIPLATFORM::IO::IsFileHidden for all plattforms
2024-03-03 16:47:38 +00:00
jean-pierre charras e765de6b3d PCB_PAINTER: do not draw PCB_SHAPEs on netname layer in FP editor.
Fixes #17250
https://gitlab.com/kicad/code/kicad/-/issues/17250
2024-03-03 17:02:19 +01:00
Wayne Stambaugh 742529da26 Update net navigator when cross probing from board editor net highlight.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16838

(cherry picked from commit 66925ec2a2)
2024-03-03 08:57:54 -05:00
jean-pierre charras b728eae651 plot_board_layers.cpp: when plotting pads, Save/restore corner radius ratio
instead of corner radius.
The corner radius comes from corner radius ratio, so saving/restoring the corner
radius can create rounding errors when trying to recalculate the ratio from the radius.
2024-03-03 11:58:11 +01:00
jean-pierre charras 676e70ec18 French translation update 2024-03-03 08:32:51 +01:00
Jon Evans 13fabb0564 Correctly handle footprint graphic knockouts for no-net case
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit ed18a9bcc2)
2024-03-02 20:39:56 +00:00
Jon Evans 4dc4b2bd51 Set schematic as default screenshot
(cherry picked from commit b8f4bef3f8)
2024-03-02 20:07:26 +00:00
Jon Evans 32e6f424ec Remove project manager from screenshots
It's not very important or visually appealing,
let's just use the editors as the way to represent
KiCad in software centers that show screenshots.


(cherry picked from commit fdc16fe60d)
2024-03-02 20:07:15 +00:00
Marek Roszko 3890278505 Make the update check cmake option default for all platforms
(cherry picked from commit 46f9a9a005)
2024-03-02 19:18:07 +00:00
Jeff Young 1664e02fa6 Don't draw the selection if it's not from the current screen.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17132
2024-03-02 18:56:57 +00:00
Roberto Fernandez Bautista 63ffca0173 Step exporter: handle circles correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17137
2024-03-02 19:11:14 +01:00
Roberto Fernandez Bautista ff4b59afeb kicad_cli fp ugrade: create directory with extension 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 64382a85fa SHAPE_LINE_CHAIN: Fix indices rotation after clipper
Also fix IsArcStart and IsArcEnd functions to work with chains that only
have arcs.
2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 4c51391cf6 SHAPE_LINE_CHAIN: Move .h definitions to .cpp
No functional changes, just allow faster rebuilds
2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 5add7a0ca0 SHAPE_LINE_CHAIN: Fix/unify constructors 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 8340779f5b SHAPE_LINE_CHAIN: Add test case of seg+large angle arc 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 01cc91850c Sanitise filename before saving footprint library 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 091f9c82e1 kicad_cli: Allow upgrade of legacy and non-kicad footprint libraries 2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista f7ddd211d9 kicad_cli: Allow upgrade of legacy and non-kicad symbol libraries 2024-03-02 18:22:18 +01:00
Jeff Young 8dce6c0b67 Don't steal command-keys from a wxGrid.
It's unlikely to win you friends.

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

(cherry picked from commit 1082930c34)
2024-03-02 15:29:00 +00:00
jean-pierre charras 655cee523b Eeschema: fix crash when editing a old legacy schematic with missing libs,
and trying to edit a dummy symbol. (crash due to a null pointer due to missing lib)
From master branch
Fixes #17232
https://gitlab.com/kicad/code/kicad/-/issues/17232
2024-03-02 15:32:37 +01:00
Jeff Young fa4d759fcb First alt-pin menu item must be fetched from the LIB_PIN.
(The SCH_PIN will return any alt function already assigned.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17221
2024-03-02 12:16:33 +00:00
jean-pierre charras 25b033df2a FOOTPRINT_CHOOSER_FRAME: rework on bottom panel to allow a long string in
the check box for filter by FP names to be displayed without overlapping other
widgets.
2024-03-02 12:51:16 +01:00
Jeff Young a0905ac87d Check for NETINFO_ITEM before dereferencing it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17230

(cherry picked from commit bd1d449cd3)
2024-03-02 11:37:58 +00:00
Yon Uriarte 3d67ab72c6 Performance
Cache VIEW_ITEM's bbox in VIEW_TREE for faster removals.

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

(cherry picked from commit 464f185387)
2024-03-02 00:06:24 +00:00
Seth Hillbrand ecb0c9b5d4 Limit where the intersection of two lines can be
This avoids generating lines where we are unable to select them because
they get too close to the border

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

(cherry picked from commit 0129191ec0)
2024-03-01 15:57:45 -08:00
Jeff Young 53d8e2c8c3 Separate "use board stackup colors" into separate checkbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17085

(cherry picked from commit 8dddd9cc2c)
2024-03-01 23:45:37 +00:00
Seth Hillbrand 22f66fdf2f Don't wait for unused events
We only need the UI update and mouse/keyboard while updating our DRC
window.  Waiting for other events gets into a race condition with the
schematic editor that can cause a hang

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

(cherry picked from commit 14667e2033)
2024-03-01 15:22:48 -08:00
Seth Hillbrand a7c09964ba Update contributors
(cherry picked from commit e7d4127f99)
2024-03-01 13:46:14 -08:00
Seth Hillbrand 1e03266dfe Do not re-number aperture pads
Aperture pads do not have numbers, so reserving space for them will
cause the actual numbered pads to become out of order

(cherry picked from commit d3334ed9f0)
2024-03-01 13:04:47 -08:00
jean-pierre charras 09f32d8c86 FOOTPRINT_CHOOSER_FRAME: Fix a UI problem specific to Linux
On the bottom on the frame, some widgets were not correctly placed.
Fixes #17217
https://gitlab.com/kicad/code/kicad/-/issues/17217
2024-03-01 20:08:49 +01:00
Alex Shvartzkop 67208df602 Improve 3D appearance manager preset compare.
(cherry picked from commit 656821b282)
2024-02-29 19:13:12 +00:00
Jeff Young 8047eed6f8 The ruler tool is not part of InteractiveEdit.
(In particular, it should not return true to IsEditorTool().)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-29 17:56:25 +00:00
Jeff Young dafd62ddba Unflip when going to viewport which isn't flipped.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13773

(cherry picked from commit c23550dc0b)
2024-02-29 17:38:32 +00:00
Jeff Young 41f9baf9dc Cleanup. 2024-02-29 17:38:18 +00:00
Jeff Young 1cd5827078 _() -> _HKI() for group names.
(cherry picked from commit d08e0e9eaa)
2024-02-29 17:38:18 +00:00
Jeff Young b07d43a24a Expose text size for SCH_FIELDs.
(cherry picked from commit 2dce618f9f)
2024-02-29 17:38:18 +00:00
jean-pierre charras 985c3ad92a GERBER_PLOTTER, round-rect aperture: ensure primitives have non null size.
for round-rect pads with a radius = 50% of the smaller dim, one of primitives
used to create the shape can have a 0 size.
Ensure a min size >= 10 nm (It should not create a actual change)
2024-02-29 18:07:02 +01:00
Alex Shvartzkop 978fa63490 Allow .kicad_sym in Import Symbol filters.
(cherry picked from commit cd27f801f6)
2024-02-29 14:36:57 +00:00
Alex Shvartzkop c59fac4089 Use a version string without the extra packaging info in drawing sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17176
2024-02-29 04:24:16 +03:00
Alex Shvartzkop 0dab086f0c EasyEDA Std import: support multiline text on PCB.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17171
2024-02-29 03:54:01 +03:00
Seth Hillbrand 7d1adff071 Store group id rather than group
We only need the group storage id for lookup.  Storing the KIID instead
of a copy of the group avoids unneeded overhead

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17175
2024-02-28 13:27:08 -08:00
Seth Hillbrand 38df918993 Correct usage signature for PNS_NODE::Add()
When moving a unique_ptr, you are actually passing the object, not a
reference to the object.  So we either std::move with the bare
unique_ptr parameter or we pass a reference.  But we should never pass
an rvalue reference for this or we'll make a copy without holding the
tracking (because it was moved)

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

(cherry picked from commit b2a25cb59e)
2024-02-28 10:11:20 -08:00
Seth Hillbrand f45df48498 Fix memory leak in net inspector dialog
(cherry picked from commit a8880fb63e)
2024-02-28 10:11:13 -08:00
Seth Hillbrand 898b5bd992 Update translations 2024-02-28 09:53:46 -08:00
Andrej Valek 100023e36f Translated using Weblate (Slovak)
Currently translated at 55.3% (5078 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
Andrej Valek d8ca6eda7e Translated using Weblate (Slovak)
Currently translated at 55.1% (5060 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
Andrej Valek 4d02817415 Translated using Weblate (Czech)
Currently translated at 79.8% (7326 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-02-28 18:50:56 +01:00
CloverGit ef281317ee Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9143 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-02-28 18:50:56 +01:00
Ivan Chuba 16ea51fe5c Translated using Weblate (Ukrainian)
Currently translated at 88.1% (8088 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/uk/
2024-02-28 18:50:56 +01:00
Mahsum Aslan b70ff8a120 Translated using Weblate (Turkish)
Currently translated at 51.2% (4705 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/tr/
2024-02-28 18:50:56 +01:00
Andrej Valek b3572c4ba2 Translated using Weblate (Slovak)
Currently translated at 53.6% (4921 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/sk/
2024-02-28 18:50:56 +01:00
김랑기 b8859df610 Translated using Weblate (Korean)
Currently translated at 96.3% (8838 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/ko/
2024-02-28 18:50:56 +01:00
CloverGit a26ed45b55 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (9142 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/zh_Hans/
2024-02-28 18:50:56 +01:00
Jan Straka cd3c2899d8 Translated using Weblate (Czech)
Currently translated at 79.8% (7325 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/cs/
2024-02-28 18:50:56 +01:00
Laurens Holst 74f1fadcf2 Translated using Weblate (Dutch)
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/nl/
2024-02-28 18:50:56 +01:00
Ulices 6de3859d2c Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (9176 of 9176 strings)

Translation: KiCad EDA/v8
Translate-URL: https://hosted.weblate.org/projects/kicad/v8/es_MX/
2024-02-28 18:50:55 +01:00
Jeff Young 04440d8506 Check env vars when testing for unresolved variables.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17174
2024-02-28 17:16:20 +00:00
Wayne Stambaugh 9508b79cc3 Fix sheet pin align to grid issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16920

(cherry picked from commit 141d03c266)
2024-02-28 12:00:01 -05:00
Alex Shvartzkop bec068324e Keep schematic text upright (especially when opening v6 schematic).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17082
2024-02-28 18:25:08 +03:00
jean-pierre charras b4e993e6e8 French translation update 2024-02-28 15:03:17 +01:00
jean-pierre charras 57b9b1b6b6 Add option to Footprint Chooser to switch between the selected fp or its 3D view
Fixes #16173
https://gitlab.com/kicad/code/kicad/-/issues/16173
2024-02-28 14:42:17 +01:00
jean-pierre charras fce4ec6a9b Eeschema, DIALOG_CHANGE_SYMBOLS: fix incorrect initial lib link name when
changing symbols: the "old" displayed link was in fact the new link because
the link was updated before the report is created.
Fixes #17162
https://gitlab.com/kicad/code/kicad/-/issues/17162
2024-02-28 11:23:35 +01:00
Alex Shvartzkop c4a7af8a47 Cairo GAL: fix endianness check. 2024-02-28 04:11:02 +03:00
Alex Shvartzkop d359fb8ab9 Cairo GAL: reduce buffer allocation sizes.
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.
2024-02-28 03:50:17 +03:00
Alex Shvartzkop 5618a6925d Cairo GAL: improve empty canvas performance (-80% CPU) 2024-02-28 03:50:17 +03:00
Jon Evans e383c67e7f Avoid nullptr dereference when loading group info
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17154


(cherry picked from commit 9e7b4b7f89)
2024-02-28 00:43:49 +00:00
Jon Evans 12dcdc8bbe Trivial change to avoid crash on tool re-entry
See https://gitlab.com/kicad/code/kicad/-/issues/17164


(cherry picked from commit 299b548a41)
2024-02-28 00:31:37 +00:00
Jon Evans bbd4cfd3d4 Force lib tree row height on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16403


(cherry picked from commit c3af434741)
2024-02-28 00:25:28 +00:00
Jon Evans a9e6031ae6 Remove unnecessary assert
GetModifyHash can be called before a row is loaded


(cherry picked from commit 31fab831ad)
2024-02-28 00:03:37 +00:00
Jon Evans 0b5c0ef639 Expose grid origin action in more places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007


(cherry picked from commit 0df5cf7f75)
2024-02-27 23:52:17 +00:00
Jeff Young 60dbd0ce0d Add wxGrids to list of things that get arrow keys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17144

(cherry picked from commit f754410c7e)
2024-02-27 18:12:40 +00:00
Jeff Young 1fc79b9a46 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16991

(cherry picked from commit a5fda819eb)
2024-02-27 17:16:53 +00:00
Jeff Young aba24ec781 Eagle text anchor points and alignment aren't linked.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17135
2024-02-27 14:59:18 +00:00
Jeff Young 952c154422 Fix wrong rotation centre.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17135
2024-02-27 12:46:22 +00:00
Jon Evans ffa1d19216 Don't rely on dynamic_cast across DLLs
See https://gitlab.com/kicad/code/kicad/-/issues/16998


(cherry picked from commit e9456201a7)
2024-02-27 03:11:17 +00:00
Jeff Young 5b303b268f Cancel autocomplete when STC loses focus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17124

(cherry picked from commit 539bd62a7b)
2024-02-26 22:31:29 +00:00
Jeff Young 50c5b56781 Improve SNR.
(cherry picked from commit d23ee7db3d)
2024-02-26 22:31:29 +00:00
Alex Shvartzkop 35192f5bd4 Initialize git_remote_callbacks structure. 2024-02-27 00:35:52 +03:00
Alex Shvartzkop d84a5e6f03 Initialize git_repository_init_options structure. 2024-02-27 00:25:04 +03:00
Jeff Young d94b0771ca Only change pin assignments from user interaction.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16349
2024-02-26 19:01:07 +00:00
Jeff Young 2f8f7c11f1 Handle single-source DC analyses correctly.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17119
2024-02-26 18:10:10 +00:00
Jeff Young 81c22542e4 Fix copy pasta.
(cherry picked from commit 43c45f3ee8)
2024-02-26 12:39:35 +00:00
jean-pierre charras c1755835eb Symbol editor: add option (view menu+toolbar) to show/hide invisible pins and fields
From master branch
Fixes #8020
https://gitlab.com/kicad/code/kicad/-/issues/8020
2024-02-25 17:40:40 +01:00
Jeff Young 11593a7c04 Revert IsAttached() fix as it doesn't handle hotkeys from the main menubar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17101

(cherry picked from commit 6ec51f6a69)
2024-02-25 15:48:19 +00:00
Jon Evans 46555ab975 Fix use-after-free in Altium importer
If the library already contains a symbol with the same name,
SaveSymbol will replace the existing symbol,
which will invalidate a cached pointer.


(cherry picked from commit d939004bbd)
2024-02-25 13:47:30 +00:00
Jeff Young 74339e9a9f Support pin count and footprint filters in symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17105
2024-02-25 13:13:54 +00:00
Jeff Young 2b09653abb Don't import invalid polygons.
If we *do* get a 2-point polygon in SVG, import it as a segment.

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

(cherry picked from commit dba2fdb6d3)
2024-02-25 12:29:02 +00:00
Alex Shvartzkop 1c639714f3 Fix update notice dialog padding. 2024-02-25 13:41:39 +03:00
Jeff Young 45910bc7c1 Don't double-add pads to commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17087
2024-02-24 23:25:23 +00:00
Jeff Young 87944e06ac Fix missing unit initialization.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17076
2024-02-24 22:35:05 +00:00
Jeff Young b37c7afa8a Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17086
2024-02-24 20:05:11 +00:00
Stefan 5713384f35 adding No Layers to apprearance manger presets, fix #15625
(cherry picked from commit ed6f900b70)

b650e80a adding No Layers to apprearance manger presets, fix #15625
6f8de6e3 fix codestyle
2024-02-24 15:44:53 +00:00
Jon Evans 99f9941067 Use deb_system Python sysconfig scheme on Debian 2024-02-24 10:38:55 -05:00
Alex Shvartzkop 339646a267 Remove 50ms delay seen in some actions, like duplicating schematic items. 2024-02-24 18:19:10 +03:00
Alex Shvartzkop 97ff48b426 Add bottom panel to have correct background in fp/sym chooser frames.
See https://gitlab.com/kicad/code/kicad/-/issues/15810
2024-02-24 15:17:28 +00:00
Alex Shvartzkop badc4e7411 Hide unused message panel in footprint/symbol chooser frames.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15810
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15889
2024-02-24 15:17:28 +00:00
Alex Shvartzkop 764de7257f Disable search ctrl cursor management on non-OSX.
Buggy at least on GTK and MSW.
2024-02-24 15:17:28 +00:00
Andrej Krpic 14d71c8ca6 Fix collecting of signals for S-Parameters analysis
(cherry picked from commit 006f93773c)
2024-02-23 20:35:36 +00:00
Yon Uriarte 7d5583f687 Performance UpdateDanglingState
Avoid O(N^2) by spatial sorting, don't run checks if the bounding boxes
don't overlap.
A second copy is ordered by type to help classes that only want to check
a few types having to walk the whole list.

(cherry picked from commit b7b64d959f)
2024-02-23 14:36:50 -05:00
Yon Uriarte ffd470d94d Performance SCH_EDIT_FRAME::SchematicCleanUp
Avoid O(N^2) comparisonis by spatial presorting. If bounding boxes don't
overlap there's no need to run expensive checks.

(cherry picked from commit f3c2083018)
2024-02-23 14:36:36 -05:00
Alex Shvartzkop 0184dfb625 Do not call MakeShapes in AddCopperPolygonShapes when polyset is empty.
Ease of debugging.
2024-02-23 22:14:03 +03:00
Alex Shvartzkop 711c6141a8 Highlight nets and show length tuning status when adding tuning patterns.
Also fixes length preview when hovering over joints.
Also prevents asserts when hovering over arcs.
Also prevents adding a tuning pattern on other tuning pattern.
2024-02-23 17:22:20 +00:00
Alex Shvartzkop fdf38256e8 Fix floating point rounding issues with scaled parameteres in settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17070
2024-02-23 17:22:20 +00:00
Alex Shvartzkop 7eeb1a19cf Fix net selector filter field focus on GTK. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop e68df8e1d1 Performance optimizations for database libraries. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop 3e26e7b646 Normalize SCH_PIN BBox to fix assert. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop a13e4e7d9f Eeschema: select graphical shapes based on effective shapes. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop 6feafedfbe Use correct text color in LIB_TREE selected items on non-OSX. 2024-02-23 17:22:20 +00:00
Alex Shvartzkop ed115075ce Add size range check to BOX2::Inflate. 2024-02-23 17:22:20 +00:00
jean-pierre charras be51c2ba73 teardrops: calculate better points on track for track arc.
Previously, a reference point to calculate teardrop length was calculated
using a track segment. It can create significant position error with track arcs.
Now a arc is used to find this reference point.
From master branch
2024-02-23 17:52:08 +01:00
Jeff Young 78b38cc75f Fix merge conflict. 2024-02-23 16:21:28 +00:00
Jeff Young c8495d81bb Update VDMOS models to ngspice-41 (and later) defaults.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17073
2024-02-23 16:06:55 +00:00
Jeff Young 6aaf2411f6 Apply Pad Properties teardrop terminology to Via Properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17050
2024-02-23 15:52:47 +00:00
Roberto Fernandez Bautista 3f47e03317 Thread safety: replace ++m_modHash by IncrementModifyHash()
(cherry picked from commit d464d7995b)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista 9004f92689 Add cache to SCH_IO_DATABASE to improve loading performance
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17031

(cherry picked from commit 991ddfe6be)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista a928299ae0 Legacy libraries: De-duplicate field names on load
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16902

(cherry picked from commit 07ab18a1e6)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista 1a7237f38b Altium: Don't create duplicate fields
(cherry picked from commit 420413969e)
2024-02-23 16:49:35 +01:00
Roberto Fernandez Bautista b3b6637b44 Altium: Don't load library parameters with an owner for now
In Altium many objects can have parameters (including pins). For now
we will drop library parameters belonging to any sub-components of a
symbol.

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

(cherry picked from commit 1a6e6a06eb)
2024-02-23 16:49:35 +01:00
Jon Evans ad311c33c6 Attempt to fix lib search again
The new bits will drop search results that
don't match all tokens in the search string,
which seems desirable.

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


(cherry picked from commit 589e21cd3b)
2024-02-23 14:37:20 +00:00
Jeff Young adae4de438 Don't use EQUALITY flag when doing a symbol diff with library.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16944
2024-02-22 23:37:50 +00:00
Jeff Young c8b06d54cb Update Edit Teardrops dialog to match other teardrop terminology.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17050
2024-02-22 23:37:48 +00:00
Jeff Young 51848a0b43 Code cleanup and compiler warnings. 2024-02-22 23:37:45 +00:00
Jeff Young 2d7f4faf72 Set up default netclass wire & bus widths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17024
2024-02-22 23:37:42 +00:00
Jeff Young c75bb5d01a Formatting. 2024-02-22 23:37:39 +00:00
Jeff Young df8f043c16 Improve layout of schematic colors preview.
Also, set pin name/number sizes.  Don't use defaults (which
will get plucked out of the Symbol Editor's settings).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17043
2024-02-22 23:37:30 +00:00
Jeff Young 01d668c09d Rule areas should be allowed on user layers.
Non-board tech layers too.  We don't know how people will
write their custom DRC rules.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17034
2024-02-22 23:37:26 +00:00
Jeff Young f4a3613561 Make sure nets get reassigned when name is changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17025
2024-02-22 23:37:23 +00:00
Jeff Young 12922d9434 Report fp library loading errors with libName & fpName.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16975
2024-02-22 23:37:20 +00:00
Jeff Young b6036f368e When updating RefDes only update the prefix.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16991
2024-02-22 23:37:18 +00:00
Jeff Young 25291d6e3a Check known m_Desc field before m_Fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16971
2024-02-22 23:37:15 +00:00
Jeff Young f4a085575a Show friendly name in toolbar button tooltips.
(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17009
2024-02-22 23:37:13 +00:00
Jeff Young a34b242f4e Delete empty Netclass fields only if there are others.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16997
2024-02-22 23:37:08 +00:00
Jeff Young 8a3cbce8f8 Comments. 2024-02-22 23:37:05 +00:00
Jeff Young a9c4a17c38 Repair copy/paste of footprint fields.
Some of the code got lost in the move to PCB_FIELDs.
2024-02-22 23:37:02 +00:00
Jeff Young 1a7152d3eb Warp after context menu only if actively drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11080
2024-02-22 23:36:59 +00:00
Jeff Young 08da9a4494 Don't modify reference point if already moving.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16524
2024-02-22 23:36:56 +00:00
Jeff Young baaed8ed84 Formatting. 2024-02-22 23:36:54 +00:00
Jeff Young 7446fba70a Keep Mac debugger from crashing with breakpoints in .h files. 2024-02-22 23:36:50 +00:00
Jeff Young d36f189192 Add help text for DRC assertion clauses. 2024-02-22 23:36:47 +00:00
Jeff Young 152c458b9c Help documentation for "assertion" constraints. 2024-02-22 23:36:44 +00:00
Jeff Young 7ae14f9630 Update syntax help for memberOfFootprint. 2024-02-22 23:36:41 +00:00
Jeff Young a610542a19 Various string issues held over from 8.0 string freeze. 2024-02-22 23:36:37 +00:00
Jeff Young 2ab492474e Improve alignment tooltips. 2024-02-22 23:36:34 +00:00
Jeff Young 3caede3799 Ignore duplicate/repeat when drawing an existing item.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16885
2024-02-22 23:36:30 +00:00
Jeff Young 9d40374baf Don't capture references to local variables for CallAfter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16934
2024-02-22 23:36:27 +00:00
Jeff Young 0ead8a14a1 Handle holes in shapes when creating bounding hulls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16347
2024-02-22 23:36:24 +00:00
Jeff Young e8b16fc64f Kick PROPERTIES_PANEL a bit harder on language change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16589
2024-02-22 23:36:20 +00:00
Jeff Young 162e8962f7 Add a cache for TrueType contours and triangulation data.
Also returns minimumSegmentLength to its former value as
it doesn't appear to be required to fix
https://gitlab.com/kicad/code/kicad/-/issues/11463.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16568
2024-02-22 23:36:16 +00:00
Wayne Stambaugh fc66cb6805 Begin 8.0.1 development. 2024-02-22 18:13:58 -05:00
1316 changed files with 294413 additions and 232516 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ build_doxygen_docker:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
tags:
- docker
- gitlab-org-docker
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
+1 -19
View File
@@ -15,25 +15,7 @@ macos_build:
- cd build/macos
- cmake
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib
-DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest
-DCMAKE_C_COMPILER=/usr/bin/clang
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
-DKICAD_BUILD_I18N=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
-DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3
-DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/
-DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib
-DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages
-DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework
-DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include
-DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
-DKICAD_USE_3DCONNEXION=ON
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
+65 -35
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2015-2023 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 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
@@ -142,8 +142,8 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_offboardPadsFront = nullptr;
m_offboardPadsBack = nullptr;
m_frontPlatedPadPolys = nullptr;
m_backPlatedPadPolys = nullptr;
m_frontPlatedPadAndGraphicPolys = nullptr;
m_backPlatedPadAndGraphicPolys = nullptr;
m_frontPlatedCopperPolys = nullptr;
m_backPlatedCopperPolys = nullptr;
@@ -397,13 +397,18 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
break;
case BS_ITEM_TYPE_COPPER:
if( item->GetBrdLayerId() == F_Cu )
m_frontCopperThickness3DU = item->GetThickness() * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Cu )
m_backCopperThickness3DU = item->GetThickness() * m_biuTo3Dunits;
else if( item->IsEnabled() )
thickness += item->GetThickness();
{
// The copper thickness must be > 0 to avoid draw issues (divide by 0 for instance)
// We use a minimal arbitrary value = 1 micrometer here:
int copper_thickness = std::max( item->GetThickness(), pcbIUScale.mmToIU( 0.001 ) );
if( item->GetBrdLayerId() == F_Cu )
m_frontCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Cu )
m_backCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->IsEnabled() )
thickness += copper_thickness;
}
break;
default:
@@ -449,7 +454,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
for( ; layer < MAX_CU_LAYERS; layer++ )
{
m_layerZcoordBottom[layer] = -( m_boardBodyThickness3DU / 2.0f );
m_layerZcoordTop[layer] = -( m_boardBodyThickness3DU / 2.0f ) - m_backCopperThickness3DU;
m_layerZcoordTop[layer] = m_layerZcoordBottom[layer] - m_backCopperThickness3DU;
}
// This is the top of the copper layer thickness.
@@ -530,7 +535,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
m_boardBoundingBox = BBOX_3D( boardMin, boardMax );
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_startCreateBoardPolyTime = GetRunningMicroSecs();
int64_t stats_startCreateBoardPolyTime = GetRunningMicroSecs();
#endif
if( aStatusReporter )
@@ -589,13 +594,20 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
{
std::map<int, COLOR4D> colors;
if( m_Cfg->m_CurrentPreset == FOLLOW_PCB || m_Cfg->m_CurrentPreset == FOLLOW_PLOT_SETTINGS )
if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) )
{
colors = GetDefaultColors();
colors = preset->colors;
}
else
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
if( !m_board )
return colors;
for( const auto& [ layer, defaultColor /* unused */ ] : GetDefaultColors() )
colors[ layer ] = settings->GetColor( layer );
}
if( m_Cfg->m_UseStackupColors && m_board )
{
const BOARD_STACKUP& stackup = m_board->GetDesignSettings().GetStackupDescriptor();
KIGFX::COLOR4D bodyColor( 0, 0, 0, 0 );
@@ -683,26 +695,6 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
{
colors[ LAYER_3D_COPPER_TOP ] = findColor( wxT( "Silver" ), g_FinishColors );
}
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
PCBNEW_SETTINGS* pcbnewSettings = mgr.GetAppSettings<PCBNEW_SETTINGS>();
COLOR_SETTINGS* pcbnewColors = mgr.GetColorSettings( pcbnewSettings->m_ColorTheme );
colors[ LAYER_3D_USER_DRAWINGS ] = pcbnewColors->GetColor( Dwgs_User );
colors[ LAYER_3D_USER_COMMENTS ] = pcbnewColors->GetColor( Cmts_User );
colors[ LAYER_3D_USER_ECO1 ] = pcbnewColors->GetColor( Eco1_User );
colors[ LAYER_3D_USER_ECO2 ] = pcbnewColors->GetColor( Eco2_User );
}
else if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) )
{
return preset->colors;
}
else
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
for( const auto& [ layer, color ] : GetDefaultColors() )
colors[ layer ] = settings->GetColor( layer );
}
colors[ LAYER_3D_COPPER_BOTTOM ] = colors[ LAYER_3D_COPPER_TOP ];
@@ -716,6 +708,8 @@ void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
for( const auto& [ layer, color ] : aColors )
settings->SetColor( layer, color );
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
}
@@ -860,6 +854,42 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
}
std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetDefaultVisibleLayers() const
{
std::bitset<LAYER_3D_END> ret;
ret.set( LAYER_3D_BOARD, true );
ret.set( LAYER_3D_COPPER_TOP, true );
ret.set( LAYER_3D_COPPER_BOTTOM, true );
ret.set( LAYER_3D_SILKSCREEN_TOP, true );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, true );
ret.set( LAYER_3D_SOLDERMASK_TOP, true );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, true );
ret.set( LAYER_3D_SOLDERPASTE, true );
ret.set( LAYER_3D_ADHESIVE, true );
ret.set( LAYER_3D_USER_COMMENTS, false );
ret.set( LAYER_3D_USER_DRAWINGS, false );
ret.set( LAYER_3D_USER_ECO1, false );
ret.set( LAYER_3D_USER_ECO2, false );
ret.set( LAYER_FP_REFERENCES, true );
ret.set( LAYER_FP_VALUES, true );
ret.set( LAYER_FP_TEXT, true );
ret.set( LAYER_3D_TH_MODELS, true );
ret.set( LAYER_3D_SMD_MODELS, true );
ret.set( LAYER_3D_VIRTUAL_MODELS, true );
ret.set( LAYER_3D_MODELS_NOT_IN_POS, false );
ret.set( LAYER_3D_MODELS_MARKED_DNP, false );
ret.set( LAYER_3D_BOUNDING_BOXES, false );
ret.set( LAYER_3D_OFF_BOARD_SILK, false );
ret.set( LAYER_3D_AXES, true );
return ret;
}
bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
{
m_board_poly.RemoveAllContours();
+5 -4
View File
@@ -110,6 +110,7 @@ public:
void SetLayerColors( const std::map<int, COLOR4D>& aColors );
std::bitset<LAYER_3D_END> GetVisibleLayers() const;
std::bitset<LAYER_3D_END> GetDefaultVisibleLayers() const;
void SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers );
/**
@@ -330,8 +331,8 @@ public:
*/
const MAP_POLY& GetPolyMap() const noexcept { return m_layers_poly; }
const SHAPE_POLY_SET* GetFrontPlatedPadPolys() { return m_frontPlatedPadPolys; }
const SHAPE_POLY_SET* GetBackPlatedPadPolys() { return m_backPlatedPadPolys; }
const SHAPE_POLY_SET* GetFrontPlatedPadAndGraphicPolys() { return m_frontPlatedPadAndGraphicPolys; }
const SHAPE_POLY_SET* GetBackPlatedPadAndGraphicPolys() { return m_backPlatedPadAndGraphicPolys; }
const MAP_POLY& GetHoleIdPolysMap() const noexcept { return m_layerHoleIdPolys; }
const MAP_POLY& GetHoleOdPolysMap() const noexcept { return m_layerHoleOdPolys; }
@@ -437,8 +438,8 @@ private:
MAP_POLY m_layers_poly; ///< Amalgamated polygon contours for various types
///< of items
SHAPE_POLY_SET* m_frontPlatedPadPolys;
SHAPE_POLY_SET* m_backPlatedPadPolys;
SHAPE_POLY_SET* m_frontPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_backPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_frontPlatedCopperPolys;
SHAPE_POLY_SET* m_backPlatedCopperPolys;
@@ -374,6 +374,13 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
// Remove group membership from dummy item before deleting
dummy.SetParentGroup( nullptr );
}
else if( aPad->GetShape() == PAD_SHAPE::CUSTOM )
{
// A custom pad can have many complex subshape items. To avoid issues, use its
// final polygon shape, not its basic shape set. One cannot apply the clearance
// to each subshape: it does no work
aPad->TransformShapeToPolygon( poly, aLayer, 0, maxError );
}
else
{
auto padShapes = std::static_pointer_cast<SHAPE_COMPOUND>( aPad->GetEffectiveShape() );
@@ -422,7 +429,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
break;
case SH_POLY_SET:
poly = *(SHAPE_POLY_SET*) shape;
poly.Append( *static_cast<const SHAPE_POLY_SET*>( shape ) );
break;
case SH_ARC:
+26 -13
View File
@@ -117,8 +117,8 @@ void BOARD_ADAPTER::destroyLayers()
DELETE_AND_FREE_MAP( m_layers_poly );
DELETE_AND_FREE( m_frontPlatedPadPolys )
DELETE_AND_FREE( m_backPlatedPadPolys )
DELETE_AND_FREE( m_frontPlatedPadAndGraphicPolys )
DELETE_AND_FREE( m_backPlatedPadAndGraphicPolys )
DELETE_AND_FREE( m_frontPlatedCopperPolys )
DELETE_AND_FREE( m_backPlatedCopperPolys )
@@ -154,9 +154,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// https://github.com/KiCad/kicad-source-mirror/blob/master/3d-viewer/3d_draw.cpp#L692
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_startCopperLayersTime = GetRunningMicroSecs();
int64_t stats_startCopperLayersTime = GetRunningMicroSecs();
unsigned start_Time = stats_startCopperLayersTime;
int64_t start_Time = stats_startCopperLayersTime;
#endif
PCB_LAYER_ID cu_seq[MAX_CU_LAYERS];
@@ -241,8 +241,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
if( cfg.differentiate_plated_copper )
{
m_frontPlatedPadPolys = new SHAPE_POLY_SET;
m_backPlatedPadPolys = new SHAPE_POLY_SET;
m_frontPlatedPadAndGraphicPolys = new SHAPE_POLY_SET;
m_backPlatedPadAndGraphicPolys = new SHAPE_POLY_SET;
m_frontPlatedCopperPolys = new SHAPE_POLY_SET;
m_backPlatedCopperPolys = new SHAPE_POLY_SET;
@@ -586,10 +586,10 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// ADD PLATED PADS contours
for( FOOTPRINT* footprint : m_board->Footprints() )
{
footprint->TransformPadsToPolySet( *m_frontPlatedPadPolys, F_Cu, 0, maxError,
footprint->TransformPadsToPolySet( *m_frontPlatedPadAndGraphicPolys, F_Cu, 0, maxError,
ERROR_INSIDE, true, false, true );
footprint->TransformPadsToPolySet( *m_backPlatedPadPolys, B_Cu, 0, maxError,
footprint->TransformPadsToPolySet( *m_backPlatedPadAndGraphicPolys, B_Cu, 0, maxError,
ERROR_INSIDE, true, false, true );
}
}
@@ -1050,21 +1050,33 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
SHAPE_POLY_SET::PM_FAST );
}
// SUBTRACT PLATED COPPER FROM (UNPLATED) COPPER
// Subtract plated copper from unplated copper
bool hasF_Cu = false;
bool hasB_Cu = false;
if( m_layers_poly.find( F_Cu ) != m_layers_poly.end() )
{
m_layers_poly[F_Cu]->BooleanSubtract( *m_frontPlatedPadPolys, SHAPE_POLY_SET::PM_FAST );
m_layers_poly[F_Cu]->BooleanSubtract( *m_frontPlatedPadAndGraphicPolys, SHAPE_POLY_SET::PM_FAST );
m_layers_poly[F_Cu]->BooleanSubtract( *m_frontPlatedCopperPolys, SHAPE_POLY_SET::PM_FAST );
hasF_Cu = true;
}
if( m_layers_poly.find( B_Cu ) != m_layers_poly.end() )
{
m_layers_poly[B_Cu]->BooleanSubtract( *m_backPlatedPadPolys, SHAPE_POLY_SET::PM_FAST );
m_layers_poly[B_Cu]->BooleanSubtract( *m_backPlatedPadAndGraphicPolys, SHAPE_POLY_SET::PM_FAST );
m_layers_poly[B_Cu]->BooleanSubtract( *m_backPlatedCopperPolys, SHAPE_POLY_SET::PM_FAST );
hasB_Cu = true;
}
m_frontPlatedPadPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
m_backPlatedPadPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
// Add plated graphic items to build vertical walls
if( hasF_Cu && m_frontPlatedCopperPolys->OutlineCount() )
m_frontPlatedPadAndGraphicPolys->Append( *m_frontPlatedCopperPolys );
if( hasB_Cu && m_backPlatedCopperPolys->OutlineCount() )
m_backPlatedPadAndGraphicPolys->Append( *m_backPlatedCopperPolys );
m_frontPlatedPadAndGraphicPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
m_backPlatedPadAndGraphicPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
m_frontPlatedCopperPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
m_backPlatedCopperPolys->Simplify( SHAPE_POLY_SET::PM_FAST );
@@ -1134,6 +1146,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
if( layerPoly != m_layers_poly.end() )
{
// This will make a union of all added contours
layerPoly->second->ClearArcs();
layerPoly->second->Simplify( SHAPE_POLY_SET::PM_FAST );
}
}
+6 -2
View File
@@ -33,6 +33,7 @@
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <build_version.h>
#include <board.h>
#include <reporter.h>
#include <gal/opengl/gl_context_mgr.h>
@@ -229,6 +230,9 @@ bool EDA_3D_CANVAS::initializeOpenGL()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
@@ -369,7 +373,7 @@ void EDA_3D_CANVAS::DoRePaint()
wxString err_messages;
INFOBAR_REPORTER warningReporter( m_parentInfoBar );
STATUSBAR_REPORTER activityReporter( m_parentStatusBar, EDA_3D_VIEWER_STATUSBAR::ACTIVITY );
unsigned start_time = GetRunningMicroSecs();
int64_t start_time = GetRunningMicroSecs();
// "Makes the OpenGL state that is represented by the OpenGL rendering
// context context current, i.e. it will be used by all subsequent OpenGL calls.
@@ -461,7 +465,7 @@ void EDA_3D_CANVAS::DoRePaint()
if( m_camera_is_moving )
{
const unsigned curtime_delta = GetRunningMicroSecs() - m_strtime_camera_movement;
const int64_t curtime_delta = GetRunningMicroSecs() - m_strtime_camera_movement;
curtime_delta_s = (curtime_delta / 1e6) * m_camera_moving_speed;
m_camera.Interpolate( curtime_delta_s );
+1 -1
View File
@@ -305,7 +305,7 @@ private:
bool m_render_pivot; // Render the pivot while camera moving
float m_camera_moving_speed; // 1.0f will be 1:1
unsigned m_strtime_camera_movement; // Ticktime of camera movement start
int64_t m_strtime_camera_movement; // Ticktime of camera movement start
bool m_animation_enabled; // Camera animation enabled
int m_moving_speed_multiplier; // Camera animation speed multiplier option
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 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
@@ -35,6 +35,7 @@
#include "../3d_cache/3d_cache.h"
#include <wx/dcclient.h>
#include <base_units.h>
#include <build_version.h>
#include <gal/opengl/gl_context_mgr.h>
#include <settings/common_settings.h>
#include <pgm_base.h>
@@ -102,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribL
m_BiuTo3dUnits = 1.0;
m_glRC = nullptr;
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
SetScaleFactor( dpi.GetScaleFactor() );
}
@@ -200,6 +196,9 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
+12 -7
View File
@@ -454,7 +454,7 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
OBJECT_2D_STATS::Instance().ResetStats();
unsigned stats_startReloadTime = GetRunningMicroSecs();
int64_t stats_startReloadTime = GetRunningMicroSecs();
m_boardAdapter.InitSettings( aStatusReporter, aWarningReporter );
@@ -613,12 +613,12 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
const SHAPE_POLY_SET* frontPlatedPadPolys = m_boardAdapter.GetFrontPlatedPadPolys();
const SHAPE_POLY_SET* backPlatedPadPolys = m_boardAdapter.GetBackPlatedPadPolys();
const SHAPE_POLY_SET* frontPlatedPadAndGraphicPolys = m_boardAdapter.GetFrontPlatedPadAndGraphicPolys();
const SHAPE_POLY_SET* backPlatedPadAndGraphicPolys = m_boardAdapter.GetBackPlatedPadAndGraphicPolys();
if( frontPlatedPadPolys )
if( frontPlatedPadAndGraphicPolys )
{
SHAPE_POLY_SET poly = frontPlatedPadPolys->CloneDropTriangulation();
SHAPE_POLY_SET poly = frontPlatedPadAndGraphicPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
@@ -630,9 +630,9 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
m_layers[F_Cu] = generateEmptyLayerList( F_Cu );
}
if( backPlatedPadPolys )
if( backPlatedPadAndGraphicPolys )
{
SHAPE_POLY_SET poly = backPlatedPadPolys->CloneDropTriangulation();
SHAPE_POLY_SET poly = backPlatedPadAndGraphicPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys(), SHAPE_POLY_SET::PM_FAST );
@@ -917,6 +917,10 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
if( !m_boardAdapter.GetBoard() )
return;
// Building the 3D models late crashes on recent versions of macOS
// Unclear the exact mechanism, but as a workaround, just build them
// all the time. See https://gitlab.com/kicad/code/kicad/-/issues/17198
#ifndef __WXMAC__
if( !m_boardAdapter.m_IsPreviewer
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_normal
&& !m_boardAdapter.m_Cfg->m_Render.show_footprints_insert
@@ -924,6 +928,7 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
{
return;
}
#endif
// Go for all footprints
for( const FOOTPRINT* footprint : m_boardAdapter.GetBoard()->Footprints() )
@@ -368,7 +368,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
OBJECT_2D_STATS::Instance().ResetStats();
OBJECT_3D_STATS::Instance().ResetStats();
unsigned stats_startReloadTime = GetRunningMicroSecs();
int64_t stats_startReloadTime = GetRunningMicroSecs();
if( !aOnlyLoadCopperAndShapes )
{
@@ -771,8 +771,8 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
}
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_endConvertTime = GetRunningMicroSecs();
unsigned stats_startLoad3DmodelsTime = stats_endConvertTime;
int64_t stats_endConvertTime = GetRunningMicroSecs();
int64_t stats_startLoad3DmodelsTime = stats_endConvertTime;
#endif
if( aStatusReporter )
@@ -781,7 +781,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
load3DModels( m_objectContainer, aOnlyLoadCopperAndShapes );
#ifdef PRINT_STATISTICS_3D_VIEWER
unsigned stats_endLoad3DmodelsTime = GetRunningMicroSecs();
int64_t stats_endLoad3DmodelsTime = GetRunningMicroSecs();
#endif
if( !aOnlyLoadCopperAndShapes )
@@ -955,7 +955,7 @@ void RENDER_3D_RAYTRACE::Reload( REPORTER* aStatusReporter, REPORTER* aWarningRe
if( aStatusReporter )
{
// Calculation time in seconds
double calculation_time = (double) GetRunningMicroSecs() - stats_startReloadTime / 1e6;
double calculation_time = (double) ( GetRunningMicroSecs() - stats_startReloadTime ) / 1e6;
aStatusReporter->Report( wxString::Format( _( "Reload time %.3f s" ), calculation_time ) );
}
@@ -154,7 +154,7 @@ private:
RT_RENDER_STATE m_renderState;
/// Time that the render starts
unsigned long int m_renderStartTime;
int64_t m_renderStartTime;
/// Save the number of blocks progress of the render
size_t m_blockRenderProgressCount;
+21 -19
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 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
@@ -568,7 +568,8 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
if( cfg )
{
m_boardAdapter.m_Cfg = cfg;
applySettings( cfg );
m_boardAdapter.SetBoard( GetBoard() );
// When opening the 3D viewer, we use the OpenGL mode, never the ray tracing engine
@@ -576,28 +577,20 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
// (freeze window) with large boards.
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
m_canvas->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_canvas->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_canvas->SetProjectionMode( cfg->m_Camera.projection_mode );
m_canvas->SetVcSettings( EDA_DRAW_PANEL_GAL::GetVcSettings() );
if( cfg->m_CurrentPreset == LEGACY_PRESET_FLAG )
{
wxString legacyColorsPresetName = _( "legacy colors" );
cfg->m_UseStackupColors = false;
if( !cfg->FindPreset( legacyColorsPresetName ) )
{
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
GetAdapter().GetVisibleLayers(),
GetAdapter().GetLayerColors() );
GetAdapter().GetDefaultVisibleLayers(),
GetAdapter().GetDefaultColors() );
}
if( Pgm().GetSettingsManager().GetColorSettings()->GetUseBoardStackupColors() )
cfg->m_CurrentPreset = FOLLOW_PCB;
else
cfg->m_CurrentPreset = legacyColorsPresetName;
cfg->m_CurrentPreset = wxEmptyString;
}
m_boardAdapter.InitSettings( nullptr, nullptr );
@@ -646,7 +639,7 @@ void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTex
ReCreateMainToolbar();
loadCommonSettings();
LoadSettings( Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>() );
applySettings( Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>() );
m_appearancePanel->CommonSettingsChanged();
@@ -819,9 +812,18 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
}
void EDA_3D_VIEWER_FRAME::applySettings( EDA_3D_VIEWER_SETTINGS* cfg )
{
m_boardAdapter.m_Cfg = cfg;
m_canvas->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_canvas->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_canvas->SetProjectionMode( cfg->m_Camera.projection_mode );
m_canvas->SetVcSettings( EDA_DRAW_PANEL_GAL::GetVcSettings() );
}
+3 -1
View File
@@ -5,7 +5,7 @@
* Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 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
@@ -167,6 +167,8 @@ private:
*/
void loadCommonSettings();
void applySettings( EDA_3D_VIEWER_SETTINGS* aSettings );
private:
wxFileName m_defaultSaveScreenshotFileName;
@@ -377,6 +377,8 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM<int>( "camera.projection_mode",
&m_Camera.projection_mode, 1 ) );
m_params.emplace_back( new PARAM<bool>( "use_stackup_colors",
&m_UseStackupColors, true ) );
m_params.emplace_back( new PARAM_LAYER_PRESET_3D( "layer_presets",
&m_LayerPresets ) );
m_params.emplace_back( new PARAM<wxString>( "current_layer_preset",
@@ -169,6 +169,7 @@ public:
RENDER_SETTINGS m_Render;
CAMERA_SETTINGS m_Camera;
bool m_UseStackupColors;
std::vector<LAYER_PRESET_3D> m_LayerPresets;
wxString m_CurrentPreset;
+1 -23
View File
@@ -53,7 +53,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Clockwise" ) )
.Tooltip( _( "Rotate X Clockwise" ) )
.Icon( BITMAPS::rotate_cw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CW ) );
@@ -62,7 +61,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateXCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateXcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate X Counterclockwise" ) )
.Tooltip( _( "Rotate X Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_x )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::X_CCW ) );
@@ -71,7 +69,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Clockwise" ) )
.Tooltip( _( "Rotate Y Clockwise" ) )
.Icon( BITMAPS::rotate_cw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CW ) );
@@ -80,7 +77,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateYcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Y Counterclockwise" ) )
.Tooltip( _( "Rotate Y Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_y )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Y_CCW ) );
@@ -89,7 +85,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Clockwise" ) )
.Tooltip( _( "Rotate Z Clockwise" ) )
.Icon( BITMAPS::rotate_cw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CW ) );
@@ -98,7 +93,6 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZcounterclockwise" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Rotate Z Counterclockwise" ) )
.Tooltip( _( "Rotate Z Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_z )
.Flags( AF_NONE )
.Parameter( ROTATION_DIR::Z_CCW ) );
@@ -108,7 +102,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveLeft( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_LEFT )
.FriendlyName( _( "Move Board Left" ) )
.Tooltip( _( "Move board Left" ) )
.Icon( BITMAPS::left )
.Flags( AF_NONE )
.Parameter( CURSOR_LEFT ) );
@@ -118,7 +111,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveRight( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_RIGHT )
.FriendlyName( _( "Move Board Right" ) )
.Tooltip( _( "Move board Right" ) )
.Icon( BITMAPS::right )
.Flags( AF_NONE )
.Parameter( CURSOR_RIGHT ) );
@@ -128,7 +120,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveUp( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_UP )
.FriendlyName( _( "Move Board Up" ) )
.Tooltip( _( "Move board Up" ) )
.Icon( BITMAPS::up )
.Flags( AF_NONE )
.Parameter( CURSOR_UP ) );
@@ -138,7 +129,6 @@ TOOL_ACTION EDA_3D_ACTIONS::moveDown( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_DOWN )
.FriendlyName( _( "Move Board Down" ) )
.Tooltip( _( "Move board Down" ) )
.Icon( BITMAPS::down )
.Flags( AF_NONE )
.Parameter( CURSOR_DOWN ) );
@@ -148,7 +138,7 @@ TOOL_ACTION EDA_3D_ACTIONS::homeView( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( WXK_HOME )
.FriendlyName ( _( "Home View" ) )
.Tooltip( _( "Home view" ) )
.Tooltip( _( "Redraw at the home position and zoom" ) )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FIT_SCREEN ) );
@@ -174,7 +164,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewFront( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Y' )
.FriendlyName( _( "View Front" ) )
.Tooltip( _( "View Front" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_FRONT ) );
@@ -184,7 +173,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBack( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Y' )
.FriendlyName( _( "View Back" ) )
.Tooltip( _( "View Back" ) )
.Icon( BITMAPS::axis3d_back )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BACK ) );
@@ -194,7 +182,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewLeft( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'X' )
.FriendlyName( _( "View Left" ) )
.Tooltip( _( "View Left" ) )
.Icon( BITMAPS::axis3d_left )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_LEFT ) );
@@ -204,7 +191,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewRight( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'X' )
.FriendlyName( _( "View Right" ) )
.Tooltip( _( "View Right" ) )
.Icon( BITMAPS::axis3d_right )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_RIGHT ) );
@@ -214,7 +200,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewTop( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( 'Z' )
.FriendlyName( _( "View Top" ) )
.Tooltip( _( "View Top" ) )
.Icon( BITMAPS::axis3d_top )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_TOP ) );
@@ -224,7 +209,6 @@ TOOL_ACTION EDA_3D_ACTIONS::viewBottom( TOOL_ACTION_ARGS()
.Scope( AS_ACTIVE )
.DefaultHotkey( MD_SHIFT + 'Z' )
.FriendlyName( _( "View Bottom" ) )
.Tooltip( _( "View Bottom" ) )
.Icon( BITMAPS::axis3d_bottom )
.Flags( AF_NONE )
.Parameter( VIEW3D_TYPE::VIEW3D_BOTTOM ) );
@@ -233,7 +217,6 @@ TOOL_ACTION EDA_3D_ACTIONS::noGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.noGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "No 3D Grid" ) )
.Tooltip( _( "No 3D Grid" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::NONE ) );
@@ -241,7 +224,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show10mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show10mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 10mm" ) )
.Tooltip( _( "3D Grid 10mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_10MM ) );
@@ -249,7 +231,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 5mm" ) )
.Tooltip( _( "3D Grid 5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_5MM ) );
@@ -257,7 +238,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show2_5mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show2_5mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 2.5mm" ) )
.Tooltip( _( "3D Grid 2.5mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_2P5MM ) );
@@ -265,7 +245,6 @@ TOOL_ACTION EDA_3D_ACTIONS::show1mmGrid( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.show1mmGrid" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "3D Grid 1mm" ) )
.Tooltip( _( "3D Grid 1mm" ) )
.Flags( AF_NONE )
.Parameter( GRID3D_TYPE::GRID_1MM ) );
@@ -350,7 +329,6 @@ TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showAxis" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show 3D Axis" ) )
.Tooltip( _( "Show 3D Axis" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE ) );
+75 -3
View File
@@ -41,6 +41,7 @@
#include <wx/bmpbuttn.h>
#include <wx/sizer.h>
#include <wx/textdlg.h>
#include <wx/checkbox.h>
#include <../3d_rendering/opengl/render_3d_opengl.h>
@@ -82,6 +83,13 @@ const APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D APPEARANCE_CONTROLS_3D::s_la
RR( _HKI( "Background End" ), LAYER_3D_BACKGROUND_BOTTOM, _HKI( "Background gradient end color" ) ),
};
// The list of IDs that can have colors coming from the board stackup, and cannot be
// modified if use colors from stackup is activated
static std::vector<int> inStackupColors{ LAYER_3D_BOARD, LAYER_3D_COPPER_TOP,
LAYER_3D_COPPER_BOTTOM, LAYER_3D_SOLDERPASTE,
LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SILKSCREEN_BOTTOM,
LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERMASK_BOTTOM
};
APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
wxWindow* aFocusOwner ) :
@@ -112,6 +120,24 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
m_presetsLabel->SetFont( infoFont );
m_viewportsLabel->SetFont( infoFont );
// Create display options
m_cbUseBoardStackupColors = new wxCheckBox( m_panelLayers, wxID_ANY,
_( "Use board stackup colors" ) );
m_cbUseBoardStackupColors->SetFont( infoFont );
m_cbUseBoardStackupColors->Bind( wxEVT_CHECKBOX,
[this]( wxCommandEvent& aEvent )
{
EDA_3D_VIEWER_SETTINGS* cfg = m_frame->GetAdapter().m_Cfg;
cfg->m_UseStackupColors = aEvent.IsChecked();
UpdateLayerCtls();
syncLayerPresetSelection();
m_frame->NewDisplay( true );
} );
m_panelLayersSizer->Add( m_cbUseBoardStackupColors, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 7 );
m_cbLayerPresets->SetToolTip( wxString::Format( _( "Save and restore color and visibility "
"combinations.\n"
"Use %s+Tab to activate selector.\n"
@@ -176,7 +202,9 @@ void APPEARANCE_CONTROLS_3D::OnSize( wxSizeEvent& aEvent )
void APPEARANCE_CONTROLS_3D::OnLanguageChanged()
{
Freeze();
rebuildLayers();
m_cbUseBoardStackupColors->SetLabel( _( "Use board stackup colors" ) );
rebuildLayerPresetsWidget();
rebuildViewportsWidget();
@@ -209,6 +237,9 @@ void APPEARANCE_CONTROLS_3D::OnDarkModeToggle()
void APPEARANCE_CONTROLS_3D::CommonSettingsChanged()
{
OnLanguageChanged();
UpdateLayerCtls();
syncLayerPresetSelection();
}
@@ -437,6 +468,19 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
SWATCH_SMALL );
swatch->SetToolTip( _( "Left double click or middle click to change color" ) );
swatch->SetReadOnlyCallback(
[this]()
{
WX_INFOBAR* infobar = m_frame->GetInfoBar();
infobar->RemoveAllButtons();
infobar->AddCloseButton();
infobar->ShowMessageFor( _( "Uncheck 'Use board stackup colors' to "
"allow color editing." ),
10000, wxICON_INFORMATION );
} );
sizer->Add( swatch, 0, wxALIGN_CENTER_VERTICAL, 0 );
aSetting->m_Ctl_color = swatch;
@@ -515,6 +559,7 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
void APPEARANCE_CONTROLS_3D::UpdateLayerCtls()
{
EDA_3D_VIEWER_SETTINGS* cfg = m_frame->GetAdapter().m_Cfg;
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
@@ -527,8 +572,22 @@ void APPEARANCE_CONTROLS_3D::UpdateLayerCtls()
setting->m_Ctl_visibility->SetValue( visibleLayers.test( setting->m_Id ) );
if( setting->m_Ctl_color )
{
setting->m_Ctl_color->SetSwatchColor( colors[ setting->m_Id ], false );
// if cfg->m_UseStackupColors is set, board colors cannot be modified locally, but
// other colors can be
if( std::find( inStackupColors.begin(), inStackupColors.end(), setting->m_Id )
!= inStackupColors.end() )
{
if( cfg )
setting->m_Ctl_color->SetReadOnly( cfg->m_UseStackupColors );
}
}
}
if( cfg )
m_cbUseBoardStackupColors->SetValue( cfg->m_UseStackupColors );
}
@@ -563,9 +622,16 @@ void APPEARANCE_CONTROLS_3D::syncLayerPresetSelection()
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
auto it = std::find_if( presets.begin(), presets.end(),
auto it = std::find_if(
presets.begin(), presets.end(),
[&]( const LAYER_PRESET_3D& aPreset )
{
if( aPreset.name.Lower() == _( "legacy colors" )
&& m_cbUseBoardStackupColors->GetValue() )
{
return false;
}
for( int layer = LAYER_3D_BOARD; layer < LAYER_3D_END; ++layer )
{
if( aPreset.layers.test( layer ) != visibleLayers.test( layer ) )
@@ -578,9 +644,12 @@ void APPEARANCE_CONTROLS_3D::syncLayerPresetSelection()
return false;
}
for( int layer = LAYER_3D_BOARD; layer < LAYER_3D_ADHESIVE; ++layer )
for( int layer = LAYER_3D_START + 1; layer < LAYER_3D_END; ++layer )
{
if( aPreset.colors.at( layer ) != colors.at( layer ) )
auto it1 = aPreset.colors.find( layer );
auto it2 = colors.find( layer );
if( it1 != aPreset.colors.end() && it2 != colors.end() && *it1 != *it2 )
return false;
}
@@ -745,6 +814,9 @@ void APPEARANCE_CONTROLS_3D::doApplyLayerPreset( const LAYER_PRESET_3D& aPreset
adapter.SetVisibleLayers( aPreset.layers );
adapter.SetLayerColors( aPreset.colors );
if( aPreset.name.Lower() == _( "legacy colors" ) )
adapter.m_Cfg->m_UseStackupColors = false;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
+12 -12
View File
@@ -166,26 +166,26 @@ private:
void passOnFocus();
private:
EDA_3D_VIEWER_FRAME* m_frame;
wxWindow* m_focusOwner;
static const APPEARANCE_SETTING_3D s_layerSettings[];
GRID_BITMAP_TOGGLE_RENDERER* m_toggleGridRenderer;
EDA_3D_VIEWER_FRAME* m_frame;
wxWindow* m_focusOwner;
std::vector<std::unique_ptr<APPEARANCE_SETTING_3D>> m_layerSettings;
std::map<int, APPEARANCE_SETTING_3D*> m_layerSettingsMap;
wxArrayString m_presetMRU;
wxArrayString m_presetMRU;
std::map<wxString, VIEWPORT3D> m_viewports;
VIEWPORT3D* m_lastSelectedViewport;
wxArrayString m_viewportMRU;
std::map<wxString, VIEWPORT3D> m_viewports;
VIEWPORT3D* m_lastSelectedViewport;
wxArrayString m_viewportMRU;
wxBoxSizer* m_layersOuterSizer;
wxBoxSizer* m_envOuterSizer;
int m_pointSize;
wxColour m_layerPanelColour;
wxBoxSizer* m_layersOuterSizer;
wxBoxSizer* m_envOuterSizer;
int m_pointSize;
wxColour m_layerPanelColour;
GRID_BITMAP_TOGGLE_RENDERER* m_toggleGridRenderer;
wxCheckBox* m_cbUseBoardStackupColors;
};
#endif
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -25,11 +25,14 @@ APPEARANCE_CONTROLS_3D_BASE::APPEARANCE_CONTROLS_3D_BASE( wxWindow* parent, wxWi
m_panelLayers->SetSizer( m_panelLayersSizer );
m_panelLayers->Layout();
m_panelLayersSizer->Fit( m_panelLayers );
m_sizerOuter->Add( m_panelLayers, 1, wxEXPAND|wxBOTTOM, 5 );
m_sizerOuter->Add( m_panelLayers, 1, wxEXPAND, 5 );
wxBoxSizer* bBottomMargin;
bBottomMargin = new wxBoxSizer( wxVERTICAL );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bBottomMargin->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 3 );
wxBoxSizer* bPresets;
bPresets = new wxBoxSizer( wxVERTICAL );
@@ -44,7 +47,7 @@ APPEARANCE_CONTROLS_3D_BASE::APPEARANCE_CONTROLS_3D_BASE( wxWindow* parent, wxWi
bPresets->Add( m_cbLayerPresets, 0, wxALL|wxEXPAND, 2 );
bBottomMargin->Add( bPresets, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bBottomMargin->Add( bPresets, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bBottomMargin->Add( 0, 2, 0, wxEXPAND, 5 );
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -20,6 +20,7 @@
#include <wx/string.h>
#include <wx/sizer.h>
#include <wx/panel.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/choice.h>
@@ -38,6 +39,7 @@ class APPEARANCE_CONTROLS_3D_BASE : public WX_PANEL
wxPanel* m_panelLayers;
wxBoxSizer* m_panelLayersSizer;
wxScrolledCanvas* m_windowLayers;
wxStaticLine* m_staticline1;
wxStaticText* m_presetsLabel;
wxChoice* m_cbLayerPresets;
wxStaticText* m_viewportsLabel;
+24 -11
View File
@@ -210,9 +210,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
@@ -444,10 +441,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
double step = SCALE_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = SCALE_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
textCtrl->GetValue() );
curr_value += ( SCALE_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
@@ -465,10 +467,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
double step = ROTATION_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = ROTATION_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
textCtrl->GetValue() );
curr_value += ( ROTATION_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
@@ -488,16 +495,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
textCtrl = zoff;
double step_mm = OFFSET_INCREMENT_MM;
double curr_value_mm =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
if( wxGetMouseState().ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
if( wxGetMouseState().ShiftDown( ) )
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
}
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
curr_value_mm += ( step_mm * aSign );
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
@@ -533,10 +546,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = ROTATION_INCREMENT_WHEEL;
double step = ROTATION_INCREMENT;
if( event.ShiftDown( ) )
step = ROTATION_INCREMENT_WHEEL_FINE;
step = ROTATION_INCREMENT_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
+2 -3
View File
@@ -43,9 +43,8 @@
#define SCALE_INCREMENT_FINE 0.02
#define SCALE_INCREMENT 0.1
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT 90 // in degrees
#define ROTATION_INCREMENT_FINE 1 // in degrees
#define OFFSET_INCREMENT_MM 0.5
#define OFFSET_INCREMENT_MM_FINE 0.1
+12 -4
View File
@@ -106,10 +106,9 @@ option( KICAD_SCRIPTING_WXPYTHON
ON )
mark_as_advanced( KICAD_SCRIPTING_WXPYTHON )
cmake_dependent_option( KICAD_UPDATE_CHECK
option( KICAD_UPDATE_CHECK
"Build in update check"
ON "APPLE_OR_WIN32"
OFF )
ON )
# EGL is only needed on Linux with Wayland
cmake_dependent_option( KICAD_USE_EGL
@@ -515,6 +514,8 @@ if( MSVC )
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
# /Zi: create PDB
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /GF: enable string pooling
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )
@@ -877,7 +878,14 @@ check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" )
# Get the correct Python site package install path from the Python interpreter found by
# FindPythonInterp unless the user specifically defined a custom path.
if( NOT PYTHON_SITE_PACKAGE_PATH )
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import sysconfig;print(\"%s\"%sysconfig.get_path('platlib', vars={'platbase': '.'}))"
execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import sys, sysconfig
if 'deb_system' in sysconfig.get_scheme_names():
scheme = 'deb_system'
elif sys.version_info > (3, 10):
scheme = sysconfig.get_default_scheme()
else:
scheme = sysconfig._get_default_scheme()
print(\"%s\"%sysconfig.get_path('platlib', vars={'platbase': '.'}, scheme=scheme))"
OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
+2 -1
View File
@@ -138,7 +138,7 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
}
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, KIWAY_PLAYER )
EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
@@ -193,6 +193,7 @@ BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_toolManager->InitTools();
ReCreateMenuBar();
setupUIConditions();
GetSizer()->SetSizeHints( this );
+2 -1
View File
@@ -2,7 +2,7 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
# Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2015-2024 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
@@ -72,6 +72,7 @@ set( _wvh_new_version_text
#endif
#define KICAD_COMMIT_HASH \"${KICAD_COMMIT_HASH}\"
#define KICAD_VERSION \"${KICAD_VERSION}\"
#define KICAD_VERSION_FULL \"${KICAD_VERSION_FULL}\"
#define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\"
#define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\"
+39 -19
View File
@@ -27,7 +27,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Set the needed libraries
set( OCC_LIBS
set( OCC_LIBS_COMMON
TKBinL
TKBin
TKBinTObj
@@ -45,7 +45,6 @@ set( OCC_LIBS
TKGeomAlgo
TKGeomBase
TKHLR
TKIGES
TKLCAF
TKMath
TKMesh
@@ -56,18 +55,10 @@ set( OCC_LIBS
TKRWMesh
TKService
TKShHealing
TKSTEP209
TKSTEPAttr
TKSTEPBase
TKSTEP
TKSTL
TKTObj
TKTopAlgo
TKV3d
TKVRML
TKXCAF
TKXDEIGES
TKXDESTEP
TKXMesh
TKXmlL
TKXml
@@ -76,6 +67,27 @@ set( OCC_LIBS
TKXSBase
)
# Libraries valid pre-7.8.0
set( OCC_LIBS_PRE_78
TKIGES
TKSTEP209
TKSTEPAttr
TKSTEPBase
TKSTEP
TKSTL
TKVRML
TKXDEIGES
TKXDESTEP
)
# Libraries for versions >= 7.8.0
set( OCC_LIBS_POST_78
TKDEIGES
TKDEGLTF
TKDESTEP
TKDESTL
)
set(OCC_TYPE "OpenCASCADE Standard Edition")
if(WIN32)
if(CYGWIN OR MINGW)
@@ -178,9 +190,8 @@ endif(OCC_INCLUDE_DIR AND NOT ${OCC_INCLUDE_DIR} STREQUAL "OCC_INCLUDE_DIR-NOTFO
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OCC REQUIRED_VARS OCC_INCLUDE_DIR VERSION_VAR OCC_VERSION_STRING)
if(OCC_FOUND)
foreach(lib IN LISTS OCC_LIBS)
macro(occ_lib_search SEARCH_LIST)
foreach(lib IN LISTS ${SEARCH_LIST})
#Use the specified library location if given
find_library(OCC_TEMP_LIB ${lib} HINTS ${OCC_LIBRARY_DIR} NO_DEFAULT_PATH)
if(${OCC_TEMP_LIB} STREQUAL "OCC_TEMP_LIB-NOTFOUND")
@@ -197,11 +208,20 @@ if(OCC_FOUND)
unset(OCC_TEMP_LIB CACHE)
endforeach(lib)
endmacro()
#Convert path names to absolute for cleaner display
get_filename_component(OCC_INCLUDE_DIR "${OCC_INCLUDE_DIR}" ABSOLUTE)
get_filename_component(OCC_LIBRARY_DIR "${OCC_LIBRARY_DIR}" ABSOLUTE)
message(STATUS "Found ${OCC_TYPE} version: ${OCC_VERSION_STRING}")
message(STATUS " ++ ${OCC_TYPE} include directory: ${OCC_INCLUDE_DIR}")
message(STATUS " ++ ${OCC_TYPE} shared libraries directory: ${OCC_LIBRARY_DIR}")
if(OCC_FOUND)
occ_lib_search( OCC_LIBS_COMMON )
if(OCC_VERSION_STRING VERSION_LESS "7.8.0")
occ_lib_search( OCC_LIBS_PRE_78 )
else()
occ_lib_search( OCC_LIBS_POST_78 )
endif()
#Convert path names to absolute for cleaner display
get_filename_component(OCC_INCLUDE_DIR "${OCC_INCLUDE_DIR}" ABSOLUTE)
get_filename_component(OCC_LIBRARY_DIR "${OCC_LIBRARY_DIR}" ABSOLUTE)
message(STATUS "Found ${OCC_TYPE} version: ${OCC_VERSION_STRING}")
message(STATUS " ++ ${OCC_TYPE} include directory: ${OCC_INCLUDE_DIR}")
message(STATUS " ++ ${OCC_TYPE} shared libraries directory: ${OCC_LIBRARY_DIR}")
endif(OCC_FOUND)
+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.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)
set(_PYTHON3_VERSIONS 3.13 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.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)
set(_PYTHON3_VERSIONS 3.13 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]+.*)?$")
+1 -1
View File
@@ -55,7 +55,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
find_program(SWIG_EXECUTABLE NAMES swig4.0 swig3.0 swig2.0 swig)
find_program(SWIG_EXECUTABLE NAMES swig4.1 swig4.0 swig3.0 swig2.0 swig)
if(SWIG_EXECUTABLE)
execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib
+2 -2
View File
@@ -2,7 +2,7 @@
# This program source code file is part of KICAD, a free EDA CAD application.
#
# Copyright (C) 2016 Wayne Stambaugh <stambaughw@gmail.com>
# Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2016-2024 KiCad Developers, see AUTHORS.txt for contributors.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -37,7 +37,7 @@
# KiCad.
#
# Note: This version string should follow the semantic versioning system
set( KICAD_SEMANTIC_VERSION "8.0.0" )
set( KICAD_SEMANTIC_VERSION "8.0.5-rc1" )
# Default the version to the semantic version.
# This is overridden by the git repository tag though (if using git)
+3 -1
View File
@@ -388,8 +388,10 @@ set( COMMON_IO_SRCS
io/io_utils.cpp
# Altium
io/altium/altium_parser.cpp
io/altium/altium_binary_parser.cpp
io/altium/altium_ascii_parser.cpp
io/altium/altium_parser_utils.cpp
io/altium/altium_props_utils.cpp
# Cadstar
io/cadstar/cadstar_archive_parser.cpp
+33
View File
@@ -104,6 +104,11 @@ static const wxChar EnableEeschemaPrintCairo[] = wxT( "EnableEeschemaPrintCairo"
static const wxChar DisambiguationTime[] = wxT( "DisambiguationTime" );
static const wxChar PcbSelectionVisibilityRatio[] = wxT( "PcbSelectionVisibilityRatio" );
static const wxChar MinimumSegmentLength[] = wxT( "MinimumSegmentLength" );
static const wxChar OcePluginLinearDeflection[] = wxT( "OcePluginLinearDeflection" );
static const wxChar OcePluginAngularDeflection[] = wxT( "OcePluginAngularDeflection" );
static const wxChar TriangulateSimplificationLevel[] = wxT( "TriangulateSimplificationLevel" );
static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
} // namespace KEYS
@@ -248,6 +253,14 @@ ADVANCED_CFG::ADVANCED_CFG()
m_MinimumSegmentLength = 50;
m_OcePluginLinearDeflection = 0.14;
m_OcePluginAngularDeflection = 30;
m_TriangulateSimplificationLevel = 50;
m_TriangulateMinimumArea = 1000;
m_EnableCacheFriendlyFracture = true;
loadFromConfigFile();
}
@@ -444,6 +457,26 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_MinimumSegmentLength,
m_MinimumSegmentLength, 10, 1000 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::OcePluginLinearDeflection,
&m_OcePluginLinearDeflection,
m_OcePluginLinearDeflection, 0.01, 1.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::OcePluginAngularDeflection,
&m_OcePluginAngularDeflection,
m_OcePluginAngularDeflection, 0.01, 360.0 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::TriangulateSimplificationLevel,
&m_TriangulateSimplificationLevel,
m_TriangulateSimplificationLevel, 0, 1000 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::TriangulateMinimumArea,
&m_TriangulateMinimumArea,
m_TriangulateMinimumArea, 0, 100000 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableCacheFriendlyFracture,
&m_EnableCacheFriendlyFracture,
m_EnableCacheFriendlyFracture ) );
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks;
+1 -1
View File
@@ -209,7 +209,7 @@ void BACKGROUND_JOB_REPORTER::AdvancePhase()
}
BACKGROUND_JOBS_MONITOR::BACKGROUND_JOBS_MONITOR() : m_jobListDialog( nullptr )
BACKGROUND_JOBS_MONITOR::BACKGROUND_JOBS_MONITOR()
{
}
+80 -18
View File
@@ -524,9 +524,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_24.png" ), 24, wxT( "light" ) );
@@ -926,9 +934,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1328,9 +1344,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_16.png" ), 16, wxT( "light" ) );
@@ -1730,9 +1754,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_16.png" ), 16, wxT( "dark" ) );
@@ -2132,9 +2164,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_32.png" ), 32, wxT( "light" ) );
@@ -2534,9 +2574,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2936,9 +2984,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_48.png" ), 48, wxT( "light" ) );
@@ -3338,9 +3394,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3740,9 +3804,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_64.png" ), 64, wxT( "light" ) );
@@ -4142,9 +4214,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4394,24 +4474,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_32].emplace_back( BITMAPS::icon_pagelayout_editor_32, wxT( "icon_pagelayout_editor_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_32].emplace_back( BITMAPS::icon_pcbcalculator_32, wxT( "icon_pcbcalculator_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_32].emplace_back( BITMAPS::icon_pcbnew_32, wxT( "icon_pcbnew_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_64.png" ), 64, wxT( "light" ) );
+27 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2024 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
@@ -51,6 +51,19 @@ extern std::string GetCurlLibVersion();
#include <kicad_build_version.h>
#undef INCLUDE_KICAD_VERSION
// Remember OpenGL info
static wxString s_glVendor;
static wxString s_glRenderer;
static wxString s_glVersion;
void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVersion )
{
s_glVendor = wxString::FromUTF8( aVendor );
s_glRenderer = wxString::FromUTF8( aRenderer );
s_glVersion = wxString::FromUTF8( aVersion );
}
wxString GetPlatformGetBitnessName()
{
wxPlatformInfo platform;
@@ -71,6 +84,13 @@ wxString GetBuildVersion()
}
wxString GetBaseVersion()
{
wxString msg = wxString::Format( wxT( "%s" ), wxT( KICAD_VERSION ) );
return msg;
}
wxString GetBuildDate()
{
wxString msg = wxString::Format( wxT( "%s %s" ), wxT( __DATE__ ), wxT( __TIME__ ) );
@@ -193,6 +213,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
#endif
if( !s_glVendor.empty() || !s_glRenderer.empty() || !s_glVersion.empty() )
{
aMsg << eol;
aMsg << "OpenGL: " << s_glVendor << ", " << s_glRenderer << ", " << s_glVersion;
}
aMsg << eol << eol;
if( !aBrief )
+5 -2
View File
@@ -147,7 +147,8 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject, std::s
wxString strResult;
strResult.Alloc( strlen ); // best guess (improves performance)
auto getVersionedEnvVar = []( const wxString& aMatch, wxString& aResult ) -> bool
auto getVersionedEnvVar =
[]( const wxString& aMatch, wxString& aResult ) -> bool
{
for ( const wxString& var : ENV_VAR::GetPredefinedEnvVars() )
{
@@ -180,7 +181,9 @@ wxString KIwxExpandEnvVars( const wxString& str, const PROJECT* aProject, std::s
Bracket bracket;
#ifdef __WINDOWS__
if( str_n == wxT( '%' ) )
bracket = Bracket_Windows;
{
bracket = Bracket_Windows;
}
else
#endif // __WINDOWS__
if( n == strlen - 1 )
+88 -51
View File
@@ -347,6 +347,24 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
return true;
}
}
else
{
wxLogTrace( traceDatabase, wxT( "SelectOne: table `%s` not in row cache; will SelectAll" ),
tableName, aWhere.second );
selectAllAndCache( tableName, aWhere.first );
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 ) )
{
@@ -372,15 +390,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
columnsFor( tableName ),
m_quoteChar, tableName, m_quoteChar,
m_quoteChar, columnName, m_quoteChar );
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( queryStr );
PROF_TIMER timer;
nanodbc::statement statement;
try
{
statement.prepare( query );
statement.prepare( *m_conn, query );
statement.bind( 0, aWhere.second.c_str() );
}
catch( nanodbc::database_error& e )
@@ -448,7 +465,7 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
{
aResult[column] = fmt::format( "{:G}", results.get<double>( i ) );
}
catch( nanodbc::null_access_error& e )
catch( nanodbc::null_access_error& )
{
// Column was empty (null)
aResult[column] = std::string();
@@ -474,42 +491,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const std::string& aKey )
{
if( !m_conn )
{
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
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 {}{}{}", columnsFor( aTable ),
m_quoteChar, aTable, m_quoteChar ) );
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
wxLogTrace( traceDatabase, wxT( "selectAllAndCache: `%s`" ), toUTF8( query ) );
PROF_TIMER timer;
@@ -520,7 +509,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while preparing query for SelectAll: %s" ),
wxLogTrace( traceDatabase,
wxT( "Exception while preparing query for selectAllAndCache: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -538,7 +528,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while executing query for SelectAll: %s" ),
wxLogTrace( traceDatabase,
wxT( "Exception while executing query for selectAllAndCache: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -549,15 +540,17 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
timer.Stop();
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
auto handleException =
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
{
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 );
};
{
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from selectAllAndCache: %s%s" ),
cacheEntry.size(), m_lastError, extra );
};
while( results.next() )
{
@@ -605,7 +598,7 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
{
result[column] = fmt::format( "{:G}", results.get<double>( j ) );
}
catch( nanodbc::null_access_error& e )
catch( nanodbc::null_access_error& )
{
// Column was empty (null)
result[column] = std::string();
@@ -634,20 +627,64 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
}
}
aResults.emplace_back( std::move( result ) );
wxASSERT( result.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
cacheEntry[keyStr] = result;
}
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
wxLogTrace( traceDatabase, wxT( "selectAllAndCache from %s completed in %0.1f ms" ), aTable,
timer.msecs() );
for( const ROW& row : aResults )
m_cache->Put( aTable, cacheEntry );
return true;
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
{
if( !m_conn )
{
wxASSERT( row.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
cacheEntry[keyStr] = row;
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
m_cache->Put( aTable, cacheEntry );
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( !m_cache->Get( aTable, cacheEntry ) )
{
if( !selectAllAndCache( aTable, aKey ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` cache fill failed" ), aTable );
return false;
}
// Now it should be filled
m_cache->Get( aTable, cacheEntry );
}
if( !m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` failed to get results from cache!" ),
aTable );
return false;
}
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - returning cached results" ), aTable );
aResults.reserve( cacheEntry.size() );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
+13 -5
View File
@@ -32,6 +32,17 @@
const int dblibSchemaVersion = 1;
DATABASE_FIELD_MAPPING::DATABASE_FIELD_MAPPING( std::string aColumn, std::string aName,
bool aVisibleOnAdd, bool aVisibleInChooser,
bool aShowName, bool aInheritProperties ) :
column( aColumn ),
name( aName ), name_wx( aName.c_str(), wxConvUTF8 ), visible_on_add( aVisibleOnAdd ),
visible_in_chooser( aVisibleInChooser ), show_name( aShowName ),
inherit_properties( aInheritProperties )
{
}
DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
JSON_SETTINGS( aFilename, SETTINGS_LOC::NONE, dblibSchemaVersion )
{
@@ -113,11 +124,8 @@ DATABASE_LIB_SETTINGS::DATABASE_LIB_SETTINGS( const std::string& aFilename ) :
bool inherit = fetchOrDefault<bool>( fieldJson, "inherit_properties" );
table.fields.emplace_back(
DATABASE_FIELD_MAPPING(
{
column, name, visible_on_add, visible_in_chooser, show_name,
inherit
} ) );
DATABASE_FIELD_MAPPING( column, name, visible_on_add,
visible_in_chooser, show_name, inherit ) );
}
}
+149 -7
View File
@@ -217,6 +217,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Tomasz Wlostowski" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jeff Young" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Fabien Corona" ), FORMER_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ), FORMER_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alexis Lockwood" ), FORMER_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Brian Sidebotham" ), FORMER_DEV, nullptr ) );
@@ -224,13 +225,16 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mikolaj Wielgus" ), FORMER_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Martin Aberg" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Yüksel Açikgöz" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Rohan Agrawal" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Johannes Agricola" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Erik Agsjö" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nabeel Ahmad" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Werner Almesberger" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Shawn Anastasio" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Collin Anderson" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Tom Andrews" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Subaru Arai" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mikael Arguedas" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Lachlan Audas" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean-Noel Avila" ), CONTRIB_DEV, nullptr ) );
@@ -246,16 +250,19 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Frank Bennett" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Roman Beranek" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Francois Berder" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Martin Berglund" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Gustav Bergquist" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Cirilo Bernardo" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Joël Bertrand" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andreas Beutling" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Brian F. G. Bidulock" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Anton Blanchard" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Steve Bollinger" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Blair Bonnett" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Markus Bonk" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Franck Bourdonnec" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Carlo Bramini" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Matthias Breithaupt" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Stefan Brüns" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andreas Buhr" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ryan Bunch" ), CONTRIB_DEV, nullptr ) );
@@ -271,8 +278,9 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Marcus Comstedt" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Diogo Condeco" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Colin Cooper" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Fabien Corona" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Emile Cormier" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Garth Corral" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Sergio Costas" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Kevin Cozens" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dan Cross" ), CONTRIB_DEV, nullptr ) );
@@ -283,11 +291,13 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Albin Dennevi" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ruben De Smet" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alexander Dewing" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Okan Demir" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jonas Diemer" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ben Dooks" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Pavel Dovgalyuk" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andrew Downing" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jan Dubiec" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Lucas Dumont" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Gerd Egidy" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean Philippe Eimer" ), CONTRIB_DEV, nullptr ) );
@@ -301,6 +311,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Joe Ferner" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Brian Fiete" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Thomas Figueroa" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Gilbert J.M. Forkel" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Vincenzo Fortunato" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Drew Fustini" ), CONTRIB_DEV, nullptr ) );
@@ -316,6 +327,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jeff Glass" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alexander Golubev" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Angus Gratton" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andrea Greco" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Element Green" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mathias Grimmberger" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Johan Grip" ), CONTRIB_DEV, nullptr ) );
@@ -328,6 +340,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jonathan Haas" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark Hämmerling" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Stefan Hamminga" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ma Han" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Scott Hanson" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ben Harris" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Lukas F. Hartmann" ), CONTRIB_DEV, nullptr ) );
@@ -340,7 +353,11 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Hans Henry von Tresckow" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Diego Herranz" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Marco Hess" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "David Holdeman" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Laurens Holst" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Yang Hongbo" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mario Hros" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Josue Huaroto" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Matt Huszagh" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Torsten Hüter" ), CONTRIB_DEV, nullptr ) );
@@ -351,13 +368,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Vlad Ivanov" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andre Iwers" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Hasan Jaafar" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "James Jackson" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jerry Jacobs" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Christian Jacobsen" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Michal Jahelka" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Martin Janitschke" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jonathan Jara-Almonte" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Gilbert J.M. Forkel" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Zhuang Jiezhi" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "José Jorge Enríquez" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Franck Jullien" ), CONTRIB_DEV, nullptr ) );
@@ -371,6 +389,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Graham Keeth" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Yury Khalyavin" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Eldar Khayrullin" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Georges Khaznadar" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Gary Kim" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ingo Kletti" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Kliment" ), CONTRIB_DEV, nullptr ) );
@@ -440,15 +459,18 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jason Oster" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Frank Palazzolo" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Matus Pavelek" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "luz paz" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Miguel Angel Ajo Pelayo" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Patrick Pereira" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jacobo Aragunde Perez" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Matthew Petroff" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Johannes Pfister" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Fabian Pflug" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Christian Pfluger" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Brian Piccioni" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nicolas Planel" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Paweł Płóciennik" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Carl Poirier" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Reece Pollack" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alain Portal" ), CONTRIB_DEV, nullptr ) );
@@ -461,6 +483,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Barabas Raffai" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Urja Rannikko" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Hendrik v. Raven" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Joshua Redstone" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Michele Renda" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean-Samuel Reynaud" ), CONTRIB_DEV, nullptr ) );
@@ -478,6 +501,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Fabio Rossi" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ian Roth" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Clément Saccoccio" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "J. Morio Sakaguchi" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Simon Schaak" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ross Schlaikjer" ), CONTRIB_DEV, nullptr ) );
@@ -495,6 +519,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Yang Sheng" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Chetan Shinde" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alexander Shuklin" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Adam Simpkins" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Slawomir Siudym" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Marco Serantoni" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Guillaume Simard" ), CONTRIB_DEV, nullptr ) );
@@ -515,11 +540,15 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Alexander Stock" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Martin Stoilov" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Hiroki Suenaga" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Kuba Sunderland-Ober" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nimish Telang" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Martin Thierer" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Karl Thorén" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Hiroshi Tokita" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Vladimir Ur" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Yon Uriarte" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Matthias Urlichs" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Vladimir Uryvaev" ), CONTRIB_DEV, nullptr ) );
@@ -527,20 +556,25 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dave Vandenbout" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Edwin van den Oetelaar" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark van Doesburg" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nils van Zuijlen" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Fabio Varesano" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Benjamin Vernoux" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Frank Villaro-Dixon" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark Visser" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Forrest Voight" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Tormod Volden" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Bartek Wacławik" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Johannes Wågen" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Oliver Walters" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jonathan Warner" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dan Weatherill" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Stefan Weber" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Christian Weickhmann" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Bevan Weiss" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Simon Wells" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dominik Wernberger" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jan Wichmann" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Winters" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Adam Wolf" ), CONTRIB_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Andrzej Wolski" ), CONTRIB_DEV, nullptr ) );
@@ -617,10 +651,18 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxS( "Danish (DA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "Ettore Atalan" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "Ivan Chuba" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "Julian Daube" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "Benedikt Freisen" ),
wxEmptyString,
wxEmptyString,
@@ -633,6 +675,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Johannes Maibaum" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Henrik Kauhanen" ),
wxEmptyString,
wxEmptyString,
@@ -641,6 +687,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ken Ovo" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Karl Schuh" ),
wxEmptyString,
wxEmptyString,
wxS( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominik Wernberger" ),
wxEmptyString,
wxEmptyString,
@@ -687,6 +741,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxS( "Gabriel Martinez" ),
wxEmptyString,
wxEmptyString,
wxS( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jose Perez" ),
wxEmptyString,
wxEmptyString,
@@ -721,6 +779,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Toni Laiho" ),
wxEmptyString,
wxEmptyString,
wxS( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "J. Lavoie" ),
wxEmptyString,
wxEmptyString,
@@ -756,6 +818,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxS( "Italian (IT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Subaru Arai" ),
wxEmptyString,
wxEmptyString,
wxS( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
wxEmptyString,
wxEmptyString,
@@ -865,6 +931,10 @@ 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( "KwonHyeokbeom" ),
wxEmptyString,
wxEmptyString,
@@ -873,6 +943,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "pedrolinharesmoreira" ),
wxEmptyString,
wxEmptyString,
wxS( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Henrik Kauhanen" ),
wxEmptyString,
@@ -891,6 +965,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Laurens Holst" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pim Jansen" ),
wxEmptyString,
wxEmptyString,
@@ -899,10 +977,6 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Bas Wijnen" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tom Niesse" ),
wxEmptyString,
wxEmptyString,
@@ -911,6 +985,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Arend-Jan van Hilten" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Bas Wijnen" ),
wxEmptyString,
wxEmptyString,
wxS( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jarl Gjessing" ),
wxEmptyString,
@@ -945,6 +1027,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Eryk Michalak" ),
wxEmptyString,
wxEmptyString,
wxS( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Filip Piękoś" ),
wxEmptyString,
wxEmptyString,
wxS( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Roszko" ),
wxEmptyString,
wxEmptyString,
@@ -953,6 +1043,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Sobków" ),
wxEmptyString,
wxEmptyString,
wxS( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Grzegorz Szymaszek" ),
wxEmptyString,
wxEmptyString,
@@ -1029,6 +1123,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Swedish (SV)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Elias Sjögreen" ),
wxEmptyString,
wxEmptyString,
wxS( "Swedish (SV)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Boonchai Kingrungped" ),
wxEmptyString,
@@ -1056,6 +1154,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxS( "Ukrainian (UK)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "向阳阳" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "欠陥電気" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Liu Guang" ),
wxEmptyString,
wxEmptyString,
@@ -1076,6 +1182,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hubert Hu" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pinpang Liao" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rigo Ligo" ),
wxEmptyString,
wxEmptyString,
@@ -1084,15 +1198,35 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Zhen Sun" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jason Tan" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "yangyangdaji" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Li Yidong" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tian Yunhao" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Lao Zhu" ),
wxEmptyString,
wxEmptyString,
wxS( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "撒景賢" ),
wxEmptyString,
wxEmptyString,
wxS( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
wxEmptyString,
wxEmptyString,
@@ -1105,11 +1239,15 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
wxS( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "William Lin" ),
wxEmptyString,
wxEmptyString,
wxS( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
wxEmptyString,
wxEmptyString,
wxS( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "william" ),
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Li Yidong" ),
wxEmptyString,
wxEmptyString,
wxS( "Traditional Chinese (zh_TW)" ) ) );
@@ -1249,6 +1387,10 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
ICON_CONTRIBUTION ) );
aInfo.AddArtist( new CONTRIBUTOR( wxT( "Anda Subero" ),
wxEmptyString,
wxEmptyString,
ICON_CONTRIBUTION ) );
aInfo.AddArtist( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
wxEmptyString,
wxEmptyString,
+23 -1
View File
@@ -51,11 +51,30 @@
DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
: DIALOG_ABOUT_BASE( aParent ), m_info( aAppInfo )
: DIALOG_ABOUT_BASE( aParent ),
m_images( nullptr ),
m_info( aAppInfo )
{
wxASSERT( aParent != nullptr );
SetEvtHandlerEnabled( false );
#ifdef __WXMAC__
// HiDPI-aware API; will be generally available in wxWidgets 3.4
wxVector<wxBitmapBundle> images;
images.push_back( KiBitmapBundle( BITMAPS::info ) ); // INFORMATION
images.push_back( KiBitmapBundle( BITMAPS::recent ) ); // VERSION
images.push_back( KiBitmapBundle( BITMAPS::preference ) ); // DEVELOPERS
images.push_back( KiBitmapBundle( BITMAPS::editor ) ); // DOCWRITERS
images.push_back( KiBitmapBundle( BITMAPS::library ) ); // LIBRARIANS
images.push_back( KiBitmapBundle( BITMAPS::color_materials ) ); // ARTISTS
images.push_back( KiBitmapBundle( BITMAPS::language ) ); // TRANSLATORS
images.push_back( KiBitmapBundle( BITMAPS::zip ) ); // PACKAGERS
images.push_back( KiBitmapBundle( BITMAPS::tools ) ); // LICENSE
m_notebook->SetImages( images );
#else
// TODO: Change these to 16x16 versions when available
m_images = new wxImageList( 24, 24, false, 9 );
@@ -70,6 +89,7 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
m_images->Add( KiBitmap( BITMAPS::tools ) ); // LICENSE
m_notebook->SetImageList( m_images );
#endif
if( m_info.GetAppIcon().IsOk() )
{
@@ -108,7 +128,9 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
DIALOG_ABOUT::~DIALOG_ABOUT()
{
#ifndef __WXMAC__
delete m_images;
#endif
}
@@ -34,6 +34,7 @@
#include <pgm_base.h>
#include <widgets/wx_grid.h>
#include <widgets/grid_text_button_helpers.h>
#include <widgets/grid_text_helpers.h>
#include <widgets/std_bitmap_button.h>
#include <algorithm>
@@ -70,7 +71,11 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
m_EnvVars->ClearRows();
m_EnvVars->AppendCols( 1 ); // for the isExternal flags
m_EnvVars->HideCol( TV_FLAG_COL );
#ifndef __WXMAC__
// macos crashes on languages at least using non-ascii characters for the column header here of all places
// if we use native column headers, so guard it for windows to still look nice
m_EnvVars->UseNativeColHeader( true );
#endif
wxGridCellAttr* attr = new wxGridCellAttr;
attr->SetEditor( new GRID_CELL_PATH_EDITOR( this, m_EnvVars, &m_curdir, wxEmptyString ) );
@@ -49,7 +49,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
// Label Appearance
// Cell Defaults
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
m_EnvVars->SetMinSize( wxSize( 604,170 ) );
sbEnvVars->Add( m_EnvVars, 1, wxALL|wxEXPAND, 5 );
@@ -70,7 +70,7 @@ DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWi
sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
bSizerMain->Add( sbEnvVars, 1, wxALL|wxEXPAND, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
+210 -254
View File
@@ -62,109 +62,23 @@
<property name="name">bSizerMain</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property>
<object class="wxGrid" 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="autosize_cols">0</property>
<property name="autosize_rows">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">wxGRID_AUTOSIZE</property>
<property name="col_label_values">&quot;Environment Variables&quot; &quot;Path&quot; &quot;&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">2</property>
<property name="column_sizes">150,454</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_col_move">0</property>
<property name="drag_col_size">1</property>
<property name="drag_grid_size">0</property>
<property name="drag_row_size">1</property>
<property name="editing">1</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="grid_line_color"></property>
<property name="grid_lines">1</property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label_bg"></property>
<property name="label_font"></property>
<property name="label_text"></property>
<property name="margin_height">0</property>
<property name="margin_width">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">604,170</property>
<property name="moveable">1</property>
<property name="name">m_EnvVars</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="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_GRID; widgets/wx_grid.h; 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>
<event name="OnSize">OnGridSize</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Environment Variables</property>
<property name="minimum_size"></property>
<property name="name">bSizerEnvVarBtns</property>
<property name="orient">wxHORIZONTAL</property>
<property name="name">sbEnvVars</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1">
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxGrid" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -173,209 +87,251 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="autosize_cols">0</property>
<property name="autosize_rows">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="cell_bg"></property>
<property name="cell_font"></property>
<property name="cell_horiz_alignment">wxALIGN_LEFT</property>
<property name="cell_text"></property>
<property name="cell_vert_alignment">wxALIGN_CENTER</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="col_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="col_label_size">wxGRID_AUTOSIZE</property>
<property name="col_label_values">&quot;Name&quot; &quot;Path&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTER</property>
<property name="cols">2</property>
<property name="column_sizes">150,454</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_col_move">0</property>
<property name="drag_col_size">1</property>
<property name="drag_grid_size">0</property>
<property name="drag_row_size">1</property>
<property name="editing">1</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="grid_line_color"></property>
<property name="grid_lines">1</property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Add Environment Variable</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="label_bg"></property>
<property name="label_font"></property>
<property name="label_text"></property>
<property name="margin_height">0</property>
<property name="margin_width">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">-1,-1</property>
<property name="minimum_size">604,170</property>
<property name="moveable">1</property>
<property name="name">m_btnAddEnvVar</property>
<property name="name">m_EnvVars</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="row_label_horiz_alignment">wxALIGN_CENTER</property>
<property name="row_label_size">0</property>
<property name="row_label_values"></property>
<property name="row_label_vert_alignment">wxALIGN_CENTER</property>
<property name="row_sizes"></property>
<property name="rows">1</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
<property name="subclass">WX_GRID; widgets/wx_grid.h; 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">OnAddEnvVar</event>
<event name="OnSize">OnGridSize</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND</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 class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerEnvVarBtns</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxLEFT</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">Add Environment Variable</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">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_btnAddEnvVar</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">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; 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">OnAddEnvVar</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</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">wxBOTTOM</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">Delete Environment Variable</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">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_btnDeleteEnvVar</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">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; 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">OnRemoveEnvVar</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM</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">Delete Environment Variable</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">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_btnDeleteEnvVar</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">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; 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">OnRemoveEnvVar</event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxStaticLine" 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="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticline1</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">wxLI_HORIZONTAL</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>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -43,6 +43,9 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
auto mainSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( mainSizer );
m_infoBar = new WX_INFOBAR( this );
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
+16
View File
@@ -57,6 +57,21 @@ DIALOG_GIT_COMMIT::DIALOG_GIT_COMMIT( wxWindow* parent, git_repository* repo,
m_listCtrl->SetColumnWidth( 1, 200 );
// Set up image list for icons
#ifdef __WXMAC__
// HiDPI-aware API; will be generally available in wxWidgets 3.4
wxVector<wxBitmapBundle> stateImages;
stateImages.push_back( wxBitmapBundle() ); // GIT_STATUS_UNTRACKED
stateImages.push_back( KiBitmapBundle( BITMAPS::git_good_check ) ); // GIT_STATUS_CURRENT
stateImages.push_back( KiBitmapBundle( BITMAPS::git_modified ) ); // GIT_STATUS_MODIFIED
stateImages.push_back( KiBitmapBundle( BITMAPS::git_add ) ); // GIT_STATUS_ADDED
stateImages.push_back( KiBitmapBundle( BITMAPS::git_delete ) ); // GIT_STATUS_DELETED
stateImages.push_back( KiBitmapBundle( BITMAPS::git_out_of_date ) ); // GIT_STATUS_BEHIND
stateImages.push_back( KiBitmapBundle( BITMAPS::git_changed_ahead ) ); // GIT_STATUS_AHEAD
stateImages.push_back( KiBitmapBundle( BITMAPS::git_conflict ) ); // GIT_STATUS_CONFLICTED
m_listCtrl->SetNormalImages( stateImages );
m_listCtrl->SetSmallImages( stateImages );
#else
wxImageList* imageList = new wxImageList(
16, 16, true, static_cast<int>( KIGIT_COMMON::GIT_STATUS::GIT_STATUS_LAST ) );
@@ -71,6 +86,7 @@ DIALOG_GIT_COMMIT::DIALOG_GIT_COMMIT( wxWindow* parent, git_repository* repo,
// Assign the image list to the list control
m_listCtrl->SetImageList( imageList, wxIMAGE_LIST_SMALL );
#endif
// Populate list control with items
for( auto& [filename, status] : filesToCommit )
+20 -7
View File
@@ -37,9 +37,15 @@
#include <wx/stdpaths.h>
DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository* aRepository, wxString aURL ) :
DIALOG_GIT_REPOSITORY_BASE( aParent ), m_repository( aRepository ), m_prevFile( wxEmptyString ),
m_tested( 0 ), m_failedTest( false ), m_testError( wxEmptyString ), m_tempRepo( false ),
DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository* aRepository,
wxString aURL ) :
DIALOG_GIT_REPOSITORY_BASE( aParent ),
m_repository( aRepository ),
m_prevFile( wxEmptyString ),
m_tested( 0 ),
m_failedTest( false ),
m_testError( wxEmptyString ),
m_tempRepo( false ),
m_repoType( KIGIT_COMMON::GIT_CONN_TYPE::GIT_CONN_LOCAL )
{
m_txtURL->SetFocus();
@@ -90,7 +96,9 @@ bool DIALOG_GIT_REPOSITORY::extractClipboardData()
{
if( std::get<0>( isValidHTTPS( clipboardText ) )
|| std::get<0>( isValidSSH( clipboardText ) ) )
{
m_txtURL->SetValue( clipboardText );
}
}
wxTheClipboard->Close();
@@ -362,7 +370,8 @@ void DIALOG_GIT_REPOSITORY::OnFileUpdated( wxFileDirPickerEvent& aEvent )
if( !isValid )
{
DisplayErrorMessage( this, _( "Invalid SSH Key" ), _( "The selected file is not a valid SSH private key" ) );
DisplayErrorMessage( this, _( "Invalid SSH Key" ),
_( "The selected file is not a valid SSH private key" ) );
CallAfter( [this] { SetRepoSSHPath( m_prevFile ); } );
return;
}
@@ -386,7 +395,8 @@ void DIALOG_GIT_REPOSITORY::OnFileUpdated( wxFileDirPickerEvent& aEvent )
if( !pubIfs.good() || !pubIfs.is_open() )
{
DisplayErrorMessage( this, wxString::Format( _( "Could not open public key '%s'" ), file + ".pub" ),
DisplayErrorMessage( this, wxString::Format( _( "Could not open public key '%s'" ),
file + ".pub" ),
wxString::Format( "%s: %d", std::strerror( errno ), errno ) );
aEvent.SetPath( wxEmptyString );
CallAfter( [this] { SetRepoSSHPath( m_prevFile ); } );
@@ -404,19 +414,22 @@ void DIALOG_GIT_REPOSITORY::OnOKClick( wxCommandEvent& event )
if( m_txtName->GetValue().IsEmpty() )
{
DisplayErrorMessage( this, _( "Missing information" ), _( "Please enter a name for the repository" ) );
DisplayErrorMessage( this, _( "Missing information" ),
_( "Please enter a name for the repository" ) );
return;
}
if( m_txtURL->GetValue().IsEmpty() )
{
DisplayErrorMessage( this, _( "Missing information" ), _( "Please enter a URL for the repository" ) );
DisplayErrorMessage( this, _( "Missing information" ),
_( "Please enter a URL for the repository" ) );
return;
}
EndModal( wxID_OK );
}
void DIALOG_GIT_REPOSITORY::updateAuthControls()
{
if( m_ConnType->GetSelection() == static_cast<int>( KIGIT_COMMON::GIT_CONN_TYPE::GIT_CONN_LOCAL ) )
+13 -9
View File
@@ -32,7 +32,8 @@
class DIALOG_GIT_REPOSITORY : public DIALOG_GIT_REPOSITORY_BASE
{
public:
DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository* aRepository, wxString aURL = wxEmptyString );
DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository* aRepository,
wxString aURL = wxEmptyString );
~DIALOG_GIT_REPOSITORY() override;
void SetTestResult( bool aFailed, const wxString& aError )
@@ -47,7 +48,10 @@ public:
updateAuthControls();
}
KIGIT_COMMON::GIT_CONN_TYPE GetRepoType() const { return static_cast<KIGIT_COMMON::GIT_CONN_TYPE>( m_ConnType->GetSelection() ); }
KIGIT_COMMON::GIT_CONN_TYPE GetRepoType() const
{
return static_cast<KIGIT_COMMON::GIT_CONN_TYPE>( m_ConnType->GetSelection() );
}
void SetRepoName( const wxString& aName ) { m_txtName->SetValue( aName ); }
wxString GetRepoName() const { return m_txtName->GetValue(); }
@@ -106,19 +110,19 @@ private:
std::tuple<bool,wxString,wxString,wxString> isValidHTTPS( const wxString& url );
std::tuple<bool,wxString, wxString> isValidSSH( const wxString& url );
private:
git_repository* m_repository;
wxString m_prevFile;
wxString m_prevFile;
unsigned m_tested;
bool m_failedTest;
wxString m_testError;
unsigned m_tested;
bool m_failedTest;
wxString m_testError;
bool m_tempRepo;
wxString m_tempPath;
bool m_tempRepo;
wxString m_tempPath;
KIGIT_COMMON::GIT_CONN_TYPE m_repoType;
};
#endif /* DIALOG_GIT_REPOSITORY_H_ */
+41 -32
View File
@@ -55,7 +55,7 @@ void PANEL_GIT_REPOS::ResetPanel()
m_authorEmail->SetValue( wxEmptyString );
}
static std::pair<wxString, wxString> getDefaultAuthorEmail()
static std::pair<wxString, wxString> getDefaultAuthorAndEmail()
{
wxString name;
wxString email;
@@ -94,8 +94,8 @@ static std::pair<wxString, wxString> getDefaultAuthorEmail()
bool PANEL_GIT_REPOS::TransferDataFromWindow()
{
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
auto& repos = settings->m_Git.repositories;
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
std::vector<COMMON_SETTINGS::GIT_REPOSITORY>& repos = settings->m_Git.repositories;
repos.clear();
@@ -109,7 +109,8 @@ bool PANEL_GIT_REPOS::TransferDataFromWindow()
repo.authType = m_grid->GetCellValue( row, COL_AUTH_TYPE );
repo.username = m_grid->GetCellValue( row, COL_USERNAME );
KIPLATFORM::SECRETS::StoreSecret( repo.path, repo.username, m_grid->GetCellValue( row, COL_PASSWORD ) );
KIPLATFORM::SECRETS::StoreSecret( repo.path, repo.username,
m_grid->GetCellValue( row, COL_PASSWORD ) );
repo.ssh_path = m_grid->GetCellValue( row, COL_SSH_PATH );
repo.checkValid = m_grid->GetCellValue( row, COL_STATUS ) == "1";
repos.push_back( repo );
@@ -126,7 +127,8 @@ static bool testRepositoryConnection( COMMON_SETTINGS::GIT_REPOSITORY& repositor
{
git_libgit2_init();
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
git_remote_callbacks callbacks;
callbacks.version = GIT_REMOTE_CALLBACKS_VERSION;
typedef struct
{
@@ -134,35 +136,39 @@ static bool testRepositoryConnection( COMMON_SETTINGS::GIT_REPOSITORY& repositor
bool success;
} callbacksPayload;
callbacksPayload cb_data( { &repository, true } ); // If we don't need authentication, then, we are successful
callbacksPayload cb_data( { &repository, true } ); // If we don't need authentication, then,
// we are successful
callbacks.payload = &cb_data;
callbacks.credentials = [](git_cred** out, const char* url, const char* username, unsigned int allowed_types, void* payload) -> int {
callbacks.credentials =
[](git_cred** out, const char* url, const char* username, unsigned int allowed_types,
void* payload) -> int
{
// If we are asking for credentials, then, we need authentication
// If we are asking for credentials, then, we need authentication
callbacksPayload* data = static_cast<callbacksPayload*>(payload);
callbacksPayload* data = static_cast<callbacksPayload*>(payload);
data->success = false;
data->success = false;
if( allowed_types & GIT_CREDTYPE_USERNAME )
{
data->success = true;
}
else if( data->repo->authType == "ssh" && ( allowed_types & GIT_CREDTYPE_SSH_KEY ) )
{
wxString sshKeyPath = data->repo->ssh_path;
if( allowed_types & GIT_CREDTYPE_USERNAME )
{
data->success = true;
}
else if( data->repo->authType == "ssh" && ( allowed_types & GIT_CREDTYPE_SSH_KEY ) )
{
wxString sshKeyPath = data->repo->ssh_path;
// Check if the SSH key exists and is readable
if( wxFileExists( sshKeyPath ) && wxFile::Access( sshKeyPath, wxFile::read ) )
data->success = true;
}
else if( data->repo->authType == "password" )
{
data->success = ( allowed_types & GIT_CREDTYPE_USERPASS_PLAINTEXT );
}
// Check if the SSH key exists and is readable
if( wxFileExists( sshKeyPath ) && wxFile::Access( sshKeyPath, wxFile::read ) )
data->success = true;
}
else if( data->repo->authType == "password" )
{
data->success = ( allowed_types & GIT_CREDTYPE_USERPASS_PLAINTEXT );
}
return 0;
};
return 0;
};
// Create a temporary directory to initialize the Git repository
wxString tempDirPath = wxFileName::CreateTempFileName(wxT("kigit_temp"));
@@ -177,9 +183,10 @@ static bool testRepositoryConnection( COMMON_SETTINGS::GIT_REPOSITORY& repositor
// Initialize the Git repository
git_repository* repo = nullptr;
int result = git_repository_init(&repo, tempDirPath.mb_str(wxConvUTF8), 0);
int result = git_repository_init( &repo, tempDirPath.mb_str( wxConvUTF8 ), 0 );
if (result != 0) {
if (result != 0)
{
git_repository_free(repo);
git_libgit2_shutdown();
wxRmdir(tempDirPath);
@@ -187,8 +194,10 @@ static bool testRepositoryConnection( COMMON_SETTINGS::GIT_REPOSITORY& repositor
}
git_remote* remote = nullptr;
result = git_remote_create_anonymous(&remote, repo, tempDirPath.mb_str(wxConvUTF8));
if (result != 0) {
result = git_remote_create_anonymous( &remote, repo, tempDirPath.mb_str( wxConvUTF8 ) );
if (result != 0)
{
git_remote_free(remote);
git_repository_free(repo);
git_libgit2_shutdown();
@@ -249,7 +258,7 @@ bool PANEL_GIT_REPOS::TransferDataToWindow()
if( settings->m_Git.useDefaultAuthor )
{
auto defaultAuthor = getDefaultAuthorEmail();
std::pair<wxString, wxString> defaultAuthor = getDefaultAuthorAndEmail();
m_author->SetValue( defaultAuthor.first );
m_authorEmail->SetValue( defaultAuthor.second );
m_author->Disable();
+12
View File
@@ -71,6 +71,18 @@ PANEL_GRID_SETTINGS::PANEL_GRID_SETTINGS( wxWindow* aParent, UNITS_PROVIDER* aUn
m_checkGridOverrideWires->Show( false );
m_gridOverrideWiresChoice->Show( false );
}
if( m_frameType == FRAME_GERBER )
{
m_overridesLabel->Show( false );
m_staticline3->Show( false );
m_checkGridOverrideText->Show( false );
m_gridOverrideTextChoice->Show( false );
m_checkGridOverrideGraphics->Show( false );
m_gridOverrideGraphicsChoice->Show( false );
}
}
int hk1 = ACTIONS::gridFast1.GetHotKey();
+7 -7
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -111,7 +111,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
bSizerRightCol->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxFlexGridSizer* fgGridOverrides;
fgGridOverrides = new wxFlexGridSizer( 0, 2, 4, 0 );
fgGridOverrides = new wxFlexGridSizer( 0, 2, 5, 0 );
fgGridOverrides->AddGrowableCol( 1 );
fgGridOverrides->SetFlexibleDirection( wxBOTH );
fgGridOverrides->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
@@ -122,7 +122,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
wxArrayString m_gridOverrideConnectedChoiceChoices;
m_gridOverrideConnectedChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideConnectedChoiceChoices, 0 );
m_gridOverrideConnectedChoice->SetSelection( 0 );
fgGridOverrides->Add( m_gridOverrideConnectedChoice, 0, wxALL, 5 );
fgGridOverrides->Add( m_gridOverrideConnectedChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_checkGridOverrideWires = new wxCheckBox( this, wxID_ANY, _("Wires:"), wxDefaultPosition, wxDefaultSize, 0 );
fgGridOverrides->Add( m_checkGridOverrideWires, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
@@ -130,7 +130,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
wxArrayString m_gridOverrideWiresChoiceChoices;
m_gridOverrideWiresChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideWiresChoiceChoices, 0 );
m_gridOverrideWiresChoice->SetSelection( 0 );
fgGridOverrides->Add( m_gridOverrideWiresChoice, 0, wxALL, 5 );
fgGridOverrides->Add( m_gridOverrideWiresChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_checkGridOverrideVias = new wxCheckBox( this, wxID_ANY, _("Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
fgGridOverrides->Add( m_checkGridOverrideVias, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
@@ -138,7 +138,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
wxArrayString m_gridOverrideViasChoiceChoices;
m_gridOverrideViasChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideViasChoiceChoices, 0 );
m_gridOverrideViasChoice->SetSelection( 0 );
fgGridOverrides->Add( m_gridOverrideViasChoice, 0, wxALL, 5 );
fgGridOverrides->Add( m_gridOverrideViasChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_checkGridOverrideText = new wxCheckBox( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
fgGridOverrides->Add( m_checkGridOverrideText, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
@@ -146,7 +146,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
wxArrayString m_gridOverrideTextChoiceChoices;
m_gridOverrideTextChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideTextChoiceChoices, 0 );
m_gridOverrideTextChoice->SetSelection( 0 );
fgGridOverrides->Add( m_gridOverrideTextChoice, 0, wxALL, 5 );
fgGridOverrides->Add( m_gridOverrideTextChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_checkGridOverrideGraphics = new wxCheckBox( this, wxID_ANY, _("Graphics:"), wxDefaultPosition, wxDefaultSize, 0 );
fgGridOverrides->Add( m_checkGridOverrideGraphics, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_LEFT|wxLEFT, 8 );
@@ -154,7 +154,7 @@ PANEL_GRID_SETTINGS_BASE::PANEL_GRID_SETTINGS_BASE( wxWindow* parent, wxWindowID
wxArrayString m_gridOverrideGraphicsChoiceChoices;
m_gridOverrideGraphicsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridOverrideGraphicsChoiceChoices, 0 );
m_gridOverrideGraphicsChoice->SetSelection( 0 );
fgGridOverrides->Add( m_gridOverrideGraphicsChoice, 0, wxALL, 5 );
fgGridOverrides->Add( m_gridOverrideGraphicsChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bSizerRightCol->Add( fgGridOverrides, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+3 -6
View File
@@ -442,14 +442,11 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
m_netSettings->m_NetClassPatternAssignments.push_back(
{
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
netclass
} );
m_netSettings->m_NetClassPatternAssignmentCache.clear();
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
}
m_netSettings->m_NetClassPatternAssignmentCache.clear();
return true;
}
+1
View File
@@ -29,6 +29,7 @@
#include <project.h>
#include <grid_tricks.h>
#include <widgets/std_bitmap_button.h>
#include <widgets/grid_text_helpers.h>
#include <algorithm>
+15 -2
View File
@@ -648,8 +648,21 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
{
if( m_gal )
m_gal->SetNativeCursorStyle( aCursor );
if( !m_gal )
return;
DPI_SCALING_COMMON dpi( nullptr, m_parent );
bool hidpi = false;
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
// resulting in 4x rendered size on 2x window scale.
// MSW renders the bitmap as-is, without scaling, so this works here.
#ifdef __WXMSW__
hidpi = dpi.GetContentScaleFactor() >= 2.0;
#endif
m_gal->SetNativeCursorStyle( aCursor, hidpi );
}
+29
View File
@@ -681,6 +681,35 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
if( m_ConstrainedTextSize.y == 0 )
m_ConstrainedTextSize.y = DS_DATA_MODEL::GetTheInstance().m_DefaultTextSize.y;
if( m_BoundingBoxSize.x > 0 || m_BoundingBoxSize.y > 0 )
{
// to know the X and Y size of the line, we should use EDA_TEXT::GetTextBox()
// but this function uses integers
// So, to avoid truncations with our unit in mm, use microns.
VECTOR2I size_micron;
#define FSCALE 1000.0
int linewidth = 0;
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
DS_DRAW_ITEM_TEXT dummy( unityScale, this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron,
linewidth, m_Font, m_Italic, m_Bold, m_TextColor );
dummy.SetMultilineAllowed( true );
dummy.SetHorizJustify( m_Hjustify ) ;
dummy.SetVertJustify( m_Vjustify );
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
BOX2I rect = dummy.GetTextBox();
VECTOR2D size;
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
if( m_BoundingBoxSize.x > 0 && size.x > m_BoundingBoxSize.x )
m_ConstrainedTextSize.x *= m_BoundingBoxSize.x / size.x;
if( m_BoundingBoxSize.y > 0 && size.y > m_BoundingBoxSize.y )
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
}
}
+2 -2
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
@@ -121,7 +121,7 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
if( token->IsSameAs( wxT( "KICAD_VERSION" ) ) && PgmOrNull() )
{
*token = wxString::Format( wxT( "%s %s" ), productName, GetSemanticVersion() );
*token = wxString::Format( wxT( "%s %s" ), productName, GetBaseVersion() );
tokenUpdated = true;
}
else if( token->IsSameAs( wxT( "#" ) ) )
+6 -1
View File
@@ -265,6 +265,10 @@ void EDA_BASE_FRAME::windowClosing( wxCloseEvent& event )
EDA_BASE_FRAME::~EDA_BASE_FRAME()
{
Disconnect( ID_AUTO_SAVE_TIMER, wxEVT_TIMER,
wxTimerEventHandler( EDA_BASE_FRAME::onAutoSaveTimer ) );
Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( EDA_BASE_FRAME::windowClosing ) );
delete m_autoSaveTimer;
delete m_fileHistory;
@@ -483,7 +487,7 @@ void EDA_BASE_FRAME::ReCreateMenuBar()
* ensure that they do not occur within the same event handling call stack.
*/
CallAfter( [&]()
CallAfter( [this]()
{
if( !m_isClosing )
doReCreateMenuBar();
@@ -1202,6 +1206,7 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
book->AddPage( new wxPanel( book ), _( "Gerber Viewer" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_DISPLAY_OPTIONS ), _( "Display Options" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_COLORS ), _( "Colors" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_GRIDS ), _( "Grids" ) );
book->AddLazySubPage( LAZY_CTOR( PANEL_GBR_EXCELLON_OPTIONS ), _( "Excellon Options" ) );
}
catch( ... )
+31 -29
View File
@@ -401,8 +401,6 @@ void EDA_SHAPE::flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
m_start.y = aCentre.y - ( m_start.y - aCentre.y );
m_end.y = aCentre.y - ( m_end.y - aCentre.y );
}
std::swap( m_start, m_end );
break;
case SHAPE_T::CIRCLE:
@@ -1955,16 +1953,6 @@ 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 isNotPolygonOrCircle = []( INSPECTABLE* aItem ) -> bool
{
// Polygons, unlike other shapes, have no meaningful start or end coordinates
@@ -1983,53 +1971,65 @@ static struct EDA_SHAPE_DESC
return false;
};
const wxString shapeProps = _HKI( "Shape Properties" );
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( shape, shapeProps );
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 ),
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
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 ),
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ) )
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ) )
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Radius" ),
&EDA_SHAPE::SetRadius, &EDA_SHAPE::GetRadius, PROPERTY_DISPLAY::PT_SIZE,
ORIGIN_TRANSFORMS::NOT_A_COORD ) )
ORIGIN_TRANSFORMS::NOT_A_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
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 ),
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
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 ),
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ) );
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ),
shapeProps );
void ( EDA_SHAPE::*lineStyleSetter )( LINE_STYLE ) = &EDA_SHAPE::SetLineStyle;
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, LINE_STYLE>(
_HKI( "Line Style" ), lineStyleSetter, &EDA_SHAPE::GetLineStyle ) );
propMgr.AddProperty( new PROPERTY_ENUM<EDA_SHAPE, LINE_STYLE>( _HKI( "Line Style" ),
lineStyleSetter, &EDA_SHAPE::GetLineStyle ),
shapeProps );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, COLOR4D>( _HKI( "Line Color" ),
&EDA_SHAPE::SetLineColor, &EDA_SHAPE::GetLineColor ) )
&EDA_SHAPE::SetLineColor, &EDA_SHAPE::GetLineColor ),
shapeProps )
.SetIsHiddenFromRulesEditor();
auto angle = new PROPERTY<EDA_SHAPE, EDA_ANGLE>( _HKI( "Angle" ),
@@ -2043,7 +2043,7 @@ static struct EDA_SHAPE_DESC
return false;
} );
propMgr.AddProperty( angle );
propMgr.AddProperty( angle, shapeProps );
auto fillAvailable =
[=]( INSPECTABLE* aItem ) -> bool
@@ -2066,11 +2066,13 @@ static struct EDA_SHAPE_DESC
};
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, bool>( _HKI( "Filled" ),
&EDA_SHAPE::SetFilled, &EDA_SHAPE::IsFilled ) )
&EDA_SHAPE::SetFilled, &EDA_SHAPE::IsFilled ),
shapeProps )
.SetAvailableFunc( fillAvailable );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, COLOR4D>( _HKI( "Fill Color" ),
&EDA_SHAPE::SetFillColor, &EDA_SHAPE::GetFillColor ) )
&EDA_SHAPE::SetFillColor, &EDA_SHAPE::GetFillColor ),
shapeProps )
.SetAvailableFunc( fillAvailable )
.SetIsHiddenFromRulesEditor();
}
+15 -10
View File
@@ -48,6 +48,7 @@
#include <font/outline_font.h>
#include <geometry/shape_poly_set.h>
#include <properties/property_validators.h>
#include <ctl_flags.h> // for CTL_OMIT_HIDE definition
#include <wx/debug.h> // for wxASSERT
#include <wx/string.h>
@@ -364,8 +365,8 @@ void EDA_TEXT::SetTextSize( VECTOR2I aNewSize, bool aEnforceMinTextSize )
if( aEnforceMinTextSize )
{
int min = m_IuScale.get().MilsToIU( TEXT_MIN_SIZE_MILS );
int max = m_IuScale.get().MilsToIU( TEXT_MAX_SIZE_MILS );
int min = m_IuScale.get().mmToIU( TEXT_MIN_SIZE_MM );
int max = m_IuScale.get().mmToIU( TEXT_MAX_SIZE_MM );
aNewSize = VECTOR2I( alg::clamp( min, aNewSize.x, max ),
alg::clamp( min, aNewSize.y, max ) );
@@ -380,8 +381,8 @@ void EDA_TEXT::SetTextSize( VECTOR2I aNewSize, bool aEnforceMinTextSize )
void EDA_TEXT::SetTextWidth( int aWidth )
{
int min = m_IuScale.get().MilsToIU( TEXT_MIN_SIZE_MILS );
int max = m_IuScale.get().MilsToIU( TEXT_MAX_SIZE_MILS );
int min = m_IuScale.get().mmToIU( TEXT_MIN_SIZE_MM );
int max = m_IuScale.get().mmToIU( TEXT_MAX_SIZE_MM );
m_attributes.m_Size.x = alg::clamp( min, aWidth, max );
ClearRenderCache();
@@ -391,8 +392,8 @@ void EDA_TEXT::SetTextWidth( int aWidth )
void EDA_TEXT::SetTextHeight( int aHeight )
{
int min = m_IuScale.get().MilsToIU( TEXT_MIN_SIZE_MILS );
int max = m_IuScale.get().MilsToIU( TEXT_MAX_SIZE_MILS );
int min = m_IuScale.get().mmToIU( TEXT_MIN_SIZE_MM );
int max = m_IuScale.get().mmToIU( TEXT_MAX_SIZE_MM );
m_attributes.m_Size.y = alg::clamp( min, aHeight, max );
ClearRenderCache();
@@ -528,10 +529,13 @@ EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolved
}
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE& aAngle )
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FONT* aFont,
const EDA_ANGLE& aAngle, const VECTOR2I& aOffset )
{
m_render_cache_text = aResolvedText;
m_render_cache_font = aFont;
m_render_cache_angle = aAngle;
m_render_cache_offset = aOffset;
m_render_cache.clear();
}
@@ -539,6 +543,7 @@ void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE&
void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
{
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( aPoly ) );
static_cast<KIFONT::OUTLINE_GLYPH*>( m_render_cache.back().get() )->CacheTriangulation();
}
@@ -914,7 +919,7 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
if( IsItalic() )
aFormatter->Print( 0, " (italic yes)" );
if( GetTextColor() != COLOR4D::UNSPECIFIED )
if( !( aControlBits & CTL_OMIT_COLOR ) && GetTextColor() != COLOR4D::UNSPECIFIED )
{
aFormatter->Print( 0, " (color %d %d %d %s)",
KiROUND( GetTextColor().r * 255.0 ),
@@ -945,7 +950,7 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
if( !( aControlBits & CTL_OMIT_HIDE ) && !IsVisible() )
aFormatter->Print( 0, " (hide yes)" );
if( HasHyperlink() )
if( !( aControlBits & CTL_OMIT_HYPERLINK ) && HasHyperlink() )
{
aFormatter->Print( 0, " (href %s)", aFormatter->Quotew( GetHyperlink() ).c_str() );
}
@@ -1176,7 +1181,7 @@ static struct EDA_TEXT_DESC
&EDA_TEXT::SetTextAngleDegrees, &EDA_TEXT::GetTextAngleDegrees,
PROPERTY_DISPLAY::PT_DEGREE ) );
const wxString textProps = _( "Text Properties" );
const wxString textProps = _HKI( "Text Properties" );
propMgr.AddProperty( new PROPERTY<EDA_TEXT, wxString>( _HKI( "Text" ),
&EDA_TEXT::SetText, &EDA_TEXT::GetText ),
+48 -15
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 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
@@ -28,6 +28,22 @@
#include <charconv>
#include <wx/translation.h>
static void removeTrailingZeros( wxString& aText )
{
int len = aText.length();
int removeLast = 0;
while( --len > 0 && aText[len] == '0' )
removeLast++;
if( len >= 0 && ( aText[len] == '.' || aText[len] == ',' ) )
removeLast++;
aText = aText.RemoveLast( removeLast );
}
bool EDA_UNIT_UTILS::IsImperialUnit( EDA_UNITS aUnit )
{
switch( aUnit )
@@ -305,29 +321,46 @@ wxString EDA_UNIT_UTILS::UI::StringFromValue( const EDA_IU_SCALE& aIuScale, EDA_
break;
}
char buf[50];
const wxChar* format = nullptr;
if( value_to_print != 0.0 && fabs( value_to_print ) <= 0.0001 )
switch( aUnits )
{
int len = snprintf( buf, sizeof( buf ) - 1, "%.10f", value_to_print );
while( --len > 0 && buf[len] == '0' )
buf[len] = '\0';
case EDA_UNITS::MILS:
#if defined( EESCHEMA )
format = wxT( "%.3f" );
#else
format = wxT( "%.5f" );
#endif
break;
if( len >= 0 && ( buf[len] == '.' || buf[len] == ',' ) )
buf[len] = '\0';
}
else
{
snprintf( buf, sizeof( buf ) - 1, "%.10g", value_to_print );
case EDA_UNITS::INCHES:
#if defined( EESCHEMA )
format = wxT( "%.6f" );
#else
format = wxT( "%.8f" );
#endif
break;
default:
format = wxT( "%.10f" );
break;
}
wxString stringValue( buf, wxConvUTF8 );
wxString text;
text.Printf( format, value_to_print );
removeTrailingZeros( text );
if( value_to_print != 0.0 && ( text == wxS( "0" ) || text == wxS( "-0" ) ) )
{
text.Printf( wxS( "%.10f" ), value_to_print );
removeTrailingZeros( text );
}
if( aAddUnitsText )
stringValue += EDA_UNIT_UTILS::GetText( aUnits, aType );
text << EDA_UNIT_UTILS::GetText( aUnits, aType );
return stringValue;
return text;
}
+6 -2
View File
@@ -59,7 +59,9 @@ void IO_ERROR::init( const wxString& aProblem, const char* aThrowersFile,
// a short filename will be printed (it is better for user, the full filename has no meaning).
wxString srcname = aThrowersFile;
where.Printf( _( "from %s : %s() line %d" ),
// No need for translations of source code file/line messages (and wxWidget's translation
// stuff has bitten us before. May be related to KICAD-YP.
where.Printf( wxS( "from %s : %s() line %d" ),
srcname.AfterLast( '/' ),
wxString( aThrowersFunction ),
aThrowersLineNumber );
@@ -87,7 +89,9 @@ void PARSE_ERROR::init( const wxString& aProblem, const char* aThrowersFile,
// a short filename will be printed (it is better for user, the full filename has no meaning).
wxString srcname = aThrowersFile;
where.Printf( _( "from %s : %s() line:%d" ),
// No need for translations of source code file/line messages (and wxWidget's translation
// stuff has bitten us before. May be related to KICAD-YP.
where.Printf( wxS( "from %s : %s() line %d" ),
srcname.AfterLast( '/' ),
wxString( aThrowersFunction ),
aThrowersLineNumber );
+28 -2
View File
@@ -26,6 +26,7 @@
#include <string_utils.h>
#include <macros.h>
#include <cstdint>
#include <reporter.h>
#ifdef __WIN32__
#define WIN32_LEAN_AND_MEAN
@@ -37,6 +38,8 @@ using namespace fontconfig;
static FONTCONFIG* g_config = nullptr;
static bool g_fcInitSuccess = false;
REPORTER* FONTCONFIG::s_reporter = nullptr;
/**
* A simple wrapper to avoid exporing fontconfig in the header
*/
@@ -57,6 +60,12 @@ FONTCONFIG::FONTCONFIG()
};
void fontconfig::FONTCONFIG::SetReporter( REPORTER* aReporter )
{
s_reporter = aReporter;
}
/**
* This is simply a wrapper to call FcInit() with SEH for Windows
* SEH on Windows can only be used in functions without objects that might be unwinded
@@ -195,6 +204,17 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
if( !g_fcInitSuccess )
return retval;
// If the original font name contains any of these, then it is bold, regardless
// of whether we are looking for bold or not
if( aFontName.Lower().Contains( wxS( "bold" ) ) // also catches ultrabold
|| aFontName.Lower().Contains( wxS( "heavy" ) )
|| aFontName.Lower().Contains( wxS( "black" ) ) // also catches extrablack
|| aFontName.Lower().Contains( wxS( "thick" ) )
|| aFontName.Lower().Contains( wxS( "dark" ) ) )
{
aBold = true;
}
wxString qualifiedFontName = aFontName;
wxScopedCharBuffer const fcBuffer = qualifiedFontName.ToUTF8();
@@ -317,12 +337,18 @@ FONTCONFIG::FF_RESULT FONTCONFIG::FindFont( const wxString &aFontName, wxString
if( retval == FF_RESULT::FF_ERROR )
{
wxLogWarning( _( "Error loading font '%s'." ), qualifiedFontName );
if( s_reporter )
s_reporter->Report( wxString::Format( _( "Error loading font '%s'." ), qualifiedFontName ) );
}
else if( retval == FF_RESULT::FF_SUBSTITUTE )
{
fontName.Replace( ':', ' ' );
wxLogWarning( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName );
// If we missed a case but the matching found the original font name, then we are not substituting
if( fontName.CmpNoCase( qualifiedFontName ) == 0 )
retval = FF_RESULT::FF_OK;
else if( s_reporter )
s_reporter->Report( wxString::Format( _( "Font '%s' not found; substituting '%s'." ), qualifiedFontName, fontName ) );
}
FcPatternDestroy( pat );
+44 -8
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2021 Ola Rinta-Koski <gitlab@rinta-koski.net>
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2024 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
@@ -82,19 +82,19 @@ std::unique_ptr<GLYPH> STROKE_GLYPH::Transform( const VECTOR2D& aGlyphSize, cons
end.x *= aGlyphSize.x;
end.y *= aGlyphSize.y;
if( aTilt )
if( aTilt != 0.0 )
end.x -= end.y * aTilt;
glyph->m_boundingBox.SetEnd( end );
glyph->m_boundingBox.Offset( aOffset );
for( std::vector<VECTOR2D>& pointList : *glyph.get() )
for( std::vector<VECTOR2D>& pointList : *glyph )
{
for( VECTOR2D& point : pointList )
{
point *= aGlyphSize;
if( aTilt )
if( aTilt != 0.0 )
point.x -= point.y * aTilt;
point += aOffset;
@@ -111,6 +111,18 @@ std::unique_ptr<GLYPH> STROKE_GLYPH::Transform( const VECTOR2D& aGlyphSize, cons
}
void STROKE_GLYPH::Move( const VECTOR2I& aOffset )
{
m_boundingBox.Offset( aOffset );
for( std::vector<VECTOR2D>& pointList : *this )
{
for( VECTOR2D& point : pointList )
point += aOffset;
}
}
BOX2D OUTLINE_GLYPH::BoundingBox()
{
BOX2I bbox = BBox();
@@ -122,10 +134,7 @@ void OUTLINE_GLYPH::Triangulate( std::function<void( const VECTOR2I& aPt1,
const VECTOR2I& aPt2,
const VECTOR2I& aPt3 )> aCallback ) const
{
// Only call CacheTriangulation if it has never been done before. Otherwise we'll hash
// the triangulation to see if it has been edited, and glyphs after creation are read-only.
if( TriangulatedPolyCount() == 0 )
const_cast<OUTLINE_GLYPH*>( this )->CacheTriangulation( false );
const_cast<OUTLINE_GLYPH*>( this )->CacheTriangulation( false );
for( unsigned int i = 0; i < TriangulatedPolyCount(); i++ )
{
@@ -141,3 +150,30 @@ void OUTLINE_GLYPH::Triangulate( std::function<void( const VECTOR2I& aPt1,
}
void OUTLINE_GLYPH::CacheTriangulation( bool aPartition, bool aSimplify )
{
// Only call CacheTriangulation if it has never been done before. Otherwise we'll hash
// the triangulation to see if it has been edited, and glyphs are invariant after creation.
//
// Also forces "partition" to false as we never want to partition a glyph.
if( TriangulatedPolyCount() == 0 )
SHAPE_POLY_SET::CacheTriangulation( false, aSimplify );
}
std::vector<std::unique_ptr<SHAPE_POLY_SET::TRIANGULATED_POLYGON>> OUTLINE_GLYPH::GetTriangulationData() const
{
std::vector<std::unique_ptr<SHAPE_POLY_SET::TRIANGULATED_POLYGON>> data;
for( const std::unique_ptr<SHAPE_POLY_SET::TRIANGULATED_POLYGON>& poly : m_triangulatedPolys )
data.push_back( std::make_unique<SHAPE_POLY_SET::TRIANGULATED_POLYGON>( *poly ) );
return data;
}
void OUTLINE_GLYPH::CacheTriangulation( std::vector<std::unique_ptr<SHAPE_POLY_SET::TRIANGULATED_POLYGON>>& aHintData )
{
cacheTriangulation( false, false, &aHintData );
}
+3 -3
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2021 Ola Rinta-Koski <gitlab@rinta-koski.net>
* Copyright (C) 2021 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2024 Kicad Developers, see AUTHORS.txt for contributors.
*
* Outline font class
*
@@ -39,8 +39,8 @@ OUTLINE_DECOMPOSER::OUTLINE_DECOMPOSER( FT_Outline& aOutline ) :
static VECTOR2D toVector2D( const FT_Vector* aFreeTypeVector )
{
return VECTOR2D( aFreeTypeVector->x * GLYPH_SIZE_SCALER,
aFreeTypeVector->y * GLYPH_SIZE_SCALER );
return VECTOR2D( (double) aFreeTypeVector->x * GLYPH_SIZE_SCALER,
(double) aFreeTypeVector->y * GLYPH_SIZE_SCALER );
}
+96 -45
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2021 Ola Rinta-Koski <gitlab@rinta-koski.net>
* Copyright (C) 2021-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2024 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
@@ -255,6 +255,40 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
aOrigin, aTextStyle );
}
struct GLYPH_CACHE_KEY {
FT_Face face;
hb_codepoint_t codepoint;
double scaler;
bool fakeItalic;
bool fakeBold;
bool mirror;
EDA_ANGLE angle;
bool operator==(const GLYPH_CACHE_KEY& rhs ) const
{
return face == rhs.face && codepoint == rhs.codepoint && scaler == rhs.scaler
&& fakeItalic == rhs.fakeItalic && fakeBold == rhs.fakeBold
&& mirror == rhs.mirror && angle == rhs.angle;
}
};
namespace std
{
template <>
struct hash<GLYPH_CACHE_KEY>
{
std::size_t operator()( const GLYPH_CACHE_KEY& k ) const
{
return hash<const void*>()( k.face ) ^ hash<unsigned>()( k.codepoint )
^ hash<double>()( k.scaler )
^ hash<int>()( k.fakeItalic ) ^ hash<int>()( k.fakeBold )
^ hash<int>()( k.mirror ) ^ hash<int>()( k.angle.AsTenthsOfADegree() );
}
};
}
VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
std::vector<std::unique_ptr<GLYPH>>* aGlyphs,
const wxString& aText, const VECTOR2I& aSize,
@@ -295,6 +329,10 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
if( aGlyphs )
aGlyphs->reserve( glyphCount );
// GLYPH_DATA is a collection of all outlines in the glyph; for example the 'o' glyph
// generally contains 2 contours, one for the glyph outline and one for the hole
static std::unordered_map<GLYPH_CACHE_KEY, GLYPH_DATA> s_glyphCache;
for( unsigned int i = 0; i < glyphCount; i++ )
{
// Don't process glyphs that were already included in a previous cluster
@@ -303,64 +341,67 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
if( aGlyphs )
{
if( m_fakeItal )
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, scaler, m_fakeItal, m_fakeBold,
aMirror, aAngle };
GLYPH_DATA& glyphData = s_glyphCache[ key ];
if( glyphData.m_Contours.empty() )
{
FT_Matrix matrix;
// Create a 12 degree slant
const float angle = (float)( -M_PI * 12.0f ) / 180.0f;
matrix.xx = (FT_Fixed) ( cos( angle ) * 0x10000L );
matrix.xy = (FT_Fixed) ( -sin( angle ) * 0x10000L );
matrix.yx = (FT_Fixed) ( 0 * 0x10000L ); // Don't rotate in the y direction
matrix.yy = (FT_Fixed) ( 1 * 0x10000L );
if( m_fakeItal )
{
FT_Matrix matrix;
// Create a 12 degree slant
const float angle = (float)( -M_PI * 12.0f ) / 180.0f;
matrix.xx = (FT_Fixed) ( cos( angle ) * 0x10000L );
matrix.xy = (FT_Fixed) ( -sin( angle ) * 0x10000L );
matrix.yx = (FT_Fixed) ( 0 * 0x10000L ); // Don't rotate in the y direction
matrix.yy = (FT_Fixed) ( 1 * 0x10000L );
FT_Set_Transform( face, &matrix, 0 );
}
FT_Set_Transform( face, &matrix, nullptr );
}
FT_Load_Glyph( face, glyphInfo[i].codepoint, FT_LOAD_NO_BITMAP );
FT_Load_Glyph( face, glyphInfo[i].codepoint, FT_LOAD_NO_BITMAP );
if( m_fakeBold )
FT_Outline_Embolden( &face->glyph->outline, 1 << 6 );
if( m_fakeBold )
FT_Outline_Embolden( &face->glyph->outline, 1 << 6 );
// contours is a collection of all outlines in the glyph; for example the 'o' glyph
// generally contains 2 contours, one for the glyph outline and one for the hole
std::vector<CONTOUR> contours;
OUTLINE_DECOMPOSER decomposer( face->glyph->outline );
OUTLINE_DECOMPOSER decomposer( face->glyph->outline );
if( !decomposer.OutlineToSegments( &glyphData.m_Contours ) )
{
double hb_advance = glyphPos[i].x_advance * GLYPH_SIZE_SCALER;
BOX2D tofuBox( { scaler * 0.03, 0.0 },
{ hb_advance - scaler * 0.02, scaler * 0.72 } );
if( !decomposer.OutlineToSegments( &contours ) )
{
double hb_advance = glyphPos[i].x_advance * GLYPH_SIZE_SCALER;
BOX2D tofuBox( { scaler * 0.03, 0.0 },
{ hb_advance - scaler * 0.02, scaler * 0.72 } );
glyphData.m_Contours.clear();
contours.clear();
CONTOUR outline;
outline.m_Winding = 1;
outline.m_Orientation = FT_ORIENTATION_TRUETYPE;
outline.m_Points.push_back( tofuBox.GetPosition() );
outline.m_Points.push_back( { tofuBox.GetSize().x, tofuBox.GetPosition().y } );
outline.m_Points.push_back( tofuBox.GetSize() );
outline.m_Points.push_back( { tofuBox.GetPosition().x, tofuBox.GetSize().y } );
glyphData.m_Contours.push_back( outline );
CONTOUR outline;
outline.m_Winding = 1;
outline.m_Orientation = FT_ORIENTATION_TRUETYPE;
outline.m_Points.push_back( tofuBox.GetPosition() );
outline.m_Points.push_back( { tofuBox.GetSize().x, tofuBox.GetPosition().y } );
outline.m_Points.push_back( tofuBox.GetSize() );
outline.m_Points.push_back( { tofuBox.GetPosition().x, tofuBox.GetSize().y } );
contours.push_back( outline );
CONTOUR hole;
tofuBox.Move( { scaler * 0.06, scaler * 0.06 } );
tofuBox.SetSize( { tofuBox.GetWidth() - scaler * 0.06,
tofuBox.GetHeight() - scaler * 0.06 } );
hole.m_Winding = 1;
hole.m_Orientation = FT_ORIENTATION_NONE;
hole.m_Points.push_back( tofuBox.GetPosition() );
hole.m_Points.push_back( { tofuBox.GetSize().x, tofuBox.GetPosition().y } );
hole.m_Points.push_back( tofuBox.GetSize() );
hole.m_Points.push_back( { tofuBox.GetPosition().x, tofuBox.GetSize().y } );
contours.push_back( hole );
CONTOUR hole;
tofuBox.Move( { scaler * 0.06, scaler * 0.06 } );
tofuBox.SetSize( { tofuBox.GetWidth() - scaler * 0.06,
tofuBox.GetHeight() - scaler * 0.06 } );
hole.m_Winding = 1;
hole.m_Orientation = FT_ORIENTATION_NONE;
hole.m_Points.push_back( tofuBox.GetPosition() );
hole.m_Points.push_back( { tofuBox.GetSize().x, tofuBox.GetPosition().y } );
hole.m_Points.push_back( tofuBox.GetSize() );
hole.m_Points.push_back( { tofuBox.GetPosition().x, tofuBox.GetSize().y } );
glyphData.m_Contours.push_back( hole );
}
}
std::unique_ptr<OUTLINE_GLYPH> glyph = std::make_unique<OUTLINE_GLYPH>();
std::vector<SHAPE_LINE_CHAIN> holes;
for( CONTOUR& c : contours )
for( CONTOUR& c : glyphData.m_Contours )
{
std::vector<VECTOR2D> points = c.m_Points;
SHAPE_LINE_CHAIN shape;
@@ -411,6 +452,16 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
}
}
if( glyphData.m_TriangulationData.empty() )
{
glyph->CacheTriangulation( false, false );
glyphData.m_TriangulationData = glyph->GetTriangulationData();
}
else
{
glyph->CacheTriangulation( glyphData.m_TriangulationData );
}
aGlyphs->push_back( std::move( glyph ) );
}
+3 -2
View File
@@ -327,8 +327,9 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
if( !row )
{
wxString msg = wxString::Format( _( "fp-lib-table files contain no library named '%s'." ),
aNickname );
// We don't generally show this string to the user (who is unlikely to know what
// "fp-lib-table" means), and translating it may produce Sentry KICAD-YP.
wxString msg = wxString::Format( wxS( "'%s' not found in fp-lib-table." ), aNickname );
THROW_IO_ERROR( msg );
}
+2 -2
View File
@@ -88,7 +88,7 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight )
unsigned int CAIRO_COMPOSITOR::CreateBuffer()
{
// Pixel storage
BitmapPtr bitmap = new uint32_t[m_bufferSize]();
BitmapPtr bitmap = new uint8_t[m_bufferSize]();
// Create the Cairo surface
cairo_surface_t* surface = cairo_image_surface_create_for_data(
@@ -138,7 +138,7 @@ void CAIRO_COMPOSITOR::Begin()
void CAIRO_COMPOSITOR::ClearBuffer( const COLOR4D& aColor )
{
// Clear the pixel storage
memset( m_buffers[m_current].bitmap, 0x00, m_bufferSize * sizeof( int ) );
memset( m_buffers[m_current].bitmap, 0x00, m_bufferSize );
}
+46 -33
View File
@@ -190,7 +190,7 @@ static double roundp( double x )
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
{
if( m_lineWidthIsOdd && m_isStrokeEnabled )
if( m_lineWidthIsOdd )
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
else
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
@@ -352,13 +352,18 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
double r = xform( aRadius );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
// Adjust center and radius slightly to better match the rounding of endpoints.
VECTOR2D mid = roundp( xform( aCenterPoint ) );
auto mid = roundp( xform( aCenterPoint ) );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
cairo_new_sub_path( m_currentContext );
@@ -403,13 +408,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
double r = xform( aRadius );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
VECTOR2D mid = roundp( xform( aCenterPoint ) );
VECTOR2D mid = xform( aCenterPoint );
double width = xform( aWidth / 2.0 );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
@@ -1413,20 +1412,34 @@ void CAIRO_GAL::EndDrawing()
// Now translate the raw context data from the format stored
// by cairo into a format understood by wxImage.
pixman_image_t* dstImg = pixman_image_create_bits(
wxPlatformInfo::Get().GetEndianness() == wxENDIAN_LITTLE ? PIXMAN_b8g8r8
: PIXMAN_r8g8b8,
m_screenSize.x, m_screenSize.y, (uint32_t*) m_wxOutput, m_wxBufferWidth * 3 );
pixman_image_t* srcImg =
pixman_image_create_bits( PIXMAN_a8r8g8b8, m_screenSize.x, m_screenSize.y,
(uint32_t*) m_bitmapBuffer, m_wxBufferWidth * 4 );
int height = m_screenSize.y;
int stride = m_stride;
pixman_image_composite( PIXMAN_OP_SRC, srcImg, nullptr, dstImg, 0, 0, 0, 0, 0, 0,
m_screenSize.x, m_screenSize.y );
unsigned char* srcRow = m_bitmapBuffer;
unsigned char* dst = m_wxOutput;
// Free allocated memory
pixman_image_unref( srcImg );
pixman_image_unref( dstImg );
for( int y = 0; y < height; y++ )
{
for( int x = 0; x < stride; x += 4 )
{
const unsigned char* src = srcRow + x;
#if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
// XRGB
dst[0] = src[1];
dst[1] = src[2];
dst[2] = src[3];
#else
// BGRX
dst[0] = src[2];
dst[1] = src[1];
dst[2] = src[0];
#endif
dst += 3;
}
srcRow += stride;
}
wxImage img( m_wxBufferWidth, m_screenSize.y, m_wxOutput, true );
wxBitmap bmp( img );
@@ -1582,15 +1595,12 @@ void CAIRO_GAL::allocateBitmaps()
{
m_wxBufferWidth = m_screenSize.x;
while( ( ( m_wxBufferWidth * 3 ) % 4 ) != 0 )
m_wxBufferWidth++;
// Create buffer, use the system independent Cairo context backend
m_stride = cairo_format_stride_for_width( GAL_FORMAT, m_wxBufferWidth );
m_bufferSize = m_stride * m_screenSize.y;
wxASSERT( m_bitmapBuffer == nullptr );
m_bitmapBuffer = new unsigned char[m_bufferSize * 4];
m_bitmapBuffer = new unsigned char[m_bufferSize];
wxASSERT( m_wxOutput == nullptr );
m_wxOutput = new unsigned char[m_wxBufferWidth * 3 * m_screenSize.y];
@@ -1661,13 +1671,16 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
}
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor ) )
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
return false;
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
wxWindow::SetCursor( m_currentwxCursor );
+259 -51
View File
@@ -44,85 +44,76 @@
#include <cursors/cursor-subtract.xpm>
#include <cursors/cursor-text.xpm>
#include <cursors/cursor-xor.xpm>
#include <cursors/cursor-zoom.xpm>
#include <cursors/cursor-zoom-in.xpm>
#include <cursors/cursor-zoom-out.xpm>
#include <cursors/cursor_tune.xpm>
#include <cursors/voltage_probe.xpm>
#include <cursors/current_probe.xpm>
// HiDPI cursor files
#include <cursors/cursor-add64.xpm>
#include <cursors/cursor-component64.xpm>
#include <cursors/cursor-eraser64.xpm>
#include <cursors/cursor-label-global64.xpm>
#include <cursors/cursor-label-hier64.xpm>
#include <cursors/cursor-label-net64.xpm>
#include <cursors/cursor-line-bus64.xpm>
#include <cursors/cursor-line-graphic64.xpm>
#include <cursors/cursor-line-wire64.xpm>
#include <cursors/cursor-line-wire-add64.xpm>
#include <cursors/cursor-measure64.xpm>
#include <cursors/cursor-pencil64.xpm>
#include <cursors/cursor-select-lasso64.xpm>
#include <cursors/cursor-select-window64.xpm>
#include <cursors/cursor-subtract64.xpm>
#include <cursors/cursor-text64.xpm>
#include <cursors/cursor-xor64.xpm>
#include <cursors/cursor-zoom-in64.xpm>
#include <cursors/cursor-zoom-out64.xpm>
#include <cursors/cursor_tune64.xpm>
#include <cursors/voltage_probe64.xpm>
#include <cursors/current_probe64.xpm>
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
#ifdef __WINDOWS__
#include <cursors/cursor-place.xpm>
#include <cursors/cursor-place64.xpm>
#include <cursors/cursor-select-m.xpm>
#include <cursors/cursor-select-m64.xpm>
#else
#include <cursors/cursor-place-black.xpm>
#include <cursors/cursor-place-black64.xpm>
#include <cursors/cursor-select-m-black.xpm>
#include <cursors/cursor-select-m-black64.xpm>
#endif
#include <wx/bitmap.h>
#include <wx/debug.h>
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
voltage_probe,
voltage_probe,
nullptr,
nullptr,
voltage_probe_xpm,
{ 32, 32 },
{ 1, 31 },
},
{
KICURSOR::CURRENT_PROBE,
current_probe,
current_probe,
nullptr,
nullptr,
current_probe_xpm,
{ 32, 32 },
{ 4, 27 },
},
{
KICURSOR::TUNE,
cursor_tune,
cursor_tune_mask,
nullptr,
nullptr,
cursor_tune_xpm,
{ 32, 32 },
{ 1, 30 },
},
@@ -198,7 +189,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_xpm,
cursor_zoom_in_xpm,
{ 32, 32 },
{ 6, 6 },
},
@@ -305,6 +296,209 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
};
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
nullptr,
nullptr,
voltage_probe64_xpm,
{ 64, 64 },
{ 1, 62 },
},
{
KICURSOR::CURRENT_PROBE,
nullptr,
nullptr,
current_probe64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::TUNE,
nullptr,
nullptr,
cursor_tune64_xpm,
{ 64, 64 },
{ 2, 60 },
},
{
KICURSOR::PENCIL,
nullptr,
nullptr,
cursor_pencil64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::MOVING,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_select_m64_xpm,
#else
cursor_select_m_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
{
KICURSOR::REMOVE,
nullptr,
nullptr,
cursor_eraser64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::TEXT,
nullptr,
nullptr,
cursor_text64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::MEASURE,
nullptr,
nullptr,
cursor_measure64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::ADD,
nullptr,
nullptr,
cursor_add64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SUBTRACT,
nullptr,
nullptr,
cursor_subtract64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::XOR,
nullptr,
nullptr,
cursor_xor64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_in64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::ZOOM_OUT,
nullptr,
nullptr,
cursor_zoom_out64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::LABEL_NET,
nullptr,
nullptr,
cursor_label_net64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::LABEL_GLOBAL,
nullptr,
nullptr,
cursor_label_global64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::COMPONENT,
nullptr,
nullptr,
cursor_component64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_LASSO,
nullptr,
nullptr,
cursor_select_lasso64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_WINDOW,
nullptr,
nullptr,
cursor_select_window64_xpm,
{ 64, 64 },
{ 14, 20 },
},
{
KICURSOR::LINE_BUS,
nullptr,
nullptr,
cursor_line_bus64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE,
nullptr,
nullptr,
cursor_line_wire64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE_ADD,
nullptr,
nullptr,
cursor_line_wire_add64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_GRAPHIC,
nullptr,
nullptr,
cursor_line_graphic64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LABEL_HIER,
nullptr,
nullptr,
cursor_label_hier64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::PLACE,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_place64_xpm,
#else
cursor_place_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
};
/**
* Construct a cursor for the given definition.
*
@@ -393,8 +587,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
{
wxStockCursor stock =
GetStockCursor( aCursorType );
wxStockCursor stock = GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
@@ -405,6 +599,20 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
}
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
{
wxStockCursor stock = GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
}
static CURSOR_STORE store( hidpi_cursors );
return store.Get( aCursorType );
}
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
{
wxStockCursor stockCursor;
+2 -2
View File
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetCursorEnabled( false );
// Initialize the native widget to an arrow cursor
SetNativeCursorStyle( KICURSOR::ARROW );
SetNativeCursorStyle( KICURSOR::ARROW, false );
// Initialize text properties
ResetTextAttributes();
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
}
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
if( m_currentNativeCursor == aCursor )
return false;
+2 -9
View File
@@ -34,8 +34,7 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxString& aName, const wxPalette& aPalette ) :
wxGLCanvas( aParent, aId, aAttribList, aPos, aSize, aStyle, aName, aPalette ),
m_settings( aSettings ),
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
m_settings( aSettings )
{
}
@@ -64,13 +63,7 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
}
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
{
m_scale_factor = aNewScaleFactor;
}
double HIDPI_GL_CANVAS::GetScaleFactor() const
{
return m_scale_factor;
return GetContentScaleFactor();
}
+8
View File
@@ -185,7 +185,11 @@ void ANTIALIASING_SUPERSAMPLING::Present()
glBindTexture( GL_TEXTURE_2D, compositor->GetBufferTexture( ssaaMainBuffer ) );
compositor->SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING );
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE );
draw_fullscreen_primitive();
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
}
@@ -547,7 +551,11 @@ void ANTIALIASING_SMAA::Present()
glActiveTexture( GL_TEXTURE1 );
glBindTexture( GL_TEXTURE_2D, blendTex );
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE );
pass_3_shader->Use();
draw_fullscreen_triangle();
pass_3_shader->Deactivate();
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
}
+1 -1
View File
@@ -297,7 +297,7 @@ void OPENGL_COMPOSITOR::ClearBuffer( const COLOR4D& aColor )
{
wxASSERT( m_initialized );
glClearColor( aColor.r, aColor.g, aColor.b, 0.0f );
glClearColor( aColor.r, aColor.g, aColor.b, m_curFbo == DIRECT_RENDERING ? 1.0f : 0.0f );
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
}
+39 -38
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2017 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -33,6 +33,7 @@
#endif
#include <advanced_config.h>
#include <build_version.h>
#include <gal/opengl/opengl_gal.h>
#include <gal/opengl/utils.h>
#include <gal/definitions.h>
@@ -254,7 +255,8 @@ GLuint GL_BITMAP_CACHE::cacheBitmap( const BITMAP_BASE* aBitmap )
bmp.accessTime = currentTime;
#ifndef DISABLE_BITMAP_CACHE
if( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
if( ( m_cacheLru.size() + 1 > m_cacheMaxElements || m_cacheSize + bmp.size > m_cacheMaxSize )
&& !m_cacheLru.empty() )
{
KIID toRemove( 0 );
auto toRemoveLru = m_cacheLru.end();
@@ -506,13 +508,6 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
refresh = true;
}
if( m_options.m_scaleFactor != GetScaleFactor() )
{
SetScaleFactor( m_options.m_scaleFactor );
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
refresh = true;
}
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
{
Refresh();
@@ -1005,11 +1000,20 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
VECTOR2D p( cos( startAngle ) * aRadius, sin( startAngle ) * aRadius );
double alpha;
unsigned int lineCount = 0;
for( alpha = startAngle + alphaIncrement; alpha <= endAngle; alpha += alphaIncrement )
lineCount++;
if( alpha != endAngle )
lineCount++;
reserveLineQuads( lineCount );
for( alpha = startAngle + alphaIncrement; alpha <= endAngle; alpha += alphaIncrement )
{
VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius );
DrawLine( p, p_next );
drawLineQuad( p, p_next, false );
p = p_next;
}
@@ -1018,7 +1022,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
if( alpha != endAngle )
{
VECTOR2D p_last( cos( endAngle ) * aRadius, sin( endAngle ) * aRadius );
DrawLine( p, p_last );
drawLineQuad( p, p_last, false );
}
}
@@ -1058,9 +1062,21 @@ void OPENGL_GAL::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius,
if( seg_count % 2 != 0 )
seg_count += 1;
// Our shaders have trouble rendering null line quads, so delegate this task to DrawSegment.
if( seg_count == 0 )
{
VECTOR2D p_start( aCenterPoint.x + cos( startAngle ) * aRadius,
aCenterPoint.y + sin( startAngle ) * aRadius );
VECTOR2D p_end( aCenterPoint.x + cos( endAngle ) * aRadius,
aCenterPoint.y + sin( endAngle ) * aRadius );
DrawSegment( p_start, p_end, aWidth );
return;
}
// Recalculate alphaIncrement with a even integer number of segment
if( seg_count )
alphaIncrement = ( endAngle - startAngle ) / seg_count;
alphaIncrement = ( endAngle - startAngle ) / seg_count;
Save();
m_currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 );
@@ -2112,13 +2128,16 @@ void OPENGL_GAL::EndDiffLayer()
}
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor ) )
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
return false;
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
@@ -2657,6 +2676,9 @@ void OPENGL_GAL::init()
#endif // KICAD_USE_EGL
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
if( GLEW_OK != err )
throw std::runtime_error( (const char*) glewGetErrorString( err ) );
@@ -2891,30 +2913,9 @@ void OPENGL_GAL::DrawGlyphs( const std::vector<std::unique_ptr<KIFONT::GLYPH>>&
}
else if( allGlyphsAreOutline )
{
// Optimized path for stroke fonts that pre-reserves glyph triangles.
// Optimized path for outline fonts that pre-reserves glyph triangles.
int triangleCount = 0;
if( aGlyphs.size() > 0 )
{
thread_pool& tp = GetKiCadThreadPool();
tp.push_loop( aGlyphs.size(),
[&]( const int a, const int b)
{
for( int ii = a; ii < b; ++ii )
{
auto glyph = static_cast<KIFONT::OUTLINE_GLYPH*>( aGlyphs.at( ii ).get() );
// Only call CacheTriangulation() if it has never been done before.
// Otherwise we'll hash the triangulation to see if it has been edited,
// and all our glpyh editing ops update the triangulation anyway.
if( glyph->TriangulatedPolyCount() == 0 )
glyph->CacheTriangulation( false );
}
} );
tp.wait_for_tasks();
}
for( const std::unique_ptr<KIFONT::GLYPH>& glyph : aGlyphs )
{
const auto& outlineGlyph = static_cast<const KIFONT::OUTLINE_GLYPH&>( *glyph );
+1 -1
View File
@@ -444,7 +444,7 @@ void GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
break;
default:
if( menu_id >= GRIDTRICKS_FIRST_SHOWHIDE )
if( menu_id >= GRIDTRICKS_FIRST_SHOWHIDE && m_grid->CommitPendingChanges( false ) )
{
int col = menu_id - GRIDTRICKS_FIRST_SHOWHIDE;
+5 -1
View File
@@ -32,14 +32,18 @@
class PSEUDO_ACTION : public TOOL_ACTION
{
public:
PSEUDO_ACTION( const wxString& aLabel, int aHotKey )
PSEUDO_ACTION( const wxString& aLabel, int aHotKey, int aHotKeyAlt = 0 )
{
m_friendlyName = aLabel;
m_hotKey = aHotKey;
m_hotKeyAlt = aHotKeyAlt;
}
};
static PSEUDO_ACTION* g_gesturePseudoActions[] = {
new PSEUDO_ACTION( _( "Accept Autocomplete" ), WXK_RETURN, WXK_NUMPAD_ENTER ),
new PSEUDO_ACTION( _( "Cancel Autocomplete" ), WXK_ESCAPE ),
new PSEUDO_ACTION( _( "Toggle Checkbox" ), WXK_SPACE ),
new PSEUDO_ACTION( _( "Pan Left/Right" ), MD_CTRL + PSEUDO_WXK_WHEEL ),
new PSEUDO_ACTION( _( "Pan Up/Down" ), MD_SHIFT + PSEUDO_WXK_WHEEL ),
new PSEUDO_ACTION( _( "Finish Drawing" ), PSEUDO_WXK_DBLCLICK ),
+64 -63
View File
@@ -63,79 +63,80 @@ struct hotkey_name_descr
#define KEY_NON_FOUND -1
static struct hotkey_name_descr hotkeyNameList[] =
{
{ wxT( "F1" ), WXK_F1 },
{ wxT( "F2" ), WXK_F2 },
{ wxT( "F3" ), WXK_F3 },
{ wxT( "F4" ), WXK_F4 },
{ wxT( "F5" ), WXK_F5 },
{ wxT( "F6" ), WXK_F6 },
{ wxT( "F7" ), WXK_F7 },
{ wxT( "F8" ), WXK_F8 },
{ wxT( "F9" ), WXK_F9 },
{ wxT( "F10" ), WXK_F10 },
{ wxT( "F11" ), WXK_F11 },
{ wxT( "F12" ), WXK_F12 },
{ wxT( "F13" ), WXK_F13 },
{ wxT( "F14" ), WXK_F14 },
{ wxT( "F15" ), WXK_F15 },
{ wxT( "F16" ), WXK_F16 },
{ wxT( "F17" ), WXK_F17 },
{ wxT( "F18" ), WXK_F18 },
{ wxT( "F19" ), WXK_F19 },
{ wxT( "F20" ), WXK_F20 },
{ wxT( "F21" ), WXK_F21 },
{ wxT( "F22" ), WXK_F22 },
{ wxT( "F23" ), WXK_F23 },
{ wxT( "F24" ), WXK_F24 },
{ wxT( "F1" ), WXK_F1 },
{ wxT( "F2" ), WXK_F2 },
{ wxT( "F3" ), WXK_F3 },
{ wxT( "F4" ), WXK_F4 },
{ wxT( "F5" ), WXK_F5 },
{ wxT( "F6" ), WXK_F6 },
{ wxT( "F7" ), WXK_F7 },
{ wxT( "F8" ), WXK_F8 },
{ wxT( "F9" ), WXK_F9 },
{ wxT( "F10" ), WXK_F10 },
{ wxT( "F11" ), WXK_F11 },
{ wxT( "F12" ), WXK_F12 },
{ wxT( "F13" ), WXK_F13 },
{ wxT( "F14" ), WXK_F14 },
{ wxT( "F15" ), WXK_F15 },
{ wxT( "F16" ), WXK_F16 },
{ wxT( "F17" ), WXK_F17 },
{ wxT( "F18" ), WXK_F18 },
{ wxT( "F19" ), WXK_F19 },
{ wxT( "F20" ), WXK_F20 },
{ wxT( "F21" ), WXK_F21 },
{ wxT( "F22" ), WXK_F22 },
{ wxT( "F23" ), WXK_F23 },
{ wxT( "F24" ), WXK_F24 },
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Del" ), WXK_DELETE },
{ wxT( "Tab" ), WXK_TAB },
{ wxT( "Back" ), WXK_BACK },
{ wxT( "Ins" ), WXK_INSERT },
{ wxT( "Esc" ), WXK_ESCAPE },
{ wxT( "Del" ), WXK_DELETE },
{ wxT( "Tab" ), WXK_TAB },
{ wxT( "Back" ), WXK_BACK },
{ wxT( "Ins" ), WXK_INSERT },
{ wxT( "Home" ), WXK_HOME },
{ wxT( "End" ), WXK_END },
{ wxT( "PgUp" ), WXK_PAGEUP },
{ wxT( "PgDn" ), WXK_PAGEDOWN },
{ wxT( "Home" ), WXK_HOME },
{ wxT( "End" ), WXK_END },
{ wxT( "PgUp" ), WXK_PAGEUP },
{ wxT( "PgDn" ), WXK_PAGEDOWN },
{ wxT( "Up" ), WXK_UP },
{ wxT( "Down" ), WXK_DOWN },
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Up" ), WXK_UP },
{ wxT( "Down" ), WXK_DOWN },
{ wxT( "Left" ), WXK_LEFT },
{ wxT( "Right" ), WXK_RIGHT },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Return" ), WXK_RETURN },
{ wxT( "Space" ), WXK_SPACE },
{ wxT( "Space" ), WXK_SPACE },
{ wxT( "Num Pad 0" ), WXK_NUMPAD0 },
{ wxT( "Num Pad 1" ), WXK_NUMPAD1 },
{ wxT( "Num Pad 2" ), WXK_NUMPAD2 },
{ wxT( "Num Pad 3" ), WXK_NUMPAD3 },
{ wxT( "Num Pad 4" ), WXK_NUMPAD4 },
{ wxT( "Num Pad 5" ), WXK_NUMPAD5 },
{ wxT( "Num Pad 6" ), WXK_NUMPAD6 },
{ wxT( "Num Pad 7" ), WXK_NUMPAD7 },
{ wxT( "Num Pad 8" ), WXK_NUMPAD8 },
{ wxT( "Num Pad 9" ), WXK_NUMPAD9 },
{ wxT( "Num Pad +" ), WXK_NUMPAD_ADD },
{ wxT( "Num Pad -" ), WXK_NUMPAD_SUBTRACT },
{ wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY },
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "Num Pad F1"), WXK_NUMPAD_F1 },
{ wxT( "Num Pad F2"), WXK_NUMPAD_F2 },
{ wxT( "Num Pad F3"), WXK_NUMPAD_F3 },
{ wxT( "Num Pad F4"), WXK_NUMPAD_F4 },
{ wxT( "Num Pad 0" ), WXK_NUMPAD0 },
{ wxT( "Num Pad 1" ), WXK_NUMPAD1 },
{ wxT( "Num Pad 2" ), WXK_NUMPAD2 },
{ wxT( "Num Pad 3" ), WXK_NUMPAD3 },
{ wxT( "Num Pad 4" ), WXK_NUMPAD4 },
{ wxT( "Num Pad 5" ), WXK_NUMPAD5 },
{ wxT( "Num Pad 6" ), WXK_NUMPAD6 },
{ wxT( "Num Pad 7" ), WXK_NUMPAD7 },
{ wxT( "Num Pad 8" ), WXK_NUMPAD8 },
{ wxT( "Num Pad 9" ), WXK_NUMPAD9 },
{ wxT( "Num Pad +" ), WXK_NUMPAD_ADD },
{ wxT( "Num Pad -" ), WXK_NUMPAD_SUBTRACT },
{ wxT( "Num Pad *" ), WXK_NUMPAD_MULTIPLY },
{ wxT( "Num Pad /" ), WXK_NUMPAD_DIVIDE },
{ wxT( "Num Pad ." ), WXK_NUMPAD_SEPARATOR },
{ wxT( "Num Pad Enter" ), WXK_NUMPAD_ENTER },
{ wxT( "Num Pad F1"), WXK_NUMPAD_F1 },
{ wxT( "Num Pad F2"), WXK_NUMPAD_F2 },
{ wxT( "Num Pad F3"), WXK_NUMPAD_F3 },
{ wxT( "Num Pad F4"), WXK_NUMPAD_F4 },
{ wxT( "" ), 0 },
{ wxT( "" ), 0 },
{ wxT( "Click" ), PSEUDO_WXK_CLICK },
{ wxT( "DblClick" ), PSEUDO_WXK_DBLCLICK },
{ wxT( "Wheel" ), PSEUDO_WXK_WHEEL },
{ wxT( "Click" ), PSEUDO_WXK_CLICK },
{ wxT( "DblClick" ), PSEUDO_WXK_DBLCLICK },
{ wxT( "Wheel" ), PSEUDO_WXK_WHEEL },
// Do not change this line: end of list
{ wxT( "" ), KEY_NON_FOUND }
{ wxT( "" ), KEY_NON_FOUND }
};
+4 -4
View File
@@ -642,10 +642,6 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
if( startAngle > endAngle )
endAngle += ANGLE_360;
// Angles are relative to major axis
startAngle -= EDA_ANGLE( major );
endAngle -= EDA_ANGLE( major );
if( aData.ratio == 1.0 )
{
double radius = major.EuclideanNorm();
@@ -658,6 +654,10 @@ void DXF_IMPORT_PLUGIN::addEllipse( const DL_EllipseData& aData )
}
else
{
// Angles are relative to major axis
startAngle -= EDA_ANGLE( major );
endAngle -= EDA_ANGLE( major );
DL_ArcData arc( aData.cx, aData.cy, aData.cz, radius, startAngle.AsDegrees(),
endAngle.AsDegrees() );
addArc( arc );
+1 -1
View File
@@ -261,7 +261,7 @@ void SVG_IMPORT_PLUGIN::DrawPath( const float* aPoints, int aNumPoints, bool aCl
if( aNumPoints > 0 )
DrawCubicBezierPath( aPoints, aNumPoints, collectedPathPoints );
if( aClosedPath )
if( aClosedPath && collectedPathPoints.size() > 2 )
DrawPolygon( collectedPathPoints, aStroke, aFilled, aFillColor );
else
DrawLineSegments( collectedPathPoints, aStroke );
+134
View File
@@ -0,0 +1,134 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019-2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
* Copyright (C) 2020-2024 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 Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "altium_ascii_parser.h"
#include "altium_parser_utils.h"
ALTIUM_ASCII_PARSER::ALTIUM_ASCII_PARSER( const wxString& aInputFile ) :
m_fileInput( aInputFile.fn_str() )
{
}
std::map<wxString, wxString> ALTIUM_ASCII_PARSER::ReadProperties()
{
std::map<wxString, wxString> kv;
std::string str;
std::string line;
// Lines ending with |> continue on the next line
do
{
if( !std::getline( m_fileInput, line ) )
{
m_error = true;
return kv;
}
if( ( line.size() > 2 && line[line.size() - 2] == '|' && line[line.size() - 1] == '>' ) )
{
str.append( line, 0, line.size() - 2 );
}
else
{
str.append( line );
break;
}
} while( true );
std::size_t token_end = 0;
while( token_end < str.size() && token_end != std::string::npos )
{
std::size_t token_start = str.find( '|', token_end );
std::size_t token_equal = str.find( '=', token_end );
std::size_t key_start;
if( token_start <= token_equal )
{
key_start = token_start + 1;
}
else
{
// Leading "|" before "RECORD=28" may be missing in older schematic versions.
key_start = token_end;
}
token_end = str.find( '|', key_start );
if( token_equal >= token_end )
{
continue; // this looks like an error: skip the entry. Also matches on std::string::npos
}
if( token_end == std::string::npos )
{
token_end = str.size() + 1; // this is the correct offset
}
std::string keyS = str.substr( key_start, token_equal - key_start );
std::string valueS = str.substr( token_equal + 1, token_end - token_equal - 1 );
// convert the strings to wxStrings, since we use them everywhere
// value can have non-ASCII characters, so we convert them from LATIN1/ISO8859-1
wxString key( keyS.c_str(), wxConvISO8859_1 );
// Altium stores keys either in Upper, or in CamelCase. Lets unify it.
wxString canonicalKey = key.Trim( false ).Trim( true ).MakeUpper();
// If the key starts with '%UTF8%' we have to parse the value using UTF8
wxString value;
if( canonicalKey.StartsWith( "%UTF8%" ) )
value = wxString( valueS.c_str(), wxConvUTF8 );
else
value = wxString( valueS.c_str(), wxConvISO8859_1 );
if( canonicalKey != wxS( "PATTERN" ) && canonicalKey != wxS( "SOURCEFOOTPRINTLIBRARY" ) )
{
// Breathless hack because I haven't a clue what the story is here (but this character
// appears in a lot of radial dimensions and is rendered by Altium as a space).
value.Replace( wxT( "ÿ" ), wxT( " " ) );
}
// Storage binary data do not need conversion.
if( str.rfind( "|BINARY", 0 ) != 0 )
{
if( canonicalKey == wxT( "DESIGNATOR" ) || canonicalKey == wxT( "NAME" )
|| canonicalKey == wxT( "TEXT" ) )
{
value = AltiumPropertyToKiCadString( value );
}
}
kv.insert( { canonicalKey, value.Trim() } );
}
return kv;
}
bool ALTIUM_ASCII_PARSER::CanRead()
{
return m_fileInput && m_fileInput.peek() != std::ifstream::traits_type::eof();
}
+54
View File
@@ -0,0 +1,54 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019-2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
* Copyright (C) 2020-2024 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 Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _ALTIUM_PARSER_H
#define _ALTIUM_PARSER_H
#include <map>
#include <string>
#include <fstream>
#include <wx/string.h>
class ALTIUM_ASCII_PARSER
{
public:
ALTIUM_ASCII_PARSER( const wxString& aInputFile );
std::map<wxString, wxString> ReadProperties();
bool CanRead();
bool HasParsingError()
{
return m_error;
}
private:
std::ifstream m_fileInput;
bool m_error = false;
};
#endif //_ALTIUM_PARSER_H
@@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "altium_parser.h"
#include "altium_binary_parser.h"
#include "altium_parser_utils.h"
#include <compoundfilereader.h>
@@ -350,13 +350,13 @@ void ALTIUM_COMPOUND_FILE::cacheLibFootprintNames()
if( m_reader->IsStream( entry ) && fileName == L"Parameters" )
{
ALTIUM_PARSER parametersReader( *this, entry );
ALTIUM_BINARY_PARSER parametersReader( *this, entry );
std::map<wxString, wxString> parameterProperties =
parametersReader.ReadProperties();
wxString key = ALTIUM_PARSER::ReadString(
wxString key = ALTIUM_PROPS_UTILS::ReadString(
parameterProperties, wxT( "PATTERN" ), wxT( "" ) );
wxString fpName = ALTIUM_PARSER::ReadUnicodeString(
wxString fpName = ALTIUM_PROPS_UTILS::ReadUnicodeString(
parameterProperties, wxT( "PATTERN" ), wxT( "" ) );
m_libFootprintDirNameCache[key] = fpName;
@@ -370,7 +370,7 @@ void ALTIUM_COMPOUND_FILE::cacheLibFootprintNames()
}
ALTIUM_PARSER::ALTIUM_PARSER( const ALTIUM_COMPOUND_FILE& aFile,
ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER( const ALTIUM_COMPOUND_FILE& aFile,
const CFB::COMPOUND_FILE_ENTRY* aEntry )
{
m_subrecord_end = nullptr;
@@ -384,7 +384,7 @@ ALTIUM_PARSER::ALTIUM_PARSER( const ALTIUM_COMPOUND_FILE& aFile,
}
ALTIUM_PARSER::ALTIUM_PARSER( std::unique_ptr<char[]>& aContent, size_t aSize )
ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER( std::unique_ptr<char[]>& aContent, size_t aSize )
{
m_subrecord_end = nullptr;
m_size = aSize;
@@ -394,7 +394,7 @@ ALTIUM_PARSER::ALTIUM_PARSER( std::unique_ptr<char[]>& aContent, size_t aSize )
}
std::map<wxString, wxString> ALTIUM_PARSER::ReadProperties(
std::map<wxString, wxString> ALTIUM_BINARY_PARSER::ReadProperties(
std::function<std::map<wxString, wxString>( const std::string& )> handleBinaryData )
{
@@ -502,123 +502,3 @@ std::map<wxString, wxString> ALTIUM_PARSER::ReadProperties(
return kv;
}
int32_t ALTIUM_PARSER::ConvertToKicadUnit( const double aValue )
{
constexpr double int_limit = ( std::numeric_limits<int>::max() - 10 ) / 2.54;
int32_t iu = KiROUND( Clamp<double>( -int_limit, aValue, int_limit ) * 2.54 );
// Altium's internal precision is 0.1uinch. KiCad's is 1nm. Round to nearest 10nm to clean
// up most rounding errors. This allows lossless conversion of increments of 0.05mils and
// 0.01um.
return KiROUND( (double) iu / 10.0 ) * 10;
}
int ALTIUM_PARSER::ReadInt( const std::map<wxString, wxString>& aProps, const wxString& aKey,
int aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
return value == aProps.end() ? aDefault : wxAtoi( value->second );
}
double ALTIUM_PARSER::ReadDouble( const std::map<wxString, wxString>& aProps, const wxString& aKey,
double aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
if( value == aProps.end() )
return aDefault;
// Locale independent str -> double conversation
std::istringstream istr( (const char*) value->second.mb_str() );
istr.imbue( std::locale::classic() );
double doubleValue;
istr >> doubleValue;
return doubleValue;
}
bool ALTIUM_PARSER::ReadBool( const std::map<wxString, wxString>& aProps, const wxString& aKey,
bool aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
if( value == aProps.end() )
return aDefault;
else
return value->second == "T" || value->second == "TRUE";
}
int32_t ALTIUM_PARSER::ReadKicadUnit( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const wxString& value = ReadString( aProps, aKey, aDefault );
wxString prefix;
if( !value.EndsWith( "mil", &prefix ) )
{
wxLogError( _( "Unit '%s' does not end with 'mil'." ), value );
return 0;
}
prefix.StartsWith( "+", &prefix );
double mils;
if( !prefix.ToCDouble( &mils ) )
{
wxLogError( _( "Cannot convert '%s' to double." ), prefix );
return 0;
}
return ConvertToKicadUnit( mils * 10000 );
}
wxString ALTIUM_PARSER::ReadString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const auto& utf8Value = aProps.find( wxString( "%UTF8%" ) + aKey );
if( utf8Value != aProps.end() )
return utf8Value->second;
const auto& value = aProps.find( aKey );
if( value != aProps.end() )
return value->second;
return aDefault;
}
wxString ALTIUM_PARSER::ReadUnicodeString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const auto& unicodeFlag = aProps.find( wxS( "UNICODE" ) );
if( unicodeFlag != aProps.end() && unicodeFlag->second.Contains( wxS( "EXISTS" ) ) )
{
const auto& unicodeValue = aProps.find( wxString( "UNICODE__" ) + aKey );
if( unicodeValue != aProps.end() )
{
wxArrayString arr = wxSplit( unicodeValue->second, ',', '\0' );
wxString out;
for( wxString part : arr )
out += wxString( wchar_t( wxAtoi( part ) ) );
return out;
}
}
return ReadString( aProps, aKey, aDefault );
}
@@ -22,8 +22,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef ALTIUM_PARSER_H
#define ALTIUM_PARSER_H
#ifndef _ALTIUM_BINARY_PARSER_H
#define _ALTIUM_BINARY_PARSER_H
#include "altium_props_utils.h"
#include <map>
#include <memory>
@@ -106,12 +108,12 @@ private:
};
class ALTIUM_PARSER
class ALTIUM_BINARY_PARSER
{
public:
ALTIUM_PARSER( const ALTIUM_COMPOUND_FILE& aFile, const CFB::COMPOUND_FILE_ENTRY* aEntry );
ALTIUM_PARSER( std::unique_ptr<char[]>& aContent, size_t aSize );
~ALTIUM_PARSER() = default;
ALTIUM_BINARY_PARSER( const ALTIUM_COMPOUND_FILE& aFile, const CFB::COMPOUND_FILE_ENTRY* aEntry );
ALTIUM_BINARY_PARSER( std::unique_ptr<char[]>& aContent, size_t aSize );
~ALTIUM_BINARY_PARSER() = default;
template <typename Type>
Type Read()
@@ -229,7 +231,7 @@ public:
int32_t ReadKicadUnit()
{
return ConvertToKicadUnit( Read<int32_t>() );
return ALTIUM_PROPS_UTILS::ConvertToKicadUnit( Read<int32_t>() );
}
int32_t ReadKicadUnitX()
@@ -270,26 +272,6 @@ public:
return std::map<wxString, wxString>();
} );
static int32_t ConvertToKicadUnit( const double aValue );
static int ReadInt( const std::map<wxString, wxString>& aProps,
const wxString& aKey, int aDefault );
static double ReadDouble( const std::map<wxString, wxString>& aProps,
const wxString& aKey, double aDefault );
static bool ReadBool( const std::map<wxString, wxString>& aProps,
const wxString& aKey, bool aDefault );
static int32_t ReadKicadUnit( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault );
static wxString ReadString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault );
static wxString ReadUnicodeString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault );
void Skip( size_t aLength )
{
if( GetRemainingBytes() >= aLength )
@@ -447,4 +429,4 @@ private:
}
};
#endif //ALTIUM_PARSER_H
#endif //_ALTIUM_BINARY_PARSER_H
+153
View File
@@ -0,0 +1,153 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019-2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
* Copyright (C) 2020-2024 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 Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "altium_props_utils.h"
#include <limits>
#include <sstream>
#include <math/util.h>
#include <wx/crt.h>
#include <wx/log.h>
#include <wx/translation.h>
int32_t ALTIUM_PROPS_UTILS::ConvertToKicadUnit( const double aValue )
{
constexpr double int_limit = ( std::numeric_limits<int>::max() - 10 ) / 2.54;
int32_t iu = KiROUND( Clamp<double>( -int_limit, aValue, int_limit ) * 2.54 );
// Altium's internal precision is 0.1uinch. KiCad's is 1nm. Round to nearest 10nm to clean
// up most rounding errors. This allows lossless conversion of increments of 0.05mils and
// 0.01um.
return KiROUND( (double) iu / 10.0 ) * 10;
}
int ALTIUM_PROPS_UTILS::ReadInt( const std::map<wxString, wxString>& aProps, const wxString& aKey,
int aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
return value == aProps.end() ? aDefault : wxAtoi( value->second );
}
double ALTIUM_PROPS_UTILS::ReadDouble( const std::map<wxString, wxString>& aProps, const wxString& aKey,
double aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
if( value == aProps.end() )
return aDefault;
// Locale independent str -> double conversation
std::istringstream istr( (const char*) value->second.mb_str() );
istr.imbue( std::locale::classic() );
double doubleValue;
istr >> doubleValue;
return doubleValue;
}
bool ALTIUM_PROPS_UTILS::ReadBool( const std::map<wxString, wxString>& aProps, const wxString& aKey,
bool aDefault )
{
const std::map<wxString, wxString>::const_iterator& value = aProps.find( aKey );
if( value == aProps.end() )
return aDefault;
else
return value->second == "T" || value->second == "TRUE";
}
int32_t ALTIUM_PROPS_UTILS::ReadKicadUnit( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const wxString& value = ReadString( aProps, aKey, aDefault );
wxString prefix;
if( !value.EndsWith( "mil", &prefix ) )
{
wxLogError( _( "Unit '%s' does not end with 'mil'." ), value );
return 0;
}
prefix.StartsWith( "+", &prefix );
double mils;
if( !prefix.ToCDouble( &mils ) )
{
wxLogError( _( "Cannot convert '%s' to double." ), prefix );
return 0;
}
return ConvertToKicadUnit( mils * 10000 );
}
wxString ALTIUM_PROPS_UTILS::ReadString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const auto& utf8Value = aProps.find( wxString( "%UTF8%" ) + aKey );
if( utf8Value != aProps.end() )
return utf8Value->second;
const auto& value = aProps.find( aKey );
if( value != aProps.end() )
return value->second;
return aDefault;
}
wxString ALTIUM_PROPS_UTILS::ReadUnicodeString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault )
{
const auto& unicodeFlag = aProps.find( wxS( "UNICODE" ) );
if( unicodeFlag != aProps.end() && unicodeFlag->second.Contains( wxS( "EXISTS" ) ) )
{
const auto& unicodeValue = aProps.find( wxString( "UNICODE__" ) + aKey );
if( unicodeValue != aProps.end() )
{
wxArrayString arr = wxSplit( unicodeValue->second, ',', '\0' );
wxString out;
for( wxString part : arr )
out += wxString( wchar_t( wxAtoi( part ) ) );
return out;
}
}
return ReadString( aProps, aKey, aDefault );
}
+58
View File
@@ -0,0 +1,58 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019-2020 Thomas Pointhuber <thomas.pointhuber@gmx.at>
* Copyright (C) 2020-2024 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 Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _ALTIUM_PROPS_UTILS_H
#define _ALTIUM_PROPS_UTILS_H
#include <stdint.h>
#include <map>
#include <wx/string.h>
class ALTIUM_PROPS_UTILS
{
public:
static int32_t ConvertToKicadUnit( const double aValue );
static int ReadInt( const std::map<wxString, wxString>& aProps, const wxString& aKey,
int aDefault );
static double ReadDouble( const std::map<wxString, wxString>& aProps, const wxString& aKey,
double aDefault );
static bool ReadBool( const std::map<wxString, wxString>& aProps, const wxString& aKey,
bool aDefault );
static int32_t ReadKicadUnit( const std::map<wxString, wxString>& aProps, const wxString& aKey,
const wxString& aDefault );
static wxString ReadString( const std::map<wxString, wxString>& aProps, const wxString& aKey,
const wxString& aDefault );
static wxString ReadUnicodeString( const std::map<wxString, wxString>& aProps,
const wxString& aKey, const wxString& aDefault );
};
#endif //_ALTIUM_PROPS_UTILS_H
+8
View File
@@ -979,13 +979,20 @@ EELEMENT::EELEMENT( wxXmlNode* aElement )
<!ATTLIST element
name %String; #REQUIRED
library %String; #REQUIRED
library_urn %Urn; ""
package %String; #REQUIRED
package3d_urn %Urn; ""
override_package3d_urn %Urn; ""
override_package_urn %Urn; ""
override_locally_modified %Bool; "no"
value %String; #REQUIRED
x %Coord; #REQUIRED
y %Coord; #REQUIRED
locked %Bool; "no"
populate %Bool; "yes"
smashed %Bool; "no"
rot %Rotation; "R0"
grouprefs IDREFS #IMPLIED
>
*/
@@ -1001,6 +1008,7 @@ EELEMENT::EELEMENT( wxXmlNode* aElement )
y = parseRequiredAttribute<ECOORD>( aElement, "y" );
// optional
library_urn = parseOptionalAttribute<wxString>( aElement, "library_urn" );
locked = parseOptionalAttribute<bool>( aElement, "locked" );
smashed = parseOptionalAttribute<bool>( aElement, "smashed" );
rot = parseOptionalAttribute<EROT>( aElement, "rot" );
+1
View File
@@ -817,6 +817,7 @@ struct EELEMENT
{
wxString name;
wxString library;
opt_wxString library_urn;
wxString package;
wxString value;
ECOORD x;
+46 -2
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2023 Alex Shvartzkop <dudesuchamazing@gmail.com>
* Copyright (C) 2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2023-2024 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 <bezier_curves.h>
#include <ki_exception.h>
#include <wx/translation.h>
#include <eda_text.h>
double EASYEDA_PARSER_BASE::Convert( const wxString& aValue )
@@ -66,6 +67,49 @@ double EASYEDA_PARSER_BASE::RelPosY( const wxString& aValue )
}
void EASYEDA_PARSER_BASE::TransformTextToBaseline( EDA_TEXT* textItem,
const wxString& baselineAlign, bool invertY )
{
int upOffset = 0;
if( baselineAlign == wxS( "" ) || baselineAlign == wxS( "auto" )
|| baselineAlign == wxS( "use-script" ) || baselineAlign == wxS( "no-change" )
|| baselineAlign == wxS( "reset-size" ) || baselineAlign == wxS( "alphabetic" )
|| baselineAlign == wxS( "inherit" ) )
{
upOffset = textItem->GetTextSize().y;
}
else if( baselineAlign == wxS( "ideographic" ) || baselineAlign == wxS( "text-after-edge" ) )
{
upOffset = textItem->GetTextSize().y * 1.2;
}
else if( baselineAlign == wxS( "central" ) )
{
upOffset = textItem->GetTextSize().y * 0.5;
}
else if( baselineAlign == wxS( "middle" ) )
{
upOffset = textItem->GetTextSize().y * 0.6;
}
else if( baselineAlign == wxS( "mathematical" ) )
{
upOffset = textItem->GetTextSize().y * 0.1;
}
else if( baselineAlign == wxS( "hanging" ) || baselineAlign == wxS( "text-before-edge" ) )
{
upOffset = 0;
}
VECTOR2I offset( 0, -upOffset );
RotatePoint( offset, textItem->GetTextAngle() );
if( invertY )
offset.y = -offset.y;
textItem->SetTextPos( textItem->GetTextPos() + offset );
}
std::vector<SHAPE_LINE_CHAIN>
EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, bool aForceClosed )
{
@@ -202,7 +246,7 @@ EASYEDA_PARSER_BASE::ParseLineChains( const wxString& data, int aArcMinSegLen, b
arc.ConstructFromStartEndCenter( RelPos( start ), RelPos( end ), RelPos( arcCenter ),
!cw );
chain.Append( arc );
chain.Append( arc, aArcMinSegLen );
prevPt = end;
}
+5 -1
View File
@@ -29,6 +29,8 @@
#include <math/vector2d.h>
#include <wx/string.h>
class EDA_TEXT;
class EASYEDA_PARSER_BASE
{
public:
@@ -58,7 +60,9 @@ public:
return ScalePos( aVec - m_relOrigin );
}
std::vector<SHAPE_LINE_CHAIN> ParseLineChains( const wxString& aData, int aArcMinSegLen,
void TransformTextToBaseline( EDA_TEXT* textItem, const wxString& baselineAlign, bool invertY );
std::vector<SHAPE_LINE_CHAIN> ParseLineChains( const wxString& aData, int aArcMinSegLen,
bool aForceClosed );
protected:
@@ -87,6 +87,7 @@ void EASYEDA::from_json( const nlohmann::json& j, EASYEDA::DOCUMENT& d )
PARSE_VALUE( head );
PARSE_VALUE( canvas );
PARSE_VALUE( title );
PARSE_VALUE( shape );
PARSE_VALUE( dataStr );
}
+4 -3
View File
@@ -73,9 +73,10 @@ struct DOCUMENT
// BBox
// colors
wxString canvas;
wxArrayString shape;
std::optional<nlohmann::json> dataStr;
wxString canvas;
wxString title;
wxArrayString shape;
std::optional<nlohmann::json> dataStr;
};
struct C_PARA
@@ -140,7 +140,8 @@ EASYEDAPRO::ProjectToSelectorDialog( const nlohmann::json& aProject, bool aPcbOn
}
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
nlohmann::json EASYEDAPRO::FindJsonFile( const wxString& aZipFileName,
const std::set<wxString>& aFileNames )
{
std::shared_ptr<wxZipEntry> entry;
wxFFileInputStream in( aZipFileName );
@@ -150,17 +151,45 @@ nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName
{
wxString name = entry->GetName();
if( name == wxS( "project.json" ) || name == wxS( "device.json" ) )
try
{
wxMemoryOutputStream memos;
memos << zip;
wxStreamBuffer* buf = memos.GetOutputStreamBuffer();
wxString str( (char*) buf->GetBufferStart(), buf->GetBufferSize() );
if( aFileNames.find( name ) != aFileNames.end() )
{
wxMemoryOutputStream memos;
memos << zip;
wxStreamBuffer* buf = memos.GetOutputStreamBuffer();
return nlohmann::json::parse( str );
wxString str =
wxString::FromUTF8( (char*) buf->GetBufferStart(), buf->GetBufferSize() );
return nlohmann::json::parse( str );
}
}
catch( nlohmann::json::exception& e )
{
THROW_IO_ERROR(
wxString::Format( _( "JSON error reading '%s': %s" ), name, e.what() ) );
}
catch( std::exception& e )
{
THROW_IO_ERROR( wxString::Format( _( "Error reading '%s': %s" ), name, e.what() ) );
}
}
return nlohmann::json{};
}
nlohmann::json EASYEDAPRO::ReadProjectOrDeviceFile( const wxString& aZipFileName )
{
static const std::set<wxString> c_files = { wxS( "project.json" ), wxS( "device.json" ),
wxS( "footprint.json" ), wxS( "symbol.json" ) };
nlohmann::json j = FindJsonFile( aZipFileName, c_files );
if( !j.is_null() )
return j;
THROW_IO_ERROR( wxString::Format(
_( "'%s' does not appear to be a valid EasyEDA (JLCEDA) Pro "
"project or library file. Cannot find project.json or device.json." ),
@@ -25,6 +25,7 @@
#ifndef EASYEDAPRO_IMPORT_UTILS_H_
#define EASYEDAPRO_IMPORT_UTILS_H_
#include <set>
#include <wx/stream.h>
#include <wx/string.h>
#include <lib_id.h>
@@ -46,6 +47,8 @@ std::vector<IMPORT_PROJECT_DESC> ProjectToSelectorDialog( const nlohmann::json&
bool aPcbOnly = false,
bool aSchOnly = false );
nlohmann::json FindJsonFile( const wxString& aZipFileName, const std::set<wxString>& aFileNames );
nlohmann::json ReadProjectOrDeviceFile( const wxString& aZipFileName );
void IterateZipFiles(
+3
View File
@@ -229,6 +229,9 @@ void Prettify( std::string& aSource, char aQuoteChar )
++cursor;
}
// newline required at end of line / file for POSIX compliance. Keeps git diffs clean.
formatted += '\n';
aSource = std::move( formatted );
}
+24 -1
View File
@@ -3,7 +3,7 @@
*
* Copyright (C) 2015 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2016 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2024 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,11 +27,18 @@
// conflicts for some defines, at least on Windows
#include <kicad_curl/kicad_curl.h>
#include <mutex>
#include <ki_exception.h> // THROW_IO_ERROR
static std::shared_mutex s_curlMutex;
static bool s_curlShuttingDown = false;
void KICAD_CURL::Init()
{
s_curlShuttingDown = false;
if( curl_global_init( CURL_GLOBAL_ALL ) != CURLE_OK )
{
THROW_IO_ERROR( "curl_global_init() failed." );
@@ -41,10 +48,26 @@ void KICAD_CURL::Init()
void KICAD_CURL::Cleanup()
{
s_curlShuttingDown = true;
std::unique_lock lock( s_curlMutex );
curl_global_cleanup();
}
std::shared_mutex& KICAD_CURL::Mutex()
{
return s_curlMutex;
}
bool KICAD_CURL::IsShuttingDown()
{
return s_curlShuttingDown;
}
std::string GetKicadCurlVersion()
{
return KICAD_CURL::GetVersion();
+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 Mark Roszko <mark.roszko@gmail.com>
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2024 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
@@ -33,6 +33,7 @@
#include <cstddef>
#include <exception>
#include <sstream>
#include <shared_mutex>
#include <wx/app.h>
#include <build_version.h>
@@ -88,6 +89,9 @@ static size_t stream_write_callback( void* aContents, size_t aSize, size_t aNmem
static int xferinfo( void* aProgress, curl_off_t aDLtotal, curl_off_t aDLnow, curl_off_t aULtotal,
curl_off_t aULnow )
{
if( KICAD_CURL::IsShuttingDown() )
return 1; // Should abort the operation
CURL_PROGRESS* progress = static_cast<CURL_PROGRESS*>( aProgress );
curl_off_t curtime = 0;
@@ -190,6 +194,12 @@ KICAD_CURL_EASY::~KICAD_CURL_EASY()
int KICAD_CURL_EASY::Perform()
{
std::shared_lock lock( KICAD_CURL::Mutex(), std::try_to_lock );
// If can't lock, we should be in the process of tearing down.
if( !lock )
return CURLE_ABORTED_BY_CALLBACK;
if( m_headers )
curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
+14 -1
View File
@@ -57,7 +57,6 @@ KIWAY_PLAYER::KIWAY_PLAYER( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType
KIWAY_PLAYER::~KIWAY_PLAYER() throw()
{
// socket server must be destructed before we complete
// destructing the frame or else we could crash
// as the socket server holds a reference to this frame
@@ -69,6 +68,20 @@ KIWAY_PLAYER::~KIWAY_PLAYER() throw()
delete m_socketServer;
m_socketServer = nullptr;
}
// remove active sockets as well
for( wxSocketBase* socket : m_sockets )
{
if( !socket )
continue;
// ensure any event handling stops
socket->Notify( false );
delete socket;
}
m_sockets.clear();
}

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