Compare commits

...

893 Commits

Author SHA1 Message Date
Wayne Stambaugh 59091ec263 Tag release version 6.0.6. 2022-06-17 21:11:16 -04:00
jean-pierre charras 92fbc42214 PANEL_SYM_LIB_TABLE: fix a bug in filenames from wxFileDialog dialog.
We want the full path, so use GetPaths.
GetFilenames sometimes return the full path in wxWidgets 3.1.7, not always the filename
Fixes #11821
https://gitlab.com/kicad/code/kicad/issues/11821
2022-06-16 13:06:19 +02:00
Jeff Young 00226cb0f2 Make sure Type regex doesn't match before Pad_Type or Pin_Type.
Fixes https://gitlab.com/kicad/code/kicad/issues/11423

(cherry picked from commit 7cb7a68b0e)
2022-06-13 10:59:33 -07:00
Seth Hillbrand 7128f6adf0 Prevent focus stealing in some Linux WMs
OnEnter events will only raise the windows within KiCad rather than
between applications

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

(cherry picked from commit 110728af48)
2022-06-13 10:18:13 -07:00
Jeff Young 38a7cb9731 Write out partial pad-stacks for blind/buried/microvias.
Fixes https://gitlab.com/kicad/code/kicad/issues/11692

(cherry picked from commit 80124d2463)
2022-06-13 10:11:58 -07:00
Seth Hillbrand b6e7bf4768 Handle updated document description format
parentheses are rarely if ever used independently, so trim the unmatched
ones regardless of whether we find the starting parenthesis in the
description

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

(cherry picked from commit be7e9d300e)
2022-06-13 10:02:26 -07:00
Seth Hillbrand d600fd3498 Update Translations 2022-06-13 10:00:04 -07:00
Jan Straka 48bad152bb Translated using Weblate (Czech)
Currently translated at 92.4% (6670 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-06-13 18:56:16 +02:00
Jakub Janek da80c6796d Translated using Weblate (Slovak)
Currently translated at 75.2% (5430 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sk/
2022-06-13 18:56:16 +02:00
co8 j 48d347ce45 Translated using Weblate (Japanese)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-06-13 18:56:16 +02:00
Mark Hämmerling 76139ac110 Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-13 18:56:16 +02:00
Ivan Chuba 1d65480097 Translated using Weblate (Russian)
Currently translated at 99.9% (7210 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-06-13 18:56:15 +02:00
Henrik Kauhanen 338b7e4c78 Translated using Weblate (Swedish)
Currently translated at 99.8% (7200 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-06-13 18:56:15 +02:00
Ivan Chuba 5b64231b33 Translated using Weblate (Russian)
Currently translated at 99.9% (7210 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-06-13 18:56:15 +02:00
Henrik Kauhanen cdaf829404 Translated using Weblate (Swedish)
Currently translated at 99.8% (7200 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-06-13 18:56:15 +02:00
Jan Straka e920cdf809 Translated using Weblate (Czech)
Currently translated at 92.2% (6655 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-06-13 18:56:15 +02:00
Ivan Chuba 28ad719db6 Translated using Weblate (Polish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-06-13 18:56:15 +02:00
Ivan Chuba 83b5c5bf7f Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-13 18:56:15 +02:00
Mark Hämmerling f76678d20c Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-13 18:56:15 +02:00
Ivan Chuba 9b46ed2449 Translated using Weblate (Russian)
Currently translated at 99.9% (7210 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-06-13 18:56:15 +02:00
Mark Hämmerling 70ab4c8e8d Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-13 18:56:15 +02:00
jean-pierre charras 24d049c017 Fix bounding box of text in footprint not properly rotated in 6.0.5 stable version
It is fixed in Master branch, so apply a fix similar to b6e8beb3 from master
Fixes #8728
https://gitlab.com/kicad/code/kicad/issues/8728
2022-06-13 16:46:40 +02:00
Jeff Young 54c68080f5 Nullptr defensive code.
Fixes https://gitlab.com/kicad/code/kicad/issues/11690

(cherry picked from commit 9b70308f5c)
2022-06-12 10:43:30 +01:00
Jeff Young 16d63b7772 Handle alt pins in plot code.
Fixes https://gitlab.com/kicad/code/kicad/issues/11728

(cherry picked from commit e4798199c6)
2022-06-12 10:39:31 +01:00
Jeff Young 797cb2aaac Typo.
LIB_SYMBOL's value field is the name; SCH_SYMBOL's value field is not.

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

(cherry picked from commit d381fd8b29)
2022-06-12 10:39:31 +01:00
Mark Roszko 2044fe591d Declare the ngspice version in vcpkg.json 2022-06-12 03:43:45 +00:00
Mark Roszko d5baea21cd Update kicad-vcpkg registry baseline for ngspice 2022-06-12 02:26:38 +00:00
Tomasz Wlostowski b59c334edb router: another attempt at improving 'kink' robustness of the hull generator
(cherry picked from commit f5fe1d5462)
2022-06-10 09:17:07 -04:00
Alex bb8719b9d5 3D viewer: Fix GL_INVALID_ENUM error.
(cherry picked from commit 58f9b82c1e)
2022-06-09 11:36:11 -07:00
Seth Hillbrand 817c4645eb Sort PCAD layers
Better fix for 11750.  Instead of figeting with layer values, we sort
our map based on the layer numbers in the PCAD file.  F_Cu is always
layer 1 and B_Cu is always layer 2.

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

(cherry picked from commit ac0f95683f)
2022-06-09 11:11:15 -07:00
Marco Ciampa f1462e9fd6 Updated Italian translation 2022-06-09 19:42:08 +02:00
Seth Hillbrand 32aabaf010 Handle B_Cu ordering
Stopgap until we introduce multi-layer mapping widget

Fixes https://gitlab.com/kicad/code/kicad/issues/11750
2022-06-08 17:17:26 -07:00
Seth Hillbrand 72b7f9fe10 Check for older tags in pcad import
The pourOutline/planeOutline do not include support for fillets

Fixes https://gitlab.com/kicad/code/kicad/issues/11749
2022-06-08 16:17:40 -07:00
Tomasz Wlostowski 4d5b5d3791 router: fix SegmentHull() corner case when it 'chamfers' more than the clearance permits (corner case for 0-length segments, which we use
for representing holes)


(cherry picked from commit 56df462474)
2022-06-08 22:39:22 +00:00
Tomasz Wlostowski 4694a2622e router: use either copper or hole clearance, whichever is larger, when checking track -> hole collisions
(cherry picked from commit 990281a897)
2022-06-08 22:39:08 +00:00
Tomasz Wlostowski 92ba60628e router: improvements in robustness of SegmentHull()
- ensure the 'chamfer' radius and clearance is rounded before computing the actual hull vertices
- for small, non-45 degree line segments (present in many boards), generate a slightly larger but still axis-aligned 45 degree hull instead of following exactly the segment direction


(cherry picked from commit bcfe12ce47)
2022-06-08 16:14:03 +00:00
Tomasz Wlostowski 2be352b9f9 geometry: more robust colinearity test in SHAPE_LINE_CHAIN::Simplify()
We now test the midpoint (B) of the 3 consecutive polyline points (A, B, C), since (assuming the angle between AB and BC is > 90 degrees) AC is always longer than
AB or BC. This minimizes the distance computation rounding error (in the previous algorithm, taking the point C for colineraity test) if AB is short and BC is very long, the test would
often fail due to rouding error in projection/line distance computation


(cherry picked from commit 3aed13278d)
2022-06-08 16:13:15 +00:00
Tomasz Wlostowski 8afb8190af geometry: use dedicated 64-bit integer square root for distance computations
Guarantees 1 LSB error, while the C++ double type has 55 mantissa bits (meaning for sqrt(X) >~ 2^22.5) the error is not guaranteed.


(cherry picked from commit e6ebc2b9b9)
2022-06-08 16:12:59 +00:00
Jeff Young 275afdc1d5 Expose footprint ID, description and keywords to property system.
(cherry picked from commit dee22a31d9)
2022-06-08 15:58:53 +01:00
Jeff Young 3a8ad7165b Clear point editor before recombining pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/11731

(cherry picked from commit bd51b33f65)
2022-06-08 15:58:52 +01:00
Jeff Young bbe70e2f67 Repair Eagle importer page number handling.
The root sheet needs a page number, and the other sheets need to not
have their last step in the path duplicated.

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

(cherry picked from commit aaff163d7c)
2022-06-08 15:58:52 +01:00
Jeff Young 4a5f74422c Take pad angle into account when generating spokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11765
2022-06-08 15:46:56 +01:00
Jon Evans 7053981835 Don't wipe out visibility state when changing layer count 2022-06-07 23:00:32 -04:00
Jon Evans 895314b639 PNS: Fixup hole clearance to use exact hulls for walkaround
(partially cherry picked from commit 30fb298ed3)
2022-06-07 22:34:16 -04:00
Jon Evans 6253b878a0 PNS: Implement HoleHull for VIA
(cherry picked from commit 23596812b6)
2022-06-08 02:05:25 +00:00
Marco Ciampa 5855a9ed89 Updated Italian translation 2022-06-06 19:11:54 +02:00
Wayne Stambaugh c861c31f24 Eeschema: fix symbol library remap bug.
The original decision to escape the legacy symbol library names results
in them being escaped every time they are opened which cause the curly
braces '}' from the original escaping to be escaped on subsequent
openings.  This resulted in the symbol library names in the rescue
library not matching the library ID in the schematic.

This fix is likely to have other corner case bugs given the potential
for escaped characters in legacy symbol libraries.  Given that we now
have escaped rescue libraries in play, removing the escaping will only
result in more issues so we will have to fix the corner cases as we go.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11563
2022-06-05 18:12:39 -04:00
jean-pierre charras 87d55402e4 Pcbnew, physical layer names: never translate them (they are proper noun)
physical layer names are not translated in files, but they were translated
in UI. Using these translated names can create issues and misunderstanding for users.
Now physical layer names are seen as proper nouns and are never translated.
Fixes #11715
https://gitlab.com/kicad/code/kicad/issues/11715
2022-06-04 11:07:49 +02:00
jean-pierre charras 7168441a1b Symbol checker: fix incorrect test for duplicate pins.
From master branch
https://gitlab.com/kicad/code/kicad/issues/11660
2022-06-04 11:07:13 +02:00
Jon Evans 5d4e2aa595 PNS: Remove offsets from hull generation
This is likely an old workaround to numerical precision issues
in the DRC system that no longer exist.  Removing this is necessary
for "exact" hull generation to produce walkaround results that
look nice (paths falling exactly on the grid lines)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710
2022-06-03 17:39:22 -04:00
Jon Evans 2a91ba35c1 PNS: Use exact hulls for walkaround path generation
When we generate hulls, by default we subtract the clearance epsilon
to prevent false collisions in the router that wouldn't be flagged
by DRC.  However, we need to use the actual hull with no epsilon
when generating hulls for pathfinding in the walkaround system.

Without this change, it is possible for the walkaround to generate
a valid-seeming path that results in a DRC violation, for example
when dragging a drag against a board edge.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10536
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11365
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710
2022-06-03 17:39:22 -04:00
Roberto Fernandez Bautista 2553da38b4 CADSTAR Schematic: Fix parsing of ATTRCOLORS.
Apparently there can be a `INVISIBLE` token. Unclear what it means,
but lets read it anyway


(cherry picked from commit 41bf397d24)
2022-06-03 21:21:15 +00:00
Jon Evans 8d8f96b094 PNS: Fix off-by-one in dragCornerInternal
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10919
2022-06-01 17:11:03 -04:00
Jon Evans eb1164fc93 UNIT_BINDER should support long long ints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10870
2022-05-31 21:50:52 -04:00
Jon Evans a4aa447b95 [PNS] Fix invalid assumption in IsLineCorner 2022-05-31 20:19:20 -04:00
Jon Evans 53dbd3bb02 PNS: Fix skew calculation with pad-to-die specified
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11710
2022-05-31 20:19:19 -04:00
Jeff Young 781e98acbc Eagle octagonal pads are regular (~29% chamfered).
Also cleans up setting of KeepTopBottom (which is ignored unless
we're doing optional flahing -- which we're not for Eagle imports).

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

(cherry picked from commit 4afca58ce7)
2022-05-31 23:21:43 +01:00
Jeff Young ab70124b68 Make use of board stackup data when exporting VRML.
Specifically layer colors and board thickness.

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

(cherry picked from commit deeb7d4d6d)
2022-05-31 23:21:43 +01:00
Jeff Young c117708220 Unset forced cursor before leaving two-click place.
Fixes https://gitlab.com/kicad/code/kicad/issues/11607

(cherry picked from commit 79a0ce9137)
2022-05-31 23:21:43 +01:00
Jeff Young 68d9b3cbf7 Add board stackup parsing to Kicad2Step.
Fixes https://gitlab.com/kicad/code/kicad/issues/11565

(cherry picked from commit e85105a907)
2022-05-31 23:21:43 +01:00
Jeff Young aac4f30b7d Fix zone merge intersection algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/11492

(cherry picked from commit 5f10c15a87)
2022-05-31 23:21:43 +01:00
Seth Hillbrand a2e9c0ea73 Text BB is already rotated, don't re-do
EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon already accounts
for text rotation, so we don't need to apply that twice

Fixes https://gitlab.com/kicad/code/kicad/issues/11714
2022-05-31 13:46:16 -07:00
Seth Hillbrand 0f4eefc9fc Fix PCAD silk layer for solder-side fp
The layer should be flipped based on the footprint mirror value rather
than the text mirror value (which is independent)

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

(cherry picked from commit 6c0856c384)
2022-05-31 13:03:53 -07:00
Seth Hillbrand 19d9dcdd2a Update Translations 2022-05-31 10:30:31 -07:00
co8 j 38c68b008c Translated using Weblate (Japanese)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-31 19:29:54 +02:00
ZbeeGin 8f2060a3f6 Translated using Weblate (Polish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-05-31 19:29:54 +02:00
Toni Laiho 837dba2419 Translated using Weblate (Finnish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-31 19:29:54 +02:00
Seth Hillbrand 2d092437f4 Make PCAD import case-insensitive
According to the PCAD specification, all tags are case insensitive.
Most exporters honor the defaults but there is always an outlier or two

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

(cherry picked from commit 35b79c2ec9)
2022-05-27 10:10:47 -07:00
Marco Ciampa c38da73151 Fixed typo in Italian translation 2022-05-27 13:43:58 +02:00
Seth Hillbrand 37c5885946 Fix missing assignment
(cherry picked from commit 77cd56fbd3)
2022-05-26 08:20:42 -07:00
Seth Hillbrand 2c2f69d05c Initialize area check
Ensure that the max_poly set is zero before using

(cherry picked from commit 2a9d7314ca)
2022-05-26 08:20:15 -07:00
Seth Hillbrand 592c2c6872 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed

(cherry picked from commit c0a9a02591)
2022-05-25 16:58:10 -07:00
Alex 6b2bb4d808 Allow sheet recursion, fix sheet paths in "Highlight on PCB".
"Highlight on PCB" and "Select" - "Items in Same Hierarchical Sheet"
actions were extended to select items on subsheets too.

"Highlight on PCB" now uses a proper full sheet path, allowing it to
work in subsheets.

Fixes https://gitlab.com/kicad/code/kicad/issues/11493
2022-05-25 23:38:52 +00:00
Seth Hillbrand 8cd289cf69 Update Translations 2022-05-25 16:22:31 -07:00
Toni Laiho 30d07ac556 Translated using Weblate (Finnish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-26 01:21:34 +02:00
Jan Straka 39f5c04821 Translated using Weblate (Czech)
Currently translated at 92.1% (6644 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-05-26 01:21:34 +02:00
Mark Hämmerling 161c7a38bc Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-05-26 01:21:34 +02:00
Arnau Llovet Vidal a95360154d Translated using Weblate (Catalan)
Currently translated at 65.8% (4752 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-05-26 01:21:34 +02:00
VicSanRoPe 5f072eb7d5 Translated using Weblate (Spanish)
Currently translated at 99.6% (7190 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es/
2022-05-26 01:21:34 +02:00
Toni Laiho 1febd61583 Translated using Weblate (Finnish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-26 01:21:34 +02:00
VicSanRoPe 0d8c066e05 Translated using Weblate (Spanish)
Currently translated at 99.5% (7183 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es/
2022-05-26 01:21:34 +02:00
Mark Hämmerling 6e6d88ec2e Translated using Weblate (German)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-05-26 01:21:34 +02:00
Arnau Llovet Vidal 9db7a7f6f7 Translated using Weblate (Catalan)
Currently translated at 65.8% (4750 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-05-26 01:21:33 +02:00
Tokita, Hiroshi 16d1a80f6e Translated using Weblate (Japanese)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-26 01:21:33 +02:00
Alex Gellen b8ea9c59db Translated using Weblate (Romanian)
Currently translated at 38.1% (2755 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ro/
2022-05-26 01:21:33 +02:00
VicSanRoPe 962ccab3ed Translated using Weblate (Spanish)
Currently translated at 99.4% (7174 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es/
2022-05-26 01:21:33 +02:00
Seth Hillbrand 1fe956c069 Handle hand-drawn holes in unfracture
We can't know that all holes will be ccw when entering unfracture.
Instead, we set the largest polyline to be the outline and the others to
be the holes.
2022-05-25 13:19:07 -07:00
Marco Ciampa d9db4f7bfd Updated Italian translation 2022-05-18 17:02:25 +02:00
Seth Hillbrand 0d93be0af2 Make sure that we have a visible layer
Before setting the active layer to our visible sequence, make sure that
the sequence is not empty (leads to invalid layer id->crash)

Fixes https://gitlab.com/kicad/code/kicad/issues/11629
2022-05-16 15:24:22 -07:00
jean-pierre charras bda1f684fc gerber_placefile_writer: fix angle rotation for flipped footprints.
According to latest Gerber documents (rev 2022.02), the previous angle was
missing a +180 rotation
Fixes #11621
https://gitlab.com/kicad/code/kicad/issues/11621
2022-05-16 10:27:17 +02:00
Jonathan Haas 7fdfd77422 Change default value of MatchByReference to false.
Fixes https://gitlab.com/kicad/code/kicad/issues/11382


(cherry picked from commit 5802ede3fd)
2022-05-14 12:44:14 +00:00
Seth Hillbrand 49ba218264 Update Translations 2022-05-13 15:05:21 -07:00
ZbeeGin f117f14b58 Translated using Weblate (Polish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-05-14 00:03:10 +02:00
Eric c143e49d94 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-05-14 00:03:10 +02:00
Henrik Kauhanen 627255f464 Translated using Weblate (Swedish)
Currently translated at 99.8% (7200 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-05-14 00:03:10 +02:00
Wellington Terumi Uemura ba90ef6c5f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-05-14 00:03:10 +02:00
co8 j 6a65f918f1 Translated using Weblate (Japanese)
Currently translated at 99.9% (7212 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-14 00:03:10 +02:00
Toni Laiho ef419fee0a Translated using Weblate (Finnish)
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-14 00:03:09 +02:00
Ulices c399b87fce Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7213 of 7213 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-05-14 00:03:09 +02:00
Toni Laiho 20dffba10f Translated using Weblate (Finnish)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-14 00:03:09 +02:00
jean-pierre charras c07ac8b3db Gerbview: seriously speed up the calculation time to draw polygons on OpenGL.
Mainly CacheTriangulation() was creating triangles using partition mode.
But this mode is optimized for Pcbnew and Gerbview and different internal units.
Now CacheTriangulation() is used in no partition, much faster in GERBVIEW_PAINTER.
From Master branch
2022-05-13 18:33:53 +02:00
jean-pierre charras f25d74628b Plot pad outlines on Fab files: fix many issues. Depending on
plotter type and pad type, the plotted shapes were not always the outlines,
but a outline inside the pad shape (due to legacy reasons). In many cases the
plotted shape was in fact incorrect. Now the actual pads outlines are plotted
without modification.
From Master branch
2022-05-13 14:25:02 +02:00
Marek Roszko ebb3e04718 Update Fedora-Linux-CI.yml to match master 2022-05-12 23:44:22 -04:00
Seth Hillbrand d971cbefcb Resolve title variable when plotting
Be sure to use variable name if it exists when plotting the file

Fixes https://gitlab.com/kicad/code/kicad/issues/11608
2022-05-12 15:30:45 -07:00
Seth Hillbrand e317818076 Remove debugging cout 2022-05-12 15:30:45 -07:00
Mark Roszko f89d5f9949 Pointsvcpkg to wx 3.1.6 2022-05-11 22:55:18 +00:00
Marek Roszko d45ce2f659 Suppress wx3.1.6 assert because it wants the window handle for dpi
(cherry picked from commit ccf235a8c3)
2022-05-11 22:53:02 +00:00
Seth Hillbrand 09a2d50e09 Enable/Disable the apply/discard buttons
When there are no pending actions, we should not show the user the
ability to apply/discard the pending actions.  This uses wxUpdateUI in
the correct manner, limiting it to only the elements being updated and
using the event actions to ensure we don't have a cascade

Fixes https://gitlab.com/kicad/code/kicad/issues/10761
2022-05-11 13:50:01 -07:00
Seth Hillbrand d9ec998ff0 Don't wait after installing from ZIP
The extraction process completes prior to the call to KeepRefreshing(),
so we should only let it update once and close

Fixes https://gitlab.com/kicad/code/kicad/issues/11601
2022-05-11 11:42:20 -07:00
Marek Roszko 7563f51212 Fix eda_doc not looking for schematic locally
It looks like this was overlooked by Jeff in 2020 not realizing eda_doc isn't built under eeschema but common in cc9ac37a0e


(cherry picked from commit f85251ef75)
2022-05-11 03:33:40 +00:00
Seth Hillbrand 1101eb9f94 Update Translations 2022-05-10 12:12:56 -07:00
Henrik Kauhanen 5a8845ad22 Translated using Weblate (Swedish)
Currently translated at 99.7% (7196 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-05-10 20:51:24 +02:00
Eric 897ac863fc Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-05-10 20:51:24 +02:00
Alex Gellen f4080741b3 Translated using Weblate (Romanian)
Currently translated at 37.5% (2706 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ro/
2022-05-10 20:51:24 +02:00
Wellington Terumi Uemura c1018b1ff3 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-05-10 20:51:24 +02:00
co8 j e40f8f3a49 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
Tokita, Hiroshi 4bfcc42c10 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
Toni Laiho 1e5d93b54f Translated using Weblate (Finnish)
Currently translated at 99.9% (7210 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-10 20:51:23 +02:00
Mark Hämmerling 75eb2b96d8 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-05-10 20:51:23 +02:00
co8 j 7a6f6d3fe9 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
Tokita, Hiroshi 117afb068f Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
co8 j bf61dfa008 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
Tokita, Hiroshi a2b197ad0e Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
co8 j 7be6d780c2 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:23 +02:00
Wellington Terumi Uemura fb6d9d7f74 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-05-10 20:51:23 +02:00
co8 j be87e71d53 Translated using Weblate (Japanese)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-05-10 20:51:22 +02:00
Jan Straka 8612010979 Translated using Weblate (Czech)
Currently translated at 92.1% (6642 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-05-10 20:51:22 +02:00
Ulices b860dcb676 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-05-10 20:51:22 +02:00
Henrik Kauhanen eb676233fd Translated using Weblate (Swedish)
Currently translated at 99.7% (7196 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-05-10 20:51:22 +02:00
Wellington Terumi Uemura edacc3fbf1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-05-10 20:51:22 +02:00
ZbeeGin 01f56a070e Translated using Weblate (Polish)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-05-10 20:51:22 +02:00
Miklós Márton 83d1d57363 Translated using Weblate (Hungarian)
Currently translated at 43.9% (3166 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/hu/
2022-05-10 20:51:22 +02:00
Henrik Kauhanen c63230dec6 Translated using Weblate (Finnish)
Currently translated at 99.9% (7205 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-10 20:51:22 +02:00
Toni Laiho ee1263ff53 Translated using Weblate (Finnish)
Currently translated at 99.9% (7205 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-05-10 20:51:22 +02:00
Mark Hämmerling 1c7c0db7c7 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-05-10 20:51:22 +02:00
Jan Straka dc4a6732be Translated using Weblate (Czech)
Currently translated at 92.0% (6639 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-05-10 20:51:21 +02:00
Henrik Kauhanen 3f5b65842d Translated using Weblate (Swedish)
Currently translated at 99.7% (7190 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-05-10 20:51:21 +02:00
Johannes Maibaum ea0d9076e7 Fix stock templates path for flatpak
Commit ad251b7b8c broke the template path
lookup for flatpak via `PATHS::GetStockTemplatesPath()`. Fix this by
using `::GetStockEDALibraryPath()` in all EDA Library related path
lookup functions.

`GetStockEDALibraryPath()` effectively does the same as
`GetStockDataPath()`, but it takes care to check the
`KICAD_LIBRARY_DATA` build config, which is being used by flatpak to
point to the flatpak EDA Library extensions in
`/app/extensions/Library/`.

Closes #11174
2022-05-10 17:57:23 +00:00
Alex bd97aaa63e Symbol Fields Table fields list: improve scrollbar behaviour on Windows. 2022-05-09 23:51:57 +00:00
Mike Williams e811b9a2dd Hierarchy: update just selection on sheet change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11550
2022-05-09 17:31:29 +00:00
Jeff Young 8524042352 Implement cross-references for labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/11564

(cherry picked from commit f9f0f6fe24)
2022-05-09 12:22:49 +01:00
Jeff Young 5b24003f6c Promote field selection to field-owner for Autoplace.
Fixes https://gitlab.com/kicad/code/kicad/issues/11529

(cherry picked from commit f6f316bd8c)
2022-05-09 12:07:33 +01:00
Jeff Young 71ea56dea4 Remove special-case processing of ${REFERENCE} and ${VALUE}.
Fixes https://gitlab.com/kicad/code/kicad/issues/11476

(cherry picked from commit 6b557d8631)
2022-05-09 12:05:51 +01:00
Jeff Young 362eec7ee3 Update findnext to handle new instance data architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/11424

(cherry picked from commit e0f2a5f07c)
2022-05-09 00:36:27 +01:00
Jeff Young c63c3d1891 Fix minor layout issue in dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/11490

(cherry picked from commit 2cccd5b090)
2022-05-09 00:36:27 +01:00
Jeff Young 058f6e0a9b All via pad layers need checking for copper.
Fixes https://gitlab.com/kicad/code/kicad/issues/11429

(cherry picked from commit e7f5deedb8)
2022-05-09 00:36:27 +01:00
Jeff Young e3eaa50600 Add on-the-fly i18n update for m_inactiveLayersLabel.
Fixes https://gitlab.com/kicad/code/kicad/issues/11435

(cherry picked from commit 3304ad75ca)
2022-05-09 00:36:27 +01:00
Jeff Young f4b5b65342 Initialize virtual page no. to something more reasonable.
Fixes https://gitlab.com/kicad/code/kicad/issues/11295

(cherry picked from commit 52eb210aa8)
2022-05-09 00:36:27 +01:00
Jeff Young 624d88dff9 Disable background color when printing in black & white.
Fixes https://gitlab.com/kicad/code/kicad/issues/11180

(cherry picked from commit 6738708a7f)
2022-05-09 00:36:27 +01:00
Jeff Young c04a183141 Hand cherry-pick of fix from master.
Fixes https://gitlab.com/kicad/code/kicad/issues/11261
2022-05-09 00:36:27 +01:00
Jeff Young 1831e034be Fix missing line keeping tabs from switching.
Fixes https://gitlab.com/kicad/code/kicad/issues/11417

(cherry picked from commit fc2eb2d7c9)
2022-05-09 00:36:27 +01:00
Jeff Young 2dcff109df Update Selection Filter title bar with language changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11421

(cherry picked from commit 4ab2c93070)
2022-05-09 00:36:27 +01:00
Jeff Young 936040fe8b Remove extra test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10364

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

(cherry picked from commit c78a47c3fb)
2022-05-09 00:36:27 +01:00
Mark Roszko 092c11b054 vcpkg.json declare wxpython version 2022-05-08 23:05:02 +00:00
Mark Roszko 43b8adad1a Update vcpkg-configuration.json 2022-05-07 11:34:54 +00:00
Seth Hillbrand e05c8f8852 Catch throws in DeleteSymbol
DeleteSymbol may call SaveSymbol if the name is changed.  In this case,
SaveSymbol may throw back and needs to be caught

Fixes https://gitlab.com/kicad/code/kicad/issues/11566
2022-05-06 16:13:13 -07:00
Seth Hillbrand 485e89f7a5 Finally found the intermittant QA crash
When loading footprints/zones in parallel, we cannot reference a static
vector that gets cleared by other threads.

It is unclear why this element was ever static to begin with (premature
optimization?) but it has been this way for a long time.  We never
noticed until we threaded load cycles, which gave the hatch a chance to
override itself and cause crashes

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

(cherry picked from commit 8218f9ab44)
2022-05-06 11:53:49 -07:00
Seth Hillbrand 611311697e Revert "Fix another static variable instance"
This reverts commit 5bd3a9cca8.

Reverted in favor of cherry-picking the more complete fix
from 8218f9ab44
2022-05-06 11:53:21 -07:00
Seth Hillbrand 5bd3a9cca8 Fix another static variable instance
Premature optimization appears to be the issue.  When we threaded zone
handling and added multiple layers, we started overwriting the
pointbuffer variable, which was declared static for unknown reasons

Fixes https://gitlab.com/kicad/code/kicad/issues/9888
2022-05-06 11:49:57 -07:00
Seth Hillbrand f4d4f23876 Catch errors when saving individual symbols
Fixes https://gitlab.com/kicad/code/kicad/issues/11566
2022-05-06 09:47:55 -07:00
Wayne Stambaugh 827abb01a3 Eeschema: fix broken project symbol rescue.
The legacy symbol library plugin code was changed to escape symbol names
which broke the LIB_ID string comparison when checking to see if symbols
needed to be rescued.  Escaping the LIB_ID names before comparison resolves
the issue.

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

(cherry picked from commit a19490b097)
2022-05-06 10:09:19 -04:00
Marek Roszko 370ce6a74d Revert "Increment kicad-vcpkg baseline for wxpython fix"
This reverts commit 9dd8bc1060.
2022-05-06 07:52:03 -04:00
Marek Roszko 9f2ca9b4d6 Fix FindPythonInterp for vcpkg again 2022-05-06 07:51:12 -04:00
Marek Roszko b21f37e22f Reorder pybind11 to be after we find the interp and libs ourselves
Our python find module is patched for vcpkg and we want it to execute first.
2022-05-06 07:51:12 -04:00
Mark Roszko 9dd8bc1060 Increment kicad-vcpkg baseline for wxpython fix
(cherry picked from commit cf69337466)
2022-05-06 11:10:46 +00:00
jean-pierre charras 511e862cfe Gerbview export to kicad_pcb file: remove calls to Simplify and Fracture.
They are not needed to export polygons because they are already
fractured, and these calls are very time consuming.
From Master branch
2022-05-06 13:06:41 +02:00
jean-pierre charras ed153bd7d7 Symbol editor crash: Fix use of a null pointer.
LIB_TEXT::Clone() did not copy a member set to nullptr.
From Master branch
Fixes #11569
https://gitlab.com/kicad/code/kicad/issues/11569
2022-05-06 12:54:32 +02:00
jean-pierre charras 6971e409bf Pcbnew: fix lost of focus after clicking on a wxChoice in toolbar.
After changing track width, via size, grid or zoom from the toolbar, the
canvas has no longer the focus on Windows. So we force the focus after clicking
on these widgets.
From Master branch
Fixes #11103
https://gitlab.com/kicad/code/kicad/issues/11103
2022-05-05 11:54:47 +02:00
jean-pierre charras ea1a1a43c0 Cvpcb: fix SaveAssociations. Save association to disk only from the Apply button.
Previously, the association was saved to disk also on OK button click.
From master branch
2022-05-05 11:33:13 +02:00
jean-pierre charras 7890d78801 Cvpcb: fix not working icon "select previous symbol"
From Master branch
Fixes #11509 https://gitlab.com/kicad/code/kicad/issues/11509
2022-05-05 11:31:38 +02:00
jean-pierre charras 82631db1bb Eeschema, backannotate: fix minor issues in displayed messages.
From Master branch
Fixes #11530 https://gitlab.com/kicad/code/kicad/issues/11530
2022-05-05 11:29:58 +02:00
jean-pierre charras fbc6c8f8f4 pcad importer: fix a truncation when converting mils to IU.
The value in mils is a double, but the function to convert in IU uses int.
From master branch.
Fixes #11380 https://gitlab.com/kicad/code/kicad/issues/11380
2022-05-04 17:37:11 +02:00
Mark Roszko 4e13677281 FindwxPython VCPKG_INSTALLED_DIR over the old _VCPKG_INSTALLED_DIR
(cherry picked from commit b6522bfc66)
2022-05-03 22:46:10 +00:00
Seth Hillbrand ba276fe470 Fix botched commit 2022-05-02 16:28:39 -07:00
Seth Hillbrand 4d47857738 Catch IO_ERRORs that we throw
FILEOUTPUT_FORMATTER likes to throw when it gets an issue.  We need to
catch this to avoid the app falling apart

Fixes https://gitlab.com/kicad/code/kicad/issues/11516
2022-05-02 15:15:04 -07:00
Wayne Stambaugh 08c216e796 Begin version 6.0.6 development. 2022-05-02 16:24:18 -04:00
Wayne Stambaugh 3d87537dd2 Tag release version 6.0.5. 2022-05-02 15:37:58 -04:00
Marek Roszko 862d975c2c Update vcpkg manifest for debuggable wxwidgets 3.1.5 2022-04-30 23:10:15 -04:00
Mark Roszko 45d58fbefc Remove errant phoenix message when disabled 2022-04-30 23:10:10 -04:00
Mark Roszko 7b7e4e1ae5 Move forwards kicad-vcpkg registry to get our ngspice 2022-04-30 03:40:40 +00:00
Marek Roszko 3f04b80ff4 Remove the vcpkg specific hack to FindwxWidgets.cmake which is no longer needed/broken with manifests 2022-04-28 23:27:09 -04:00
Mark Roszko 5830cdd1c0 Disable windows ci for now 2022-04-29 01:24:09 +00:00
Marek Roszko 2416b28cda Add vcpkg manifest 2022-04-28 21:20:30 -04:00
Seth Hillbrand 729cf7a39d Use instance data to store values
Previous use of instance was as an "override" of the default value.
This has changed to be used as the primary storage location for all
values.  This means that we cannot clear the instance data when setting
a new value for all instances, instead we have to change the instance
data and the default value is superfluous

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

(cherry picked from commit 1a70465927)
2022-04-25 13:03:41 -07:00
Seth Hillbrand 4d56690a7e Update Translations 2022-04-19 14:55:57 -07:00
Henrik Kauhanen e30128f6f5 Translated using Weblate (Swedish)
Currently translated at 99.7% (7190 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-04-19 23:54:45 +02:00
ZbeeGin c4a42f28c8 Translated using Weblate (Polish)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-04-19 23:54:45 +02:00
co8 j bdbbba54f9 Translated using Weblate (Japanese)
Currently translated at 99.8% (7201 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-04-19 23:54:45 +02:00
Toni Laiho 80c2fb39b1 Translated using Weblate (Finnish)
Currently translated at 99.9% (7205 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-04-19 23:54:44 +02:00
Mark Hämmerling 63506cf777 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-04-19 23:54:44 +02:00
Jan Straka 6c1d615f66 Translated using Weblate (Czech)
Currently translated at 91.8% (6622 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-04-19 23:54:44 +02:00
Jan Straka c0ca2f1830 Translated using Weblate (Czech)
Currently translated at 91.7% (6613 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-04-19 23:54:44 +02:00
Seth Hillbrand cf5f36aac5 Fix broken comparison in pin_numbers
Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons.  These caused heap overflows when sorting pin tables

This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment.  Also adds unit
tests for common error cases

(cherry picked from commit aac6f576c2)
2022-04-19 14:49:52 -07:00
Simon Richter cc51807241 Fix minimum size calculation for new hierarchical sheets
These constants are given in mil, but are used in a context of internal
units.
2022-04-18 02:16:17 +02:00
Marco Ciampa e1865c1178 Updated Italian translation 2022-04-17 10:49:41 +02:00
Henrik Kauhanen b81ba520f8 Translated using Weblate (Swedish)
Currently translated at 99.7% (7190 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-04-16 00:13:45 +02:00
Toni Laiho edbb9c5194 Translated using Weblate (Finnish)
Currently translated at 99.9% (7205 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-04-16 00:13:45 +02:00
Eric cda6aed408 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-04-16 00:13:45 +02:00
Henrik Kauhanen 74172612fa Translated using Weblate (Swedish)
Currently translated at 99.6% (7188 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-04-16 00:13:45 +02:00
Wellington Terumi Uemura 7209239a62 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-04-16 00:13:45 +02:00
Bas Wijnen 16edde8611 Translated using Weblate (Dutch)
Currently translated at 98.4% (7098 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/nl/
2022-04-16 00:13:45 +02:00
Toni Laiho 33f8bcb7c7 Translated using Weblate (Finnish)
Currently translated at 99.8% (7203 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-04-16 00:13:45 +02:00
Ulices fb6505d8cb Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-04-16 00:13:44 +02:00
Arnau Llovet Vidal 39935311fc Translated using Weblate (Catalan)
Currently translated at 65.8% (4749 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-04-16 00:13:44 +02:00
Seth Hillbrand 851f893e8e Fix crash due to cleared view data
When changing fields, we need to update the view before allowing canvas
updates
2022-04-15 14:56:18 -07:00
Seth Hillbrand bfa1661edf Sync via/pad flashing for null boards
Pads return true by default and so should vias
2022-04-15 11:39:18 -07:00
Jeff Young 110663d214 Fix crash bug when selecting marker. 2022-04-15 13:40:19 +01:00
Jeff Young 847fa7f2c4 Add PCB_ARCs to type enum.
Fixes https://gitlab.com/kicad/code/kicad/issues/11384

(cherry picked from commit d01c2a6614)
2022-04-14 18:37:25 +01:00
jean-pierre charras ef798f446f STEP export: handle polygons with arcs (and convert arcs to segments).
From Master branch
Fixes #11389
https://gitlab.com/kicad/code/kicad/issues/11389
2022-04-14 16:31:56 +02:00
jean-pierre charras 2de1bd7a4a Ensure "Open Recent" and "Clear files" menu titles are updated after language change.
From Master branch.
2022-04-14 15:06:17 +02:00
Roberto Fernandez Bautista 250942264b CADSTAR Sch: Clear symbol of all elements before overwriting with new one
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11378

(cherry picked from commit 85f6ff48e7)
2022-04-12 21:42:03 +01:00
Jeff Young 6818eff90e Improvements to Eagle dimension importing.
1) Import leaders
2) Drop radius and angle dimensions
3) Import dimension text sizes
4) Correctly interpret which side dimension offset is on
5) Correclty handle offsets for non-cardinal dimensions

Fixes https://gitlab.com/kicad/code/kicad/issues/10763
2022-04-12 13:24:34 +01:00
Jeff Young b2eb1f829e Dual-purpose IsMovableFromAnchorPoint to keep from moving symbols off-grid.
Fixes https://gitlab.com/kicad/code/kicad/issues/11360

(cherry picked from commit 8358685920)
2022-04-12 13:24:34 +01:00
Jeff Young a60e7e27b6 A better blob vs web detector.
Since we're in a deflated state, a long web *could* still have a very
small area.  So check max extents instead.

(cherry picked from commit 1dae5eb7c4)
2022-04-12 13:24:34 +01:00
Jeff Young 601995c759 Apply the min-width-by-min-width test to islands after pruning.
We're looking for minimum *web* width.  A blob does not a web make.

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

(cherry picked from commit 1a2e0d8226)
2022-04-12 13:24:14 +01:00
Jeff Young 63ce2307c8 Adjust LIB_SYMBOL compare for use with ERC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10783

(cherry picked from commit 117bd4fc22)
2022-04-12 13:24:14 +01:00
Jeff Young 03bc9551c7 Don't save schematic symbol back to lib manager.
Also, since it doesn't get saved, changing symbols will lose any edits.
Make sure to ask the user first.

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

(cherry picked from commit 16acba34d3)
2022-04-12 13:24:14 +01:00
Jeff Young c8cd214cb0 Make sure to add any now-necessary junctions after a rotate.
Fixes https://gitlab.com/kicad/code/kicad/issues/11242

(cherry picked from commit 74a578047c)
2022-04-12 13:24:14 +01:00
Marek Roszko fe11bc8330 Change the behavior of ACTION_MENU::Add to require clones if required outside the function 2022-04-11 20:39:08 -04:00
Seth Hillbrand d0796399a2 DP tolerance needs to be 1IU on each axis
ApproximatelyParallel will only check for parallel within 1 IU, so a 1x1
SEG will always be parallel and the projection is invalid
2022-04-11 16:55:54 -07:00
Seth Hillbrand c2d72180f8 Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
This reverts commit 651f50a26d.
2022-04-11 11:03:19 -07:00
Seth Hillbrand 57729414e3 Update Translations 2022-04-11 09:40:06 -07:00
Henrik Kauhanen b664fb7a7d Translated using Weblate (Swedish)
Currently translated at 99.7% (7191 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-04-11 18:38:45 +02:00
Toni Laiho fe1a8bea8c Translated using Weblate (Finnish)
Currently translated at 99.8% (7202 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-04-11 18:38:45 +02:00
Tian Yunhao 3606ad725c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-04-11 18:38:45 +02:00
Eric e8e24b372f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-04-11 18:38:45 +02:00
Henrik Kauhanen 3bfa5807c8 Translated using Weblate (Swedish)
Currently translated at 99.7% (7191 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-04-11 18:38:44 +02:00
Toni Laiho b797735c24 Translated using Weblate (Finnish)
Currently translated at 99.9% (7203 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-04-11 18:38:44 +02:00
Ulices d0af5fb5fc Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-04-11 18:38:44 +02:00
Mark Hämmerling 5ca91c404a Translated using Weblate (German)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-04-11 18:38:44 +02:00
Jan Straka 6ba7967adc Translated using Weblate (Czech)
Currently translated at 91.6% (6608 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-04-11 18:38:44 +02:00
Arnau Llovet Vidal 9dfc492cb9 Translated using Weblate (Catalan)
Currently translated at 65.7% (4741 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-04-11 18:38:44 +02:00
Marco Ciampa 0876fed91b Small fix in Italian translation 2022-04-11 10:06:56 +02:00
Marek Roszko 651f50a26d Change the behavior of ACTION_MENU::Add to require clones if required outside the function
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:40:58 -04:00
Marek Roszko 99456d4351 Don't pointlessly construct a wxBitmap
(cherry picked from commit fd83e675a2)
2022-04-10 11:48:10 +00:00
Jeff Young 529048dac1 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087

(cherry picked from commit 722b2588f4)
2022-04-09 23:09:10 +01:00
Jeff Young be2e0cc272 A right-to-left single-char sel followed by typing leaves cursor the same.
Fixes https://gitlab.com/kicad/code/kicad/issues/11349

(cherry picked from commit dead84e7a1)
2022-04-09 21:23:54 +01:00
Jeff Young 48a776f7c5 Repair code that was supposed to be after LoadSymbol().
(Even the comment said so.)

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

(cherry picked from commit ed361925ba)
2022-04-09 21:23:18 +01:00
Jeff Young 43929781a2 On-the-fly translations for pin electrical types.
Also add on-the-fly translation for editor title bars.

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

(cherry picked from commit 68ca385e07)
2022-04-09 21:22:50 +01:00
Seth Hillbrand e02229a234 Don't flag pin missing driver when there is an NC
The NC flag indicates user intention to override the lack of connection
to input pins
2022-04-07 09:29:02 -07:00
Seth Hillbrand 821fe6ea42 Don't set the dirty bit when running DRC
Dirty bit is set in the zone filler separately, there is no action in
the DRC that needs to be saved

Fixes https://gitlab.com/kicad/code/kicad/issues/11344
2022-04-06 17:03:01 -07:00
Seth Hillbrand e740db61f5 Show non-driven error on single-pin nets
Better to have both the single-pin error message and the non-driven
error message when an input pin is not connected than miss error
messages when the pin is connected to a blank net

Fixes https://gitlab.com/kicad/code/kicad/issues/10430
2022-04-06 16:53:23 -07:00
Marek Roszko a700531aba Forcefully ignore PYTHONPATH env variable on Windows
Fix https://gitlab.com/kicad/code/kicad/-/issues/11328


(cherry picked from commit 44296dfea2)
2022-04-05 02:11:32 +00:00
Wayne Stambaugh 7d9cf00fd9 Improve sheet schematic import messages and simplify code.
There was also a logic bug when the selected schematic was in a different
path than the current project and was already part of the current project.
The symbol library table reconciliation code was still run which was wrong.

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

(cherry picked from commit e336a0e403)
2022-04-04 17:19:40 -04:00
jean-pierre charras 6127ae92a5 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196

(cherry picked from commit 21144481d2)
2022-04-04 13:52:21 -07:00
Jeff Young f8c92e355b Plating thickness appears on both sides of hole wall. 2022-04-04 21:51:30 +01:00
Jeff Young f7f6ea54fe Fix incorrect m_SyncPinEdit setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/11331

(cherry picked from commit 3f9cfc0ac1)
2022-04-04 21:51:30 +01:00
dsa-t fdfe5a813e Clamp cursor to limits of coordinates representation
Also improves large distance handling.

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

(cherry picked from commit 68655540eb)
2022-04-04 13:38:50 -07:00
aris-kimi 636d009860 Added footprint rule area anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10461

(cherry picked from commit 47c0672ff3)
2022-04-04 13:38:00 -07:00
Seth Hillbrand 7d96d5940d UNDEFINED_LAYER is always flashed
This is already true for vias and should be true for pads as well

Fixes https://gitlab.com/kicad/code/kicad/issues/11335
2022-04-04 12:25:55 -07:00
Wayne Stambaugh d3a60f7d83 Fix broken symbol field table editor dialog.
Do not use the symbol field string to populate the value and footprint
grid cells.  The field strings may be empty because the symbol has not
been instantiated yet by entering a sheet.  This fix makes an incorrect
assumption that the first instance value and footprint data in the symbol
is the same for all instances.

Note: this fix is incomplete because the value and footprint fields are
      can now be different between sheet instances.  The entire field
      table editor design will need to be rethought because the current
      grouping doesn't allow different value and footprint instance
      changes.

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

(cherry picked from commit b87fc45e33)
2022-04-04 14:32:07 -04:00
jean-pierre charras 604871518f Export VRML: fix some (minor) issues, from Master branch. 2022-04-04 14:46:55 +02:00
jean-pierre charras 5a68077f60 VRML exporter: make export faster by using SHAPE_POLY_SET::PM_FAST. 2022-04-04 12:28:54 +02:00
Jeff Young 8054f1a948 Apply a more sophisticated test for ignoring isInCoupledDiffPair.
The basic problem is that the DRC engine does length testing and skew
testing by collecting all the diff pair constituent parts and pairing them
itself.  Since each part is collected on its own, we need to ignore the
'B' unit when evaluating any conditional expressions.  However, doing this
in general means that when evaluating "OwnClearance()" we also ignore the
'B' unit and return the diff pair CLEARANCE_CONSTRAINT when we shouldn't.

This implements a more discerning test which know what the current requested
constraint is when evaluating expressions.

See also https://forum.kicad.info/t/solved-custom-differencing-rule-not-working-drc/34034/6

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

(cherry picked from commit f7cdc7af75)
2022-04-03 18:23:41 +01:00
Jeff Young 80bf1048d0 Look for sheet pins inside sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/11297

(cherry picked from commit 6b99a937d8)
2022-04-03 18:22:15 +01:00
Jeff Young d85e52e9fd A better is-modified test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10791

(cherry picked from commit 09ba7468ae)
2022-04-03 18:21:41 +01:00
Jeff Young e21f0ec9fb Honour prime-event-location when starting router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11239

(cherry picked from commit a54bbfe12b)
2022-04-03 18:21:00 +01:00
Jeff Young 1adfca8f2d Don't re-fetch selection when running select-in-same-sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/11110

(cherry picked from commit a35ae8cdce)
2022-04-03 18:20:32 +01:00
Jeff Young f89256e51e Implement align-to-grid for sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/11201

(cherry picked from commit 8dc680adbb)
2022-04-03 18:14:23 +01:00
Jeff Young e98e9f72df Only write Allow DRC Violations if enabled.
Fixes https://gitlab.com/kicad/code/kicad/issues/11177

(cherry picked from commit b78a260326)
2022-04-03 18:13:04 +01:00
Jeff Young f8ff9705ff Fix issues with importing NPTH pads from CircuitStudio.
Fixes https://gitlab.com/kicad/code/kicad/issues/10493

(cherry picked from commit 118a37f19f)
2022-04-03 15:51:33 +01:00
Jeff Young e3e52d055a Don't rely on HasConversion() for Symbol Properties in Symbol Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11200

(cherry picked from commit 2681ad6cfc)
2022-04-03 15:51:33 +01:00
Jeff Young 6de8b99cf2 Don't default to Annotate All just because the selection is empty.
Fixes https://gitlab.com/kicad/code/kicad/issues/11181

(cherry picked from commit 6fa8cab188)
2022-04-03 15:51:33 +01:00
Jeff Young c9829cf9a8 Enable bb and/or uvias when encountering them on Altium import.
Fixes https://gitlab.com/kicad/code/kicad/issues/10044

(cherry picked from commit 1d66925f5f)
2022-04-03 15:51:33 +01:00
Jeff Young 0fc4ccf8d9 Clean up pad handling in 3D viewer.
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.

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

(cherry picked from commit 0dc857b5ab)
2022-04-03 15:51:33 +01:00
Jeff Young 330b1fd733 Don't leave dangling pointers to old document when importing.
This goes for both selection pointers and undo/redo pointers.

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

(cherry picked from commit 535ecb9b7b)
2022-04-03 09:49:37 +01:00
Marek Roszko 455ec428f2 Free memory in dxf import sooner on bad_alloc
(cherry picked from commit b18e441a88)
2022-04-02 13:58:35 +00:00
jean-pierre charras 39959844e5 SYMBOL_EDITOR_CONTROL::DuplicateSymbol(): fix incorrect validation test.
DuplicateSymbol() is called both to duplicate and paste. Only duplicate
needs a test to know if a symbol is selected.
Fixes #11053
https://gitlab.com/kicad/code/kicad/issues/11053
2022-04-02 08:20:27 +02:00
Marek Roszko d5de4bb5c7 Catch memory exhaustion trying to import large DXFs
See https://gitlab.com/kicad/code/kicad/-/issues/11308


(cherry picked from commit 9f8c0a8185)
2022-04-02 03:15:33 +00:00
Seth Hillbrand 6706a5c462 Skip zero-size elements when converting
Also fixes an assertion when converting to polygon from the board editor

Fixes https://gitlab.com/kicad/code/kicad/issues/11313
2022-04-01 13:22:08 -07:00
Seth Hillbrand 15fe2f2fd0 Allow common greek letters in passive regex
Adds common letters (µ and Ω) as prefix and unit

Fixes https://gitlab.com/kicad/code/kicad/issues/11289
2022-04-01 12:51:21 -07:00
Seth Hillbrand c23679d9bd Consistently handle env/prj variables
User-defined variables cannot be used for internally-reserved variables

Fixes https://gitlab.com/kicad/code/kicad/issues/11232
2022-03-31 17:05:25 -07:00
jean-pierre charras f226772938 Cvpcb: fix "not found" .equ files.
Fixes #11264
https://gitlab.com/kicad/code/kicad/issues/11264
2022-03-29 18:54:11 +02:00
Seth Hillbrand 6a53e318e5 Thread the connectivity vector updates
Now that we are dealing with individual connection elements that do not
update their connected elements as well, we can thread the update, just
being careful to guard any remaining updates (bus_enty/busLine) that
need reciprocal updating

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-28 15:35:52 -07:00
Seth Hillbrand 776a28a10e Avoid generating SCH_CONNECTION if not needed
If the SCH_ITEM has already been processed, the extra time needed to
iterated over the memberset and get the SCH_CONNECTION when we won't use
it is not neccesary.

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-28 15:07:18 -07:00
Seth Hillbrand 3a98eacdb9 Handle connection vector inline
Normally, you will gain by resursing a nested loop only over the
pairs that are not already handled.  In this case, however, you lose
time because you step outside of the cache by adding the reciprocal test
at each step.

Instead, we process one element at a time, keeping it cached and loop
over all other elements to add to the connection.  This saves us about
75% of the time for larger loops (e.g. stacked power pins on a large
BGA)

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-28 15:07:18 -07:00
Seth Hillbrand a8004cb161 Update Translations 2022-03-28 11:14:40 -07:00
Henrik Kauhanen f00222b3a6 Translated using Weblate (Swedish)
Currently translated at 99.6% (7186 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-28 19:50:37 +02:00
Mark Hämmerling 96dded48d4 Translated using Weblate (German)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-28 19:50:37 +02:00
Allan Nordhøy 950cccdc1c Translated using Weblate (Norwegian Bokmål)
Currently translated at 73.4% (5295 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/nb_NO/
2022-03-28 19:50:37 +02:00
Mark Hämmerling 5b7a1a8177 Translated using Weblate (German)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-28 19:50:37 +02:00
taotieren 96aa472ff9 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-03-28 19:50:37 +02:00
Henrik Kauhanen 0ec50e9096 Translated using Weblate (Swedish)
Currently translated at 99.4% (7173 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-28 19:50:37 +02:00
Henrik Kauhanen 6bc48e9ca8 Translated using Weblate (Swedish)
Currently translated at 99.4% (7173 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-28 19:50:36 +02:00
Arnau Llovet Vidal 5505add08e Translated using Weblate (Catalan)
Currently translated at 65.7% (4740 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-28 19:50:36 +02:00
Marek Roszko 4d8297a1f6 Try and ducktape boost api change for seeder
idk what im doing


(cherry picked from commit d440ff7c37)
2022-03-28 01:48:50 +00:00
Marek Roszko e1cd74dd78 Remove extra boost include
(cherry picked from commit 7a0d8c2fe0)
2022-03-28 01:48:41 +00:00
Mario Luzeiro 2567f45c1d 3D-Viewer: binds the default texture after draw and before end the list
Fixes https://gitlab.com/kicad/code/kicad/issues/2547

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

(cherry picked from commit 7659f3c81b)
2022-03-25 16:22:57 -07:00
Marek Roszko 0ea7dabc12 Read the boost manual right-side up
(cherry picked from commit 3f0f846435)
2022-03-24 22:17:19 +00:00
jean-pierre charras bf8c7d7697 GERBER_JOBFILE_WRITER: fix a crash due to use of a null pointer.
Can happens when it is created from a Python script.
From Master branch
Fixes #11227
https://gitlab.com/kicad/code/kicad/issues/11227
2022-03-24 18:01:24 +01:00
Marek Roszko 891c919c23 Ensure the kiid generator rng is actually uniquely seeded each start
(cherry picked from commit 2e689901fc)
2022-03-23 22:51:33 +00:00
jean-pierre charras 375a7303c5 Gerbview: Fix incorrect rendering of aperture macros combining polygons.
A aperture macro can have polygons with holes, and/or many polygons.
When combining polygons holes can be created. So ensure the resulting polygon
is fractured before drawing it.
From Master branch
Fixes #11218
https://gitlab.com/kicad/code/kicad/issues/11218
2022-03-23 20:56:57 +01:00
jean-pierre charras e14e9cf8a9 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max coord depends on the editor (schematic/board...)
From Master.
2022-03-23 20:55:25 +01:00
Seth Hillbrand 4e98ce87c7 All triangular trapezoid pads
A triangular trapezoid will have the deltaX/deltaY of the same size as
the length of that axis.  This creates a three-point polygon, which is
perfectly valid for our use
2022-03-22 13:38:36 -07:00
Seth Hillbrand 207820e112 Avoid duplicate points in trapezoid pads
Duplicate points can be either positive-facing or negative facing, so
test absolutes

Fixes https://gitlab.com/kicad/code/kicad/issues/11025
2022-03-22 13:30:22 -07:00
Henrik Kauhanen dbbecefcb9 Translated using Weblate (Swedish)
Currently translated at 99.4% (7173 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-22 19:24:35 +01:00
Wellington Terumi Uemura df8f166847 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-03-22 19:24:35 +01:00
Henrik Kauhanen 79ef8e14aa Translated using Weblate (Swedish)
Currently translated at 99.4% (7173 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-22 19:24:35 +01:00
taotieren 5081165611 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-03-22 19:24:34 +01:00
taotieren 3bfcaf2455 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-22 19:24:34 +01:00
Mustafa Selçuk ÇAVDAR 9e2416d2c9 Translated using Weblate (Turkish)
Currently translated at 44.4% (3205 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-03-22 19:24:34 +01:00
boonchai k 49eecf66fe Translated using Weblate (Thai)
Currently translated at 99.6% (7188 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/th/
2022-03-22 19:24:34 +01:00
Henrik Kauhanen bc3a4e4ede Translated using Weblate (Swedish)
Currently translated at 99.4% (7173 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-22 19:24:34 +01:00
Konstantin Baranovskiy 3645c3c0cc Translated using Weblate (Russian)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-03-22 19:24:34 +01:00
Wellington Terumi Uemura 7902c1cc58 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-03-22 19:24:34 +01:00
ZbeeGin 2a2781e1bc Translated using Weblate (Polish)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-03-22 19:24:34 +01:00
Tokita, Hiroshi 9510b07807 Translated using Weblate (Japanese)
Currently translated at 99.9% (7204 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-03-22 19:24:34 +01:00
Ulices 072c0f06cd Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-03-22 19:24:34 +01:00
Eric b75e782aef Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7209 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-22 19:24:34 +01:00
Seth Hillbrand d9fe48171b Attempt to fix the Mac DPI grid mixing
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows.  This attempts to
rectify the situation by avoiding DPI changes for Mac builds.

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

(cherry picked from commit 9722a05820)
2022-03-22 11:23:49 -07:00
Jeff Young eeee5afdfd Zero out parent rule when overridden by local property.
Fixes https://gitlab.com/kicad/code/kicad/issues/11197

(cherry picked from commit b679a21651)
2022-03-21 20:56:00 +00:00
Jeff Young 790b810621 A little bit of nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/11077

(cherry picked from commit b3ae0fdca5)
2022-03-21 20:54:28 +00:00
Seth Hillbrand e33bf78d96 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

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

(cherry picked from commit 442aae19d9)
2022-03-21 08:37:53 -07:00
jean-pierre charras bd86999615 QA test: fix incorrect call to BOOST_TEST_MESSGE.
It expects a C string, not a wxString.
Fromm Master.
2022-03-21 14:02:18 +01:00
jean-pierre charras 1b108afd0b Specctra import/export: fix some issues (tested only with FreeRouter):
- Handling of locked tracks
- Locked tracks are now exported with attribute "fix".
- Incorrect view cleaning
- Fix memory leak.
From master branch.
2022-03-20 19:05:23 +01:00
jean-pierre charras a8384beb6f Python, board.i: fix incorrect order of an include.
The result was ignoring PCB_SHAPE in pcb_text.i.
2022-03-20 18:47:14 +01:00
Seth Hillbrand c44d31fcfb Fix expand variables for built-in
Allow falling back to the alternate variable definitions if the built-in
text block variables are not set.

Also push the project into variable resolution when plotting

Fixes https://gitlab.com/kicad/code/kicad/issues/11168
2022-03-18 16:46:36 -07:00
Marco Ciampa d801a8689c Updated Italian translation 2022-03-18 21:35:14 +01:00
Frank Zeeman 4a1abd239a Append True to Python 3 AddPrimitivePoly() call
Fixes https://gitlab.com/kicad/code/kicad/issues/11012

(cherry picked from commit b3a319b77e)
2022-03-18 13:01:56 -07:00
Seth Hillbrand 423732910d Update Translations 2022-03-18 12:53:10 -07:00
Arnau Llovet Vidal e4ce5e5262 Translated using Weblate (Catalan)
Currently translated at 65.6% (4737 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-18 20:52:12 +01:00
taotieren 2998d31f2c Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7210 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-18 20:52:12 +01:00
Mustafa Selçuk ÇAVDAR da98413f82 Translated using Weblate (Turkish)
Currently translated at 43.9% (3170 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-03-18 20:52:11 +01:00
Bas Wijnen f562466189 Translated using Weblate (Dutch)
Currently translated at 98.4% (7096 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/nl/
2022-03-18 20:52:11 +01:00
김랑기 0deae6bdd2 Translated using Weblate (Korean)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-03-18 20:52:11 +01:00
Mark Hämmerling 31f8e73cf8 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-18 20:52:11 +01:00
Arnau Llovet Vidal e58f50602d Translated using Weblate (Catalan)
Currently translated at 65.4% (4721 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-18 20:52:11 +01:00
Ulices c870505141 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-03-18 20:52:11 +01:00
Eric c20e81fbdd Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7210 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-18 20:52:11 +01:00
Trần Phi Hải 58d0c4112d Translated using Weblate (Vietnamese)
Currently translated at 17.6% (1271 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/vi/
2022-03-18 20:52:11 +01:00
Henrik Kauhanen 1cb80e1ad0 Translated using Weblate (Swedish)
Currently translated at 99.5% (7175 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-18 20:52:11 +01:00
___davidpr 2584c46c28 Translated using Weblate (Serbian)
Currently translated at 13.9% (1006 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sr/
2022-03-18 20:52:11 +01:00
Konstantin Baranovskiy 2ce96415a6 Translated using Weblate (Russian)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-03-18 20:52:10 +01:00
Wellington Terumi Uemura 8eded13d96 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-03-18 20:52:10 +01:00
ZbeeGin 069143dc05 Translated using Weblate (Polish)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-03-18 20:52:10 +01:00
Mark Hämmerling 9d09ce0538 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-18 20:52:10 +01:00
Arnau Llovet Vidal d9dd691108 Translated using Weblate (Catalan)
Currently translated at 65.4% (4718 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-18 20:52:10 +01:00
Jeff Young f69ebe55ad Improved performance for Cleanup Tracks & Vias.
(cherry picked from commit 14378812be)
2022-03-18 12:50:09 -07:00
Jeff Young ff604cc6a3 Pull some fixes back from master.
Mostly wxT(), but also some performance, and some for better response
to Cancel button.

(cherry picked from commit 5c63df28e4)
2022-03-18 12:49:54 -07:00
Jeff Young 8ccc5bd8f2 Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057

(cherry picked from commit 1f745b000d)
(cherry picked from commit dd55ffb75c)
2022-03-18 12:49:44 -07:00
Jeff Young 02b1f552fd Make sure LIB_ID escape context allows for formatting constructs.
Also make sure that value field is updated from name changes when the
symbol is a power symbol (even if it's from the schematic instead of
the library).

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

(cherry picked from commit a9eb7a0e28)
(cherry picked from commit 02252be29d)
2022-03-18 12:49:32 -07:00
Wayne Stambaugh f058dc9ed8 Begin version 6.0.5 development. 2022-03-17 19:35:07 -04:00
Wayne Stambaugh 2c061ed67a Tag release version 6.0.4. 2022-03-17 19:33:28 -04:00
Seth Hillbrand 9bfbe3acd8 Revert "Special-case synthetic click after tool selection."
This reverts commit dd55ffb75c.
2022-03-17 16:21:39 -07:00
Seth Hillbrand 40bdd26e39 Revert "Make sure LIB_ID escape context allows for formatting constructs."
This reverts commit 02252be29d.
2022-03-17 16:21:38 -07:00
Seth Hillbrand b0f8055377 Revert "Pull some fixes back from master."
This reverts commit 5c63df28e4.
2022-03-17 16:21:37 -07:00
Seth Hillbrand 33f4fc9873 Revert "Improved performance for Cleanup Tracks & Vias."
This reverts commit 14378812be.
2022-03-17 16:21:34 -07:00
Jeff Young c90842dd08 Update value & footprint from clipboard whether keeping annotation or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11116

(cherry picked from commit 400cff994d)
2022-03-17 22:34:52 +00:00
Jeff Young 310b4cdf75 Re-entrancy blocker for line/wire/bus tool.
Also clear infobar messages after a cancelInteractive.

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

(cherry picked from commit 05bca282f7)
2022-03-17 22:34:52 +00:00
Seth Hillbrand 2208e0db16 Avoid marking symbols that will not be processed
We want to shorting the processing time by marking symbols that have
already been processed.  But we must avoid marking symbols that will not
be processed due to their other flags

Fixes https://gitlab.com/kicad/code/kicad/issues/11164
2022-03-17 10:10:21 -07:00
jean-pierre charras cf4c403094 Gerber plotter: fix incorrect handling of arcs in polygons.
From master branch.
Fixes #11156
https://gitlab.com/kicad/code/kicad/issues/11156
2022-03-17 13:06:37 +01:00
Jeff Young dd55ffb75c Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057

(cherry picked from commit 1f745b000d)
2022-03-16 17:11:07 +00:00
Jeff Young d34faf30cc Save pointer to markers provider.
Fixes https://gitlab.com/kicad/code/kicad/issues/11136

(cherry picked from commit a81c8d4922)
2022-03-16 16:23:10 +00:00
Jeff Young 3720a52ecb Bubble ESC up from the 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/issues/9984

(cherry picked from commit 32fdab8902)
2022-03-16 16:21:24 +00:00
Jeff Young 47de9f8f04 Fix typo which leads to catastrophic performance on boards with tons of zones.
(cherry picked from commit 392a3ec131)
2022-03-16 15:16:11 +00:00
Jeff Young 14378812be Improved performance for Cleanup Tracks & Vias. 2022-03-16 15:15:20 +00:00
Jeff Young 0070a4686e Cherry-pick the short-arc-is-really-a-segment fix from master.
Fixes https://gitlab.com/kicad/code/kicad/issues/11119
2022-03-16 15:15:15 +00:00
Jeff Young 5c63df28e4 Pull some fixes back from master.
Mostly wxT(), but also some performance, and some for better response
to Cancel button.
2022-03-16 15:15:09 +00:00
Jeff Young e5ea37507c Exclude hidden text from selection in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11111

(cherry picked from commit 06c1bccccd)
2022-03-16 15:15:01 +00:00
Jeff Young 53bd87d792 Performance fixes for the board from hell....
(cherry picked from commit e4b56ab7f1)
2022-03-16 15:14:51 +00:00
Jeff Young 02252be29d Make sure LIB_ID escape context allows for formatting constructs.
Also make sure that value field is updated from name changes when the
symbol is a power symbol (even if it's from the schematic instead of
the library).

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

(cherry picked from commit a9eb7a0e28)
2022-03-16 15:14:29 +00:00
Wayne Stambaugh 9e9598af5f Begin version 6.0.4 development. 2022-03-15 20:14:40 -04:00
Wayne Stambaugh 9dc35b575c Tag release version 6.0.3. 2022-03-15 20:06:04 -04:00
Wayne Stambaugh 3cd24f656b Correct sheet schematic import from different project warning file name. 2022-03-15 18:21:47 -04:00
Marco Ciampa 73eac90922 Updated Italian translation 2022-03-15 20:36:19 +01:00
Marco Ciampa 70e5c9f7c6 Updated Italian translation 2022-03-15 20:21:04 +01:00
Marco Ciampa d820a7fe42 Updated Italian translation 2022-03-15 19:12:11 +01:00
Jeff Young b9d7a0565f Hand cherry-pick fixes from master.
https://gitlab.com/kicad/code/kicad/-/commit/0a8718cd1d62a40ea9094b773fb6caf56a695a05
https://gitlab.com/kicad/code/kicad/-/commit/7fb4a2c0a53089439ef3c31800bc310bc7c8a6ba
2022-03-15 13:19:12 +00:00
jean-pierre charras ad2486b09f Fix a incorrect filename in a copy command (MSW specific).
Also fix a regression and respect the KICAD_BUILD_QA_TESTS build option.
2022-03-14 21:14:04 -04:00
Marek Roszko 4742043a7e Extend manifest product version to include minor 2022-03-14 20:34:23 -04:00
Marek Roszko 9e56c7e5c9 Stuff a resource manifest into the kipython kiface 2022-03-14 20:32:29 -04:00
Marek Roszko 674fbfa889 Switch the kiface extension on windows to native dll
Fixes issue where Windows really wants to see the DLL extension to load the resource metadata
2022-03-14 20:23:37 -04:00
Seth Hillbrand ae1cc29dc6 Revert "Move connected_items from hash table to tree"
This reverts commit 187aa1c171.
2022-03-14 17:22:44 -07:00
jean-pierre charras f1c772ba55 Try to blindly fix a QA test issue. 2022-03-14 20:39:34 +01:00
jean-pierre charras 6f6505f6a1 Fix crash in SCH_LABEL_BASE::IsType() when the item is not living in a schematic.
It happens for instance when copying the item from the clipboard.
From master branch.
Fixes #11128
2022-03-14 09:36:10 +01:00
Marek Roszko af4a4cbc08 Don't use wxScreenDC as this returns "a" screen but not "the" screen
Windows supports per-monitor and per-app DPI. wxScreenDC is unable to resolve the actual DPI setting since it has no window context.

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


(cherry picked from commit 605dd8a580)
2022-03-14 03:32:04 +00:00
Marek Roszko 40462012ee Don't pre-scale the line width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11122


(cherry picked from commit d74a0cdaa3)
2022-03-14 03:09:23 +00:00
jean-pierre charras 70514be11f Fix CMakeLists.txt syntax error and msys2 compatibility. 2022-03-13 12:50:26 +01:00
Marek Roszko 7558dad915 Don't use the ANSI version of SetDllDirectory 2022-03-12 21:45:14 -05:00
Marek Roszko 5e9b982ddf Plant the ability to verify code signing signatures when trying to load kifaces
Off by default and intended for use in released builds only
2022-03-12 21:44:36 -05:00
Marek Roszko 17539a564e Two very minor win32 calls to lock down dll/exe search paths from cwd 2022-03-12 15:47:48 -05:00
Marek Roszko 43aa0bfdc3 Tweak the "pyd" extension if for windows to be completely inclusive 2022-03-12 15:47:48 -05:00
Marco Ciampa 7ab4bf3823 Small fix in Italian translation 2022-03-12 17:47:54 +01:00
Marek Roszko ae01dc8ef1 Set SetErrorMode on Debug build
(cherry picked from commit d3ca857af7)
2022-03-12 01:57:45 +00:00
Seth Hillbrand 187aa1c171 Move connected_items from hash table to tree
This gains about 10% speed in heavily connected sheets

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-11 16:19:03 -08:00
Seth Hillbrand 17b1b68ac7 Break up buildConnectionGraph for debugging
Needed to find bottlenecks in fns, so break out individual sections of
the massive function for easier understanding.

buildItemSubgraphs (one section of the previous function) would build
millions of connections that were never used as stacked pins created X!
connections.  Also tested using sets instead of lists and keeping unique
lists to avoid flagging but none of these were as performant as using
flags to remember which items had already been processed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-11 16:18:56 -08:00
Wayne Stambaugh 35f15f016d Improve shared schematic file churn heuristics.
The previous solution cleared all of the fields and force the unit setting
to unit one which would have less than desirable effects when reusing a
schematic in another project.  This solution forces all of the instance
settings to the first sheet instance of the current project to prevent file
change churn when changing shared sheets in the current project.

This will not prevent shared schematic file changes when the first sheet
instance data differs between projects.

(cherry picked from commit dd1dbb81f6)
2022-03-11 14:34:30 -05:00
Wayne Stambaugh 70277e5514 Reduce shared schematic file change churn.
(cherry picked from commit bf5d585e24)
2022-03-11 14:34:04 -05:00
Marek Roszko 2874688281 Set some error flags for win32
(cherry picked from commit afaff022d7)
2022-03-11 01:17:50 +00:00
Seth Hillbrand 826096790d Cleanup a few more raw strings
(cherry picked from commit 455e330f3b)
2022-03-10 11:23:19 -08:00
Seth Hillbrand a2e66f6667 Don't write bytecode on MacOS
MacOS packages are signed and checked on each run.  Since Python lives
inside the package, adding byte code will break the package signature

(cherry picked from commit 5881471a52)
2022-03-10 11:23:19 -08:00
Jeff Young c241032a3b Redraw pads when mask or paste layer is visible after board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/11079
2022-03-10 17:54:38 +00:00
Seth Hillbrand 9ca35cbcee Rework of a24cdcb3f0
Inflate with linked holes needs to account for fractured polygons,
otherwise inflating with positive value will create rounded divots where
overlapping fracture lines meet and inflating with negative value will
create spaces between fracture lines.

Calling Simplify before Inflate takes an inordinate amount of time as
the Clipper healing routine is rather slow.  Our own Unfracture is meant
to heal the results of our Fracture routine and works much more quickly.
After healing, we still call the Simplify routine
2022-03-10 09:14:13 -08:00
Jon Evans 9c386026a8 Use actual project path when saving project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
2022-03-10 09:08:20 -05:00
Marek Roszko 012a9bb7cb Don't forget to cache bust oce
(cherry picked from commit 25507ad6cf)
2022-03-10 02:39:42 +00:00
Marek Roszko 563aa3ed74 Avoid loading duplicate shapes due to hierarchy structure
Fix https://gitlab.com/kicad/code/kicad/-/issues/9416
Fix https://gitlab.com/kicad/code/kicad/-/issues/6107


(cherry picked from commit 2de4906d65)
2022-03-10 02:39:35 +00:00
Seth Hillbrand e8ef863861 Remove double-call of settings from Netlister
Double-calls are no longer needed when using settings.  They can
interfere depending on how the system executes the commands.

Removing keeps the last used plugin as the default, rather than the last
selected

Fixes https://gitlab.com/kicad/code/kicad/issues/11094
2022-03-09 17:12:18 -08:00
Seth Hillbrand a24cdcb3f0 Always return simplified polygons
Clipper can handle complex input polygons but we will sometimes struggle
dealing with outputs from the inflate routine that have degenerate or
overlapping points.  Calling Simplify after the inflate keeps our
polygons easier to handle

Fixes https://gitlab.com/kicad/code/kicad/issues/11036
2022-03-09 16:19:15 -08:00
Seth Hillbrand 5314ba6440 Avoid implementation dependent on events
Adding a page in the ctor can generate events that change the default
page.  Instead, we set the default after all pages have been added,
avoiding the reset

Fixes https://gitlab.com/kicad/code/kicad/issues/10910
2022-03-09 15:41:38 -08:00
Marek Roszko c465a6ebc7 Add some more reserves for string funcs
(cherry picked from commit 2df80c6473)
2022-03-09 16:45:28 +00:00
Marek Roszko 4e5038eb3e Try and reduce memory allocs when (un)escaping strings
(cherry picked from commit ca5049b6bc)
2022-03-09 16:45:02 +00:00
Jeff Young 2372359aaa Don't kill entire OpenGL cache on undo.
The comment regarding bitmaps was true for one more month in 2018, but
hasn't been true for the last 3 years, and clearing the cache is a huge
performance hit.

(cherry picked from commit d58427a519)
2022-03-09 15:06:40 +00:00
Jeff Young 5e0251c2ba Natural sorting for nets.
Fixes https://gitlab.com/kicad/code/kicad/issues/10534

(cherry picked from commit 96f9ea286e)
2022-03-09 14:37:46 +00:00
Jeff Young fd5eeceb4f Reentrancy block for symbol editor symbol properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/11060

(cherry picked from commit d3716b9956)
2022-03-09 14:35:47 +00:00
Seth Hillbrand da480aba47 Fix one more test case for arc approx 2022-03-08 12:36:08 -08:00
Seth Hillbrand 63f4f42e6a Fix testcases for arc rounding 2022-03-08 11:36:35 -08:00
Seth Hillbrand 8d246dbee0 We're not c++20 yet
Remove designated initializers
2022-03-08 11:08:41 -08:00
Seth Hillbrand 79517e44ce Fix QA for arc/arc collisions
We no longer need the arbitary offset when we are calculating collisions
based on values that are not nm off from a "round" value.

(cherry picked from commit 2200c1319d)
2022-03-08 10:37:04 -08:00
Seth Hillbrand a940607524 Adds uncertainty propagation to center point calc
Since we use center points to move back and forth for angle and
adjustments, we want to ensure that our center point is stable.

Rounding using integers introduces a 0.5 int uncertainty in each
measurement.  These are combined together multiple times to calculate
the center point, which combines the uncertainty.  Propagating the
uncertainty to the final calculation allows us to assign a range of true
values and pick the value that is most likely the correct value.

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

(cherry picked from commit ed7222b1e7)
2022-03-08 10:34:41 -08:00
Seth Hillbrand 0cf1a67e29 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

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

(cherry picked from commit cd7141fd10)
2022-03-08 10:33:49 -08:00
Seth Hillbrand f4cdb97141 Normalize IsInsideCourtyard
(cherry picked from commit c18d9b9baf)
2022-03-08 10:07:59 -08:00
Seth Hillbrand 0cfa88ca9a Move temp save files to temporary directory
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.

wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails

Fixes https://gitlab.com/kicad/code/kicad/issues/10747
2022-03-08 10:05:04 -08:00
Mike Williams 2535237c31 Schematic: breaking wire needs different drag parameters
Our heuristics for determining when to append to the undo aren't
sufficient for the two segments of a broken wire. One is new and the
other is changed, but the drag should be appended to the current undo.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10865
2022-03-08 18:00:46 +00:00
Marco Ciampa 4c86a5ce64 Updated Italian translation 2022-03-08 16:04:39 +01:00
jean-pierre charras c75c7d084a plot_board_layers.cpp: Add missing layers (USer_x) in list
Fixes #11072
https://gitlab.com/kicad/code/kicad/issues/11072
2022-03-08 14:44:53 +01:00
jean-pierre charras dd154c155f pcbnew: Fix Bezier "Add Primitive" in Pad Creation Dialog (From master branch) 2022-03-08 14:44:05 +01:00
Seth Hillbrand 0838543745 Fix cherry-pick error 2022-03-07 19:53:01 -08:00
Seth Hillbrand bd1f01f7ee Update Translations 2022-03-07 16:52:14 -08:00
Henrik Kauhanen 8ab1d91f3c Translated using Weblate (Swedish)
Currently translated at 99.5% (7178 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-03-08 01:49:49 +01:00
Konstantin Baranovskiy 35a7490342 Translated using Weblate (Russian)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-03-08 01:49:49 +01:00
Henrik Kauhanen d0314aab88 Translated using Weblate (Finnish)
Currently translated at 87.3% (6296 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-03-08 01:49:49 +01:00
Ulices 812aba6065 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-03-08 01:49:49 +01:00
Mark Hämmerling 6abcfeeb0f Translated using Weblate (German)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-08 01:49:49 +01:00
Radek K 703b18519f Translated using Weblate (Czech)
Currently translated at 91.4% (6594 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-03-08 01:49:48 +01:00
Arnau Llovet Vidal 1199af0d52 Translated using Weblate (Catalan)
Currently translated at 65.2% (4706 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-08 01:49:48 +01:00
taotieren 2f1ebebba3 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.5% (7179 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-03-08 01:49:48 +01:00
taotieren 19f4852280 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7209 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-08 01:49:48 +01:00
Tian Yunhao 0be07689a7 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7209 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-03-08 01:49:48 +01:00
lê văn lập f227ccfd5d Translated using Weblate (Vietnamese)
Currently translated at 18.2% (1315 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/vi/
2022-03-08 01:49:48 +01:00
ZbeeGin fd9804a3dc Translated using Weblate (Polish)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-03-08 01:49:48 +01:00
김랑기 502f2dab11 Translated using Weblate (Korean)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-03-08 01:49:48 +01:00
Mark Hämmerling 8e46ae5ce8 Translated using Weblate (German)
Currently translated at 100.0% (7210 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-03-08 01:49:48 +01:00
Jan Straka 8a863cdf54 Translated using Weblate (Czech)
Currently translated at 91.4% (6590 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-03-08 01:49:48 +01:00
Arnau Llovet Vidal 493e733f0c Translated using Weblate (Catalan)
Currently translated at 64.9% (4685 of 7210 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-03-08 01:49:48 +01:00
Seth Hillbrand 38ac1b2f2d Fix the order of evaluation in the arc printing
MapAngles will adjust by small amounts the angles t1 and t2.  This
adjustment will determine the CW/CCW drawing.  Therefore, the MapAngles
needs to be called explicitly before the Normalize180() call.
Left-to-Right evaluation is not a given for MSVC

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

(cherry picked from commit c9fb95b888)
2022-03-07 16:48:09 -08:00
Jon Evans 1394509734 Settings: allow multiple project access from Python standalone
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
2022-03-05 12:50:45 -05:00
Jeff Young 1ffe0da204 Improvements for pads/vias in zones which knockout other zones.
1) Drop tiny islands which might cause connection problems.
2) Cleanup some dead code in filler
3) Don't estabilish a connection to an island that is fully covered
by whatever its connecting to.

Fixes https://gitlab.com/kicad/code/kicad/issues/11036
2022-03-05 15:40:30 +00:00
Jeff Young 46d423a164 Must clear arcs before calling Clipper. 2022-03-05 15:40:30 +00:00
Seth Hillbrand 7aebc4b11f Change connectivity item group from set to vector
Reserve space for new items to speed construction of connectivity graph

Fixes https://gitlab.com/kicad/code/kicad/issues/10974
2022-03-05 13:14:52 +00:00
Seth Hillbrand c1dcfdffb1 Remove unneeded condition to rotate
The condition that the board must have elements on it before allowing
the rotate command is invalid as we allow rotating new elements before
placement

Fixes https://gitlab.com/kicad/code/kicad/issues/10581
2022-03-03 15:44:50 -08:00
Jeff Young 191558e2d7 Reimplementation of 513486b0ec.
(For https://gitlab.com/kicad/code/kicad/-/issues/11020.)
2022-03-03 23:29:22 +00:00
Jeff Young 912c2eac09 Make LIB_ITEM::COMPARE_FLAGS really a flags field, and add ERC.
Before they were 1/2 treated as flags and 1/2 treated as a mode enum.

The ERC flag relaxes constraints on data that is settable in the
schematic editor.

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

(cherry picked from commit 76535d8572)
2022-03-03 23:29:22 +00:00
Seth Hillbrand 802d20c409 Duplicate from selected or current
When double-clicking to open a symbol, it is no longer selected in the
tree.  We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command

Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-03-03 15:20:30 -08:00
Seth Hillbrand 8f75841c85 Check for additional connections between tracks
Prevents removal when a track is connected not just to other tracks but
also other connected items

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

(cherry picked from commit 9d927f3135)
2022-03-03 13:08:37 -08:00
jean-pierre charras c3f8d8b5a1 FP_TEXT::ViewGetLOD() fix incorrect test (LAYER_MOD_VALUES color has no matter)
Fixes #11026
https://gitlab.com/kicad/code/kicad/issues/11026
Fixes #11028
2022-03-03 11:59:03 +01:00
Seth Hillbrand 79b6991d7b Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)
2022-03-02 16:32:04 -08:00
Seth Hillbrand 17dc324e85 Explicitly give unit values
Removes the ability to hide symbol units in file formats.  This was
mostly the case for a while but there remained corner cases where we
left a default/hidden option

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

(cherry picked from commit 8c36ba3653)
2022-03-02 16:04:03 -08:00
Seth Hillbrand 23479821e3 Fix issue with 9396735733
Need to select unconditionally target layer if not on copper
2022-03-02 10:46:59 -08:00
Seth Hillbrand 9396735733 Select the copper layer before processing
If we are converting to tracks, the copper layer needs to be selected
before any other elements are processed, otherwise, we end up with the
default undefined layer

Fixes https://gitlab.com/kicad/code/kicad/issues/11025
2022-03-02 10:17:16 -08:00
Seth Hillbrand 901c330478 Update end item before moving on track/via change
The move even dereferences m_enditem for logging and perhaps other
actions.  We need to ensure that the end item has not been invalidated
before taking this action

Fixes https://gitlab.com/kicad/code/kicad/issues/10732
2022-03-02 09:21:52 -08:00
Jeff Young 354c320329 Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 15:26:02 +00:00
Jeff Young 0ea559e3b8 Reconcile two different printing bug fixes.
https://gitlab.com/kicad/code/kicad/-/commit/a9f092b3706d65ddcf1ecfb34ef1559877524862
https://gitlab.com/kicad/code/kicad/-/commit/6f5cb1f97d95ad893744cdcb47115ca0fb1db438

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

(cherry picked from commit c4143b0ff6)
2022-03-02 12:07:43 +00:00
Jeff Young 6fd898d1b3 Be more careful about non-visible elements in fields autoplacer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10774

(cherry picked from commit f241617478)
2022-03-02 12:07:43 +00:00
Jeff Young d20c2fe5c5 High-contrast mode: don't render vias that don't cross high-contrast layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/8740

(cherry picked from commit bbfbfc2cd2)
2022-03-02 12:07:43 +00:00
Jeff Young 3585c184cc Pull bug fixes back from master.
Fixes https://gitlab.com/kicad/code/kicad/issues/11007
2022-03-02 12:07:43 +00:00
Seth Hillbrand 429544c188 Handle locally-coded file names for sheets
Windows can accidentally create forward slash-coded files.  This simply
converts them to the proper unix-coded value when set

Fixes https://gitlab.com/kicad/code/kicad/issues/10964
2022-03-01 17:21:16 -08:00
Seth Hillbrand 8385ce3021 Ensure fields are properly ordered
When reading sheet fields, we need to maintain a consistent order for
the mandatory fields as they are dereferenced by place.  We force this
during the `SetFields()` call.
2022-03-01 17:08:54 -08:00
Seth Hillbrand 0b98acfe12 Freeze TEDIT in place
Avoids updating the TEDIT field, preventing merge conflicts and unneeded
VCS cruft
2022-03-01 15:53:07 -08:00
Seth Hillbrand acb5ce7108 Resolve text when requested
Getting resolved text for a symbol should always happen, even if we have
unresolved data in the instances

Fixes https://gitlab.com/kicad/code/kicad/issues/11003
2022-03-01 15:10:41 -08:00
Seth Hillbrand 63b06af6b1 Avoid resolving text vars without screen
We need to keep the screen blank while initially loading a sheet before
the hierarchy is developed.  Avoid resolving text variables during this
process

Fixes https://gitlab.com/kicad/code/kicad/issues/11000
2022-02-28 12:27:38 -08:00
jean-pierre charras e5a85b107f Gerber plotter: fix broken plot of SHAPE_LINE_CHAIN with arcs.
Also simplify SHAPE_T::POLY plot.
From Master branch.
2022-02-28 18:26:26 +01:00
jean-pierre charras e2982a0e47 svg importer: fix a crash when importing some files with no graphic item 2022-02-28 18:26:24 +01:00
Jeff Young 5396bb970f Don't rename archives when doing a project save-as.
Fixes https://gitlab.com/kicad/code/kicad/issues/10184
2022-02-27 20:15:27 +00:00
Jeff Young d4937f1b3e Don't allow break commands (or labelling cmds) on multiple wire selections.
Fixes https://gitlab.com/kicad/code/kicad/issues/10934
2022-02-27 20:14:56 +00:00
Jeff Young 1c6f3f8f0d Drop a knee between tracks to a single item when dragging.
This prevents the disambiguation menu from coming up when we don't
really care which element we start the drag on.

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

(cherry picked from commit ae85f57577)
2022-02-27 18:20:25 +00:00
Jeff Young 6341548939 Infobar warning if symbol loading was cancelled.
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).

Also makes sure that any cancel in the preLoad step is honoured in the
sync step.  (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)

Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.

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

(cherry picked from commit 1f16092e29)
2022-02-27 18:20:25 +00:00
jean-pierre charras a91dd68444 FP editor: fix crash when trying to export a footprint to the board editor.
From Master branch.
2022-02-27 08:41:36 +01:00
Jeff Young a8175f49a6 Repair tab order in Footprint Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10978

(cherry picked from commit 2c6a2c3479)
2022-02-26 17:42:02 +00:00
jean-pierre charras 05110b7bdc DIALOG_BOARD_STATISTICS: Reset the drill count list before recalculations.
Fixes #10984
https://gitlab.com/kicad/code/kicad/issues/10984
2022-02-26 17:11:45 +01:00
jean-pierre charras aadcc43dbb APPEARANCE_CONTROLS: fix missing update when toggling a layer view.
Fixes #10977
https://gitlab.com/kicad/code/kicad/issues/10977
2022-02-26 10:40:47 +01:00
Seth Hillbrand ff6f398607 Handle list double-click without shortcuts
The LIST_DCLICK event can be fired by spacebar or enter in GTK.  This
conflicts with using the spacebar to reset local coordinates.  Instead,
we capture the double-click event manually to add the footprint to the
board

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

Fixes https://gitlab.com/kicad/code/kicad/issues/10633
2022-02-25 16:53:03 -08:00
Seth Hillbrand a30ad0b54a Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

Fixes https://gitlab.com/kicad/code/kicad/issues/9712
2022-02-25 16:15:56 -08:00
Steffen Mauch ab835937a7 Fixing Eagle refs that do not work with KiCad
KiCad has stricter requirements for what consititutes an annotated
symbol.  This checks for and corrects annotations that begin with '#',
do not begin with a non-numeric character or do not end with a number

(cherry picked from commit 78620347c8)

Fixes https://gitlab.com/kicad/code/kicad/issues/10760
2022-02-25 15:45:30 -08:00
Jeff Young b17eb3a584 Connectivity rebuild must be done after commit push.
Fixes https://gitlab.com/kicad/code/kicad/issues/10608
2022-02-25 23:15:44 +00:00
Jeff Young 9c2bc98fd3 On-the-fly translations for Grid and Zoom menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/10961

(cherry picked from commit 107067ad05)
2022-02-25 22:02:51 +00:00
Jeff Young 96bd27ef0f Initial focus for Get and Place Footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/10230

(cherry picked from commit 714c65275c)
2022-02-25 22:02:43 +00:00
Seth Hillbrand 23351b2046 Add MRU to image placement tools
(cherry picked from commit faa3829ad4)
2022-02-25 13:21:25 -08:00
Seth Hillbrand 69bd4218f7 Update Translations 2022-02-25 11:59:49 -08:00
Benedikt Freisen f27f001fcb Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-25 20:58:02 +01:00
Axel Henriksson be772ecd18 Translated using Weblate (Swedish)
Currently translated at 99.5% (7175 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-25 20:58:01 +01:00
Henrik Kauhanen 48ba236851 Translated using Weblate (Swedish)
Currently translated at 99.5% (7175 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-25 20:58:01 +01:00
Arnau Llovet Vidal 5120566c77 Translated using Weblate (Catalan)
Currently translated at 64.8% (4678 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-25 20:58:01 +01:00
Jakub Janek 7789857e30 Translated using Weblate (Slovak)
Currently translated at 75.3% (5430 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sk/
2022-02-25 20:58:01 +01:00
ZbeeGin 89d85800ab Translated using Weblate (Polish)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-02-25 20:58:01 +01:00
Jan Straka 43dcf09747 Translated using Weblate (Czech)
Currently translated at 91.0% (6567 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-02-25 20:58:01 +01:00
Eric a372594dea Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (7210 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-25 20:58:01 +01:00
Henrik Kauhanen 414e6dc43e Translated using Weblate (Swedish)
Currently translated at 99.0% (7145 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-25 20:58:01 +01:00
Wellington Terumi Uemura f34d146c38 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-02-25 20:58:01 +01:00
Mark Hämmerling d9f5d1d865 Translated using Weblate (German)
Currently translated at 100.0% (7211 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-25 20:58:01 +01:00
Arnau Llovet Vidal b15d6bd10a Translated using Weblate (Catalan)
Currently translated at 61.3% (4421 of 7211 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-25 20:58:01 +01:00
Seth Hillbrand 54f621c570 Use board polygon instead of bbox for size
Board BBox uses the visible size of the board, which includes edge cut
thickness.  This is not appropriate for the Board characteristics.
Using the outline polygon gives accurate results and falls back to a
bounding box in the case where the outline is invalid

Fixes https://gitlab.com/kicad/code/kicad/issues/10972
2022-02-25 11:13:01 -08:00
Seth Hillbrand d29d981784 Avoid overflow in textbox
Count() returns unsigned values.  Since, we subtract 1 from this value,
if the count is 0, we will underflow the unsigned value, creating an
extremely large value that we multiply by the interline spacing.
2022-02-25 11:11:29 -08:00
jean-pierre charras 3801a8adc0 Eeschema: ensure ERC exclusions list is up to date before saving it in *.kicad_pro
Fixes #10339
From master branch
2022-02-25 18:26:48 +01:00
Mike Williams 7d4cb91f39 Schematic: disallow center rotation, allow both endpoint rotations
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.

We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
2022-02-25 16:27:55 +00:00
jean-pierre charras 0f497d1b7a Fix incorrect conversion from lines to rect in fp editor.
Fixes #10965
https://gitlab.com/kicad/code/kicad/issues/10965
2022-02-25 13:50:57 +01:00
Jeff Young 5f1976f341 fixup! Better DRC checking when placing vias. 2022-02-25 10:40:05 +00:00
Jeff Young 6036331b25 Debounce layer visibility buttons and fix issues with FP Editor.
(cherry picked from commit cb16ad7557)
2022-02-25 10:40:05 +00:00
Jeff Young 5129143bcb Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953

(cherry picked from commit 5c54f40eae)
2022-02-25 10:40:05 +00:00
Jeff Young d7d31e4b76 Implement multi-layer stitching via logic.
(cherry picked from commit d65f9ad2d8)
2022-02-25 10:40:05 +00:00
Jeff Young b00f855c26 Better DRC checking when placing vias.
(cherry picked from commit 369f53bb19)
2022-02-25 10:40:05 +00:00
Jeff Young 4b0177c8fe Handle hidden layers in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10946

(cherry picked from commit 08df5c0b01)
2022-02-25 10:40:05 +00:00
Jeff Young b11ec85706 Copy Pad_Master when copying BOARD_DESIGN_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/10932

(cherry picked from commit d2069e1548)
2022-02-25 10:40:05 +00:00
Seth Hillbrand de48f41184 Fix wxT commit
Fixes https://gitlab.com/kicad/code/kicad/issues/10967
2022-02-24 17:00:10 -08:00
Greg Davill 55bdef9bd2 action_plugin: Remove duplicated entry in UndoList
(cherry picked from commit 429c311ec3)
2022-02-24 14:46:13 -08:00
Jeff Young 5cc2bef954 Formatting. 2022-02-22 13:48:20 +00:00
aris-kimi 8ce9f08268 Update year
Fixes https://gitlab.com/kicad/code/kicad/issues/10842
2022-02-21 22:21:31 +00:00
Jeff Young 6ccaf5e27d Flip all layers of a zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/10621
2022-02-21 22:02:19 +00:00
Jeff Young a24912d01d A bit of safety. 2022-02-21 22:02:19 +00:00
Marek Roszko 8ad0f24031 Simplify locale data path setting... 2022-02-21 13:13:37 -05:00
Jeff Young 2498655cc5 Respect ERROR_OUTSIDE when inflating polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/10896

(cherry picked from commit e6c617b74d)
2022-02-21 17:32:25 +00:00
Marek Roszko b2ac4b2c65 Simplify KICAD6_TEMPLATE_DIR default
The search_stack method is bugland

Fix https://gitlab.com/kicad/code/kicad/-/issues/10119


(cherry picked from commit ad251b7b8c)
2022-02-21 17:23:07 +00:00
Mike Williams 899c2d9080 Schematic: handle switching h/v mode better while drawing lines
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10859
(cherry picked from commit e35c3f2b99)
2022-02-21 12:06:12 -05:00
Jeff Young b4ac59d9d3 Don't crash on highight net during drag.
Fixes https://gitlab.com/kicad/code/kicad/issues/10866
2022-02-21 12:25:55 +00:00
Jeff Young a5305aa235 A more discerning un-flashed-connectivity test.
(cherry picked from commit aa2c8e9b0c)
2022-02-21 11:20:48 +00:00
Tomasz Wlostowski 680163f8a8 Cherry-pick commits from Master and about SVG import:
*Fixes in the SVG import polygon postprocessing:
- don't drop subsequent polys when a non-filled primitive is imported 'in between'
- fix missing holes (also related to the interleaving of stroke and filled shapes, depending on the software that wrote the SVG file)

*GRAPHICS_IMPORTER_BUFFER: forgot to store the indices of the paths belonging to a compound shape

*pcbnew: GRAPHICS_IMPORTER can now recognize multi-path shapes (and postprocess polygons with holes into Kicad-compatible fractured polysets)

*SHAPE_POLY_SET: polysets can now be built from a bunch of arbitraily ordered oriented outlines.
Used by the SVG hole support

*SVG_IMPORT_PLUGIN: enable postprocessing of polygons with degeneracy and holes

*pcbnew: SVG importer support for even-odd fill rule
2022-02-21 10:50:05 +01:00
Marek Roszko 0fdd1df208 Update Copyright on win32 manifests
(cherry picked from commit 46d719ed42)
2022-02-21 03:22:16 +00:00
Marek Roszko 9367b7f309 Fix double parsing solids from step models resulting in triangle z-fighting
Fix https://gitlab.com/kicad/code/kicad/-/issues/9416
Fix https://gitlab.com/kicad/code/kicad/-/issues/9835
Fix https://gitlab.com/kicad/code/kicad/-/issues/10554


(cherry picked from commit b438810b6b)
2022-02-20 23:52:29 +00:00
Jeff Young f8d15a641a Use only a physical connection to determine flashing of pads.
Checking for proper nets just confuses things when the nets are set
wrongly for some reason.  This way we generate clearer DRC errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/10645
2022-02-20 20:52:39 +00:00
Jeff Young d56e488f2d Remove unnecessary validations.
Not sure if this will fix the bug or not as I can't reproduce it, but
I'd say odds are pretty good.

Fixes https://gitlab.com/kicad/code/kicad/issues/10467
2022-02-20 20:52:39 +00:00
Jeff Young cf9fafaba5 EEschema features need to process ~ for empty string; not EDA_TEXT.
Fixes https://gitlab.com/kicad/code/kicad/issues/10918
2022-02-20 20:52:39 +00:00
jean-pierre charras d5ca09dffc Optimize DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS: a time consuming call (OnModify())
was made for each item change.
It is now made only once.
Fixes #10905
https://gitlab.com/kicad/code/kicad/issues/10905
2022-02-20 20:12:36 +01:00
Jeff Young b24f51908b Fix nullptr error (no router tool in footprint editor).
(cherry picked from commit df3291c59d)
2022-02-20 16:57:54 +00:00
Jeff Young 15fd0aa989 Disable grid when ctrl/cmd key is down.
Fixes https://gitlab.com/kicad/code/kicad/issues/9995
2022-02-20 16:10:53 +00:00
Jeff Young 246b6fcdd6 Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 13:54:01 +00:00
Jeff Young 2b7c79541b While flags are in prefs, actual clearance values are in board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/10852

(cherry picked from commit 7ddd3137a3)
2022-02-20 01:03:08 +00:00
Jeff Young 7f40cac4b0 Fix collapsing name column in Net Inspector.
(cherry picked from commit 4966e2ebc2)
2022-02-20 01:03:08 +00:00
Jeff Young 7978c8c291 Allow Rule Areas on all physical layers.
Required to do things like modify silk_clearance rules.

(cherry picked from commit 8f670552a6)
2022-02-20 01:03:08 +00:00
Jeff Young fc6ec23ac1 On-the-fly language updating for appearance panel & selection filter.
Fixes https://gitlab.com/kicad/code/kicad/issues/10040

(cherry picked from commit 6ce63d66e8)
2022-02-20 01:03:08 +00:00
Jeff Young 02ec87b036 Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209

(cherry picked from commit 85805b95ba)
2022-02-20 01:03:08 +00:00
Jeff Young da82ba00e4 Resolve text variables before attempting to open datasheet.
(cherry picked from commit 510dc28a5c)
2022-02-20 01:03:08 +00:00
Jeff Young b041a77cfa Don't paste into hidden columns.
Fixes https://gitlab.com/kicad/code/kicad/issues/10168

(cherry picked from commit c27ec5cae1)
2022-02-20 01:03:08 +00:00
Jeff Young 9fcd4113b0 Fix crash bug when adding rows to pin table and then pasting to unit.
(cherry picked from commit 8a22dab83d)
2022-02-20 01:03:08 +00:00
Jeff Young 762258203c Add zone margin when subtracting other graphics and zones.
It was already added for pads and tracks, but not the other objects.

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

(cherry picked from commit 81bed9ab96)
2022-02-20 01:03:08 +00:00
Seth Hillbrand 75a4036e45 Trim wires based on how many pins they intersect
If a wire intersects more than 2 pins from the same symbol, we don't
trim connections.  If the wire intersects exactly two pins from a single
symbol, we remove the wire between the pins.

We avoided doing this before because we didn't have a good metric for
trimming vs. not.  But the per-symbol calculation feels like the least
surprising option.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1857
2022-02-19 16:54:19 -08:00
Seth Hillbrand f0d7a09af9 Remove broken call to normalize outlines
We should never be editing the user's outlines for them.  This creates
broken zones that are hard to repair.  In this case, there was also a
secondary zone with no outline that would crash the system

Fixes https://gitlab.com/kicad/code/kicad/issues/10904
2022-02-18 09:30:26 -08:00
jean-pierre charras 7be3a6b3c5 pcbnew: fix incorrect calculation of the board thickness from board stackup.
dielectric sub layers were not taken in account.
Fixes #10899
https://gitlab.com/kicad/code/kicad/issues/10899
2022-02-18 18:10:49 +01:00
jean-pierre charras 08bc14ccf2 Gerbview: fix missing handling of ID_GRID_SETTINGS event.
Fixes #10885
https://gitlab.com/kicad/code/kicad/issues/10885
2022-02-18 12:30:44 +01:00
Marco Ciampa 5781cb0ce5 Updated Italian translation 2022-02-18 12:05:13 +01:00
Seth Hillbrand ed2148d634 Prevent merging tracks across pads
When merging co-linear tracks, we should maintain the existing break if
it exists on pads, vias and other connection points

(cherry picked from commit 3a29d94c0a)
2022-02-17 19:44:33 -08:00
Seth Hillbrand 8e9d44942f Maintain connectivity while cleaning tracks/vias
When merging segments that loop back on each other, we need to merge
them in such a way to to keep the resulting endpoints connected to the
original adjoining endpoints

Fixes https://gitlab.com/kicad/code/kicad/issues/10780
2022-02-17 15:24:23 -08:00
qu1ck 8b1f1c0296 Fix double loading plugins and sys.path entires multiplying
(cherry picked from commit b53b68c686)
2022-02-17 10:59:52 -08:00
Tomasz Wlostowski 4eb9440a42 router: include arc approximation tollerance in arc hull clearance calculation
fixes: https://gitlab.com/kicad/code/kicad/-/issues/10470
(cherry picked from commit ce28525172)
2022-02-17 09:22:19 -08:00
jean-pierre charras 7cf7270738 GERBER_JOBFILE_WRITER: allows all *_User layers to be listed in *gbrjob file. 2022-02-17 15:35:49 +01:00
Jeff Young 9c48707c88 For Coverity. 2022-02-17 14:30:47 +00:00
Jeff Young ff21a16f7d Formatting. 2022-02-17 14:30:47 +00:00
Jeff Young 3b072ca8b4 Sync all fields between units when symbol is edited.
Fixes https://gitlab.com/kicad/code/kicad/issues/10610

(cherry picked from commit d60ed70d54)
2022-02-17 14:30:47 +00:00
Jeff Young e56355fc17 Update alt pin assignments in other units.
Fixes https://gitlab.com/kicad/code/kicad/issues/10849

(cherry picked from commit e499793147)
2022-02-17 14:30:47 +00:00
Jeff Young cfae33e7a8 Fix Mac button-text grid control spacing.
(cherry picked from commit 9fb3032c77)
2022-02-17 14:30:47 +00:00
Wayne Stambaugh c6c4f9ae4b Eeschema: fix broken symbol library rescue.
Apparently at some point during V5 development, symbol cache library names
were saved by replacing the LIB_ID separator character ':' with '_'.  This
caused the cache look up to fail there by skipping the symbol rescue which
could result in broken schematics.

I have no idea where this happened during V5 development.  The video demo
in the HEAD of the 5.1 branch shows the issue.  All of the other demo cache
libraries are correct.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10488
2022-02-17 09:09:19 -05:00
Mikolaj Wielgus 46f7223dd9 Fix sizing of the two last columns in drill statistics table 2022-02-17 14:16:31 +01:00
Mikolaj Wielgus 75bba51b0b Fix board statistics drill grid column sizing
And remove the horizontal scrollbar.
2022-02-17 14:16:31 +01:00
jean-pierre charras 34ed850a23 GERBER_JOBFILE_WRITER: fix missing handling of User_1 to User_9 user layers.
Fixes #10878
https://gitlab.com/kicad/code/kicad/issues/10878
2022-02-17 11:48:40 +01:00
Seth Hillbrand 266ee381d5 Update Translations 2022-02-16 17:23:19 -08:00
Henrik Kauhanen 15a44d75fb Translated using Weblate (Swedish)
Currently translated at 99.0% (7145 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-17 02:22:39 +01:00
Mustafa Selçuk ÇAVDAR f93304b144 Translated using Weblate (Turkish)
Currently translated at 43.3% (3126 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-17 02:22:39 +01:00
Henrik Kauhanen 5fe583e195 Translated using Weblate (Swedish)
Currently translated at 99.0% (7145 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-17 02:22:39 +01:00
Mark Hämmerling 9153fcd04a Translated using Weblate (German)
Currently translated at 99.9% (7209 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-17 02:22:39 +01:00
Henrik Kauhanen 0f5219ad92 Translated using Weblate (Swedish)
Currently translated at 99.0% (7145 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-17 02:22:39 +01:00
Eric 5b90195dfa Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7212 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-17 02:22:38 +01:00
Henrik Kauhanen 28c6ac53b7 Translated using Weblate (Swedish)
Currently translated at 99.0% (7145 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-17 02:22:38 +01:00
Wellington Terumi Uemura 79e8c8df67 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7212 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-02-17 02:22:38 +01:00
Tokita, Hiroshi f02722b7a7 Translated using Weblate (Japanese)
Currently translated at 99.8% (7200 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-02-17 02:22:38 +01:00
Henrik Kauhanen 34e116c18b Translated using Weblate (Finnish)
Currently translated at 87.3% (6298 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-02-17 02:22:38 +01:00
Ulices 1a5e00254d Translated using Weblate (Spanish (Mexico))
Currently translated at 99.5% (7182 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-02-17 02:22:38 +01:00
Henrik Kauhanen f36a0eeb95 Translated using Weblate (German)
Currently translated at 99.8% (7202 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-17 02:22:38 +01:00
Mark Hämmerling f8b3f5b02f Translated using Weblate (German)
Currently translated at 99.8% (7202 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-17 02:22:38 +01:00
Jan Straka dca9df1908 Translated using Weblate (Czech)
Currently translated at 90.6% (6536 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-02-17 02:22:38 +01:00
Arnau Llovet Vidal f2e1b8cc7a Translated using Weblate (Catalan)
Currently translated at 61.1% (4410 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-17 02:22:38 +01:00
ZbeeGin 9c4eab9677 Translated using Weblate (Polish)
Currently translated at 99.9% (7209 of 7212 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-02-17 02:22:38 +01:00
Seth Hillbrand 470d7d228d Fix wxT overzealous replacements
A couple of regex mistakes slipped through and need to be reverted here
2022-02-16 17:21:49 -08:00
Jeff Young 71eefc8322 Don't force user to be overly pedantic when writing diffpair rules.
(cherry picked from commit fe7e72538e)
2022-02-15 20:57:45 +00:00
jean-pierre charras ef96ee4a99 French translation update. 2022-02-15 10:20:56 +01:00
jean-pierre charras 35968dfe18 DIALOG_PLOT: use a short living quasimodal dialog instead of a long living window.
In this case, a quasimodal dialog is the right way.
From master branch, commit 43f5a7c74
2022-02-15 09:24:16 +01:00
Seth Hillbrand b3965c014c Update Translations 2022-02-14 09:20:24 -08:00
Eric c3cc615f37 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-14 18:19:04 +01:00
Mustafa Selçuk ÇAVDAR bc232a7b6b Translated using Weblate (Turkish)
Currently translated at 43.1% (3099 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-14 18:19:04 +01:00
Henrik Kauhanen 880098d659 Translated using Weblate (Swedish)
Currently translated at 99.5% (7153 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-14 18:19:04 +01:00
Krzysztof Kawa 1640c27cd2 Translated using Weblate (Polish)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-02-14 18:19:04 +01:00
ZbeeGin 96fc0feb4d Translated using Weblate (Polish)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-02-14 18:19:04 +01:00
김랑기 fdae390c52 Translated using Weblate (Korean)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-02-14 18:19:04 +01:00
Henrik Kauhanen 2cb5643556 Translated using Weblate (Finnish)
Currently translated at 87.8% (6313 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-02-14 18:19:04 +01:00
Ulices d689d1a866 Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-02-14 18:19:04 +01:00
Jan Straka 76c690c819 Translated using Weblate (Czech)
Currently translated at 90.5% (6509 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-02-14 18:19:04 +01:00
Arnau Llovet Vidal 3c601180c2 Translated using Weblate (Catalan)
Currently translated at 61.0% (4390 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-14 18:19:03 +01:00
Mark Hämmerling 3c83040c4b Translated using Weblate (German)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-14 18:19:03 +01:00
Seth Hillbrand 6147e997ff Format string for translation 2022-02-14 09:17:53 -08:00
Seth Hillbrand e88bef0023 Fix PCM strings 2022-02-14 09:17:53 -08:00
jean-pierre charras 54a3ca06c0 Pcbnew, DIALOG_GRAPHIC_ITEM_PROPERTIES: fix incorrect test for arcs.
It was due to mixing decidegrees and degrees, and seen for 180 deg arcs
Fixes #10841
https://gitlab.com/kicad/code/kicad/issues/10841
2022-02-14 09:46:57 +01:00
jean-pierre charras 0cb82a0985 Import netlist: fix issues: do not read netlist before it is selected.
Now the netlist must be explicitly selected and read instead of beeing
read during dialog creation.
It also avoid a useless netlist read when closing the dialog or trying
to change the netlist filename.

From master branch
2022-02-14 08:37:53 +01:00
Roberto Fernandez Bautista b7f8f95725 Don't lock OpenGL context twice
Use GAL_DRAWING_CONTEXT as this unlocks the context in its destructor,
so that when an exception is thrown inside the `try` block, it should
automatically unlock before we switch backend.

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

(cherry picked from commit 1b6fe615e5)
2022-02-13 21:10:48 +00:00
Graham Keeth 30276fb5f7 update custom rule syntax help to make diff pair rule examples clearer
(cherry picked from commit 4442f76add)
2022-02-13 20:15:47 +00:00
Jeff Young f37531ed39 Fix repaints getting done after the wrong dialog.
(cherry picked from commit b7c9a1ad55)
2022-02-13 18:37:44 +00:00
Jeff Young fd4ac7c5df Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

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

(cherry picked from commit d5a2059c21)
2022-02-13 18:30:32 +00:00
Jeff Young b8b9f646c6 Show pin dangling symbols in Symbol Editor.
Even though we don't have connections they're a still a good visual
indication of which end of the pin is which.

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

(cherry picked from commit aedfe08bad)
2022-02-13 18:29:12 +00:00
Jeff Young f561f85ebb Move CN_VISITOR from HitTest() to Collide().
The former isn't sufficiently aware of layer differences (such as for
pads with some layers unflashed).

(cherry picked from commit 6e063247e5)
2022-02-13 18:22:18 +00:00
Jeff Young 7cba8e847d Don't use bounding box cache during insideArea.
For starters we can't rely on it having been updated, but we also
cache the entire result so there's no huge cost-savings anyway.

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

(cherry picked from commit 8dcc933fc3)
2022-02-13 18:20:31 +00:00
Jeff Young f8ac6df0cd Implement undo for Eeschema find/replace.
Fixes https://gitlab.com/kicad/code/kicad/issues/10824

(cherry picked from commit 33e57930bc)
2022-02-13 18:19:59 +00:00
Mark Roszko 310e339c39 Remove jenkins badge 2022-02-12 14:23:43 +00:00
jean-pierre charras 6b6d97e726 Gerbview: fix a long standing issue: negative objects are now correctly printed. 2022-02-12 11:57:14 +01:00
木 王 7c910c2d0b fix-npth 2022-02-12 11:56:46 +01:00
Seth Hillbrand 1b8f25235c There is one source of truth in AC
Don't store default values in two separate places.  Passes the existing
by value as the default.

Issue identified by @axemagn

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

(cherry picked from commit 3b87ab630e)
2022-02-11 13:24:31 -08:00
Wayne Stambaugh f7133168c1 Begin version 6.0.3 development. 2022-02-10 19:34:34 -05:00
Wayne Stambaugh 702e8b8915 Tag release version 6.0.2. 2022-02-10 19:29:07 -05:00
Marco Ciampa 9226144312 Typo fixed in Italian translation 2022-02-10 21:57:07 +01:00
Seth Hillbrand d937abb5b8 Fix float scaling to use single fn
Function `scaletoIU` was updated in a8c275ae5d but this missed other
conversion points that re-implemented the same routine.  This unifies
the scaling for both ReadIJCoord and ReadXYCoord to use the same routine
as calls from am_primitive

Fixes https://gitlab.com/kicad/code/kicad/issues/10800
2022-02-10 12:36:10 -08:00
Seth Hillbrand bfd5afd6c8 Fix broken wide string for Mac 2022-02-10 09:48:27 -08:00
jean-pierre charras ab878cc257 gerbview: fix incorrect render of regions defined by a 360 deg arcd (a circle)
these regions were missing.
2022-02-10 09:52:14 +01:00
Seth Hillbrand a8c275ae5d Fix relative return with nullptr condition
Previous fix for CVE munged return conditions for gerber files in some
cases.  This restores the proper order where a nullptr will return 0,0
in the relative case and the current coordinate in others

Also fixes incorrect scale factor for inches/mils conversion to mm
2022-02-09 13:09:19 -08:00
Seth Hillbrand d75329b6f1 Quote BOM executable for spaces 2022-02-09 10:53:09 -08:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Wayne Stambaugh 54f91a0221 Wide characterize libs and bitmap2component source. 2022-02-09 09:01:53 -05:00
Jeff Young 8e1e8e1492 More wxT-ification. 2022-02-09 11:14:38 +00:00
Seth Hillbrand 20ef0e54fe Widen text in pcb_calculator 2022-02-08 17:08:22 -08:00
Seth Hillbrand aa126a12f2 Widen QA strings 2022-02-08 16:22:30 -08:00
Seth Hillbrand eecb54bff2 Widen strings in cvpcb 2022-02-08 16:03:23 -08:00
Seth Hillbrand b554c4cb66 Fix a couple of PCM formatting issues
- Include files using global includes
- Use standard file format extensions
2022-02-08 15:52:51 -08:00
Seth Hillbrand b447d55900 Update kicad manager strings to wide 2022-02-08 15:52:24 -08:00
Seth Hillbrand a444addd89 Default eeschema strings to wide
Prevents stack bug on MacOS
2022-02-08 15:14:54 -08:00
Jeff Young 209d593ca0 wxT-ify utils. 2022-02-08 22:24:29 +00:00
Henrik Kauhanen 4fbb957fa3 Translated using Weblate (Swedish)
Currently translated at 99.4% (7144 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:15 +01:00
Henrik Kauhanen 8100a8940f Translated using Weblate (Finnish)
Currently translated at 87.8% (6315 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-02-08 02:49:15 +01:00
Mustafa Selçuk ÇAVDAR 485e4ddf05 Translated using Weblate (Turkish)
Currently translated at 43.0% (3095 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-08 02:49:15 +01:00
Henrik Kauhanen 4ab750e926 Translated using Weblate (Swedish)
Currently translated at 99.4% (7147 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:15 +01:00
Henrik Kauhanen a10d9628c9 Translated using Weblate (Finnish)
Currently translated at 87.8% (6311 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-02-08 02:49:15 +01:00
Arnau Llovet Vidal 5b175d6d53 Translated using Weblate (Catalan)
Currently translated at 58.4% (4202 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-08 02:49:15 +01:00
Axel Henriksson 10217f5507 Translated using Weblate (Swedish)
Currently translated at 99.4% (7147 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:15 +01:00
Henrik Kauhanen f185511698 Translated using Weblate (Swedish)
Currently translated at 99.4% (7147 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:15 +01:00
Axel Henriksson db972a708a Translated using Weblate (Swedish)
Currently translated at 99.4% (7145 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:15 +01:00
Petri Niemelä efaabfa852 Translated using Weblate (Finnish)
Currently translated at 87.7% (6303 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-02-08 02:49:15 +01:00
Mark Hämmerling 932cb82c82 Translated using Weblate (German)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-08 02:49:15 +01:00
Arnau Llovet Vidal f0d52ff2de Translated using Weblate (Catalan)
Currently translated at 56.9% (4092 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-08 02:49:14 +01:00
Henrik Kauhanen fc737ffffd Translated using Weblate (Swedish)
Currently translated at 99.4% (7145 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-08 02:49:14 +01:00
Marco Ciampa 4df36a3438 Updated Italian translation 2022-02-07 11:27:56 +01:00
Marek Roszko e72bd34383 Fix color4d distance return type
(cherry picked from commit 1f8d101b1d)
2022-02-07 02:11:55 +00:00
Seth Hillbrand 8fc831cbc2 Validate arc output when editing
Handles checking output of the arc to ensure we don't end up generating
an invalid arc.  Also keeps the limit of the arc angle to be (360,360)
excluding 0.

Fixes https://gitlab.com/kicad/code/kicad/issues/10070
2022-02-06 17:18:04 -08:00
Marek Roszko aa5b6c70a7 Ensure we close the occt document at the end of loading
(cherry picked from commit d211ef1ea3)
2022-02-06 16:18:31 +00:00
Jon Evans 7d5c1d7b5c Disable Ubuntu CI for now
Build box is going down for a time

(cherry picked from commit 41b6c9bf8f)
2022-02-06 09:13:35 -05:00
Mark Roszko f5a56c1ebc Use unique_ptr to avoid memory leak in 3d model cache loading
PVS V773
2022-02-05 20:20:45 +00:00
Jeff Young 3af606a020 Wide string decls for gerbview. 2022-02-05 19:59:29 +00:00
Marek Roszko 132358211e Fix a set of odd null on new checks PVS V668
(cherry picked from commit 1c77eb14d7)
2022-02-05 19:43:21 +00:00
Roberto Fernandez Bautista f412d8d461 CADSTAR: Fix potential nullptr dereferencing bug
Don't assume the footprint will have the pad index that the file references.
2022-02-05 19:22:05 +00:00
Marek Roszko 71bcc9883a Fix typoed test condition for TH no hole pads PVS V501
(cherry picked from commit b9f1aaf029)
2022-02-05 18:32:08 +00:00
Marek Roszko be958e3fdb Avoid potential divide by zero in footprint spreading PVS V609
(cherry picked from commit 8588bea4b2)
2022-02-05 18:31:00 +00:00
Marek Roszko b2c99dd953 Fix some leaking objects identified by PVS Studio V773
(cherry picked from commit a7ebfc31f9)
2022-02-05 18:30:24 +00:00
Wayne Stambaugh c875af48e7 Don't create new project on save as when project file already exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10625
2022-02-05 11:30:21 -05:00
Jeff Young 471c0c4c1d More wide-string declarations. 2022-02-05 13:29:00 +00:00
Jeff Young 9e5e46514d More wide-string declarations. 2022-02-05 13:29:00 +00:00
jean-pierre charras ba70f202ce Fix a compil issue. 2022-02-05 11:16:56 +01:00
Seth Hillbrand e18fc36646 wxT rework for common directory 2022-02-04 16:24:50 -08:00
Jeff Young 4657614e4f More wxString wide literals. 2022-02-04 23:12:09 +00:00
Jeff Young d295025964 Be explicit about literal wide-strings. 2022-02-04 20:21:07 +00:00
Jeff Young 2365c1e96f Add duplicated items to parent group.
Fixes https://gitlab.com/kicad/code/kicad/issues/10155

(cherry picked from commit 42917874dd)
2022-02-04 18:14:25 +00:00
Jeff Young 430c4862b6 Log an undo item when filling zones.
If we wanted to put it into the parent's undo item, then the *parent*
would need to not start a new undo record.  Not starting one in the
zone filler tries to add it to the *previous* change, not to the parent
change.

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

(cherry picked from commit 4cc1ced2f3)
2022-02-04 18:14:25 +00:00
Seth Hillbrand 4c81307391 Allow dialogs to force evaluation of UNIT_BINDER
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)

Fixes https://gitlab.com/kicad/code/kicad/issues/10752
2022-02-04 10:03:23 -08:00
jean-pierre charras 57cbe261f2 WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
2022-02-04 13:55:00 +01:00
Marek Roszko 50d3a507d0 Mark some limits as constexpr
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime


(cherry picked from commit ca7840334c)
2022-02-04 12:50:54 +00:00
Seth Hillbrand 7642a9db79 Setup selection when repeating
We need the item to be currently selected when repeating the last symbol
insert.  This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions

Fixes https://gitlab.com/kicad/code/kicad/issues/10619
2022-02-03 17:09:31 -08:00
Jeff Young 527e06d989 Fix some overly-large text spacing.
While overly-large bounding boxes mostly don't matter, they make us
knock out holes in zones that are too large.
2022-02-04 00:34:20 +00:00
Jeff Young 69b69aa431 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 00:34:20 +00:00
Jeff Young d6a86fa9e0 Don't double-count the text thickness in its polygon shape.
The stroke font already takes the thickness into account in
ComputeStringBoundaryLimits() (which is called by GetTextBox()).
2022-02-04 00:34:20 +00:00
Seth Hillbrand 0a13f15a9d Ensure we can version scripting properly
Adds Version() and FullVersion() calls to support reporting version to
scripts and scripting window

Fixes https://gitlab.com/kicad/code/kicad/issues/10079
2022-02-03 15:54:07 -08:00
Seth Hillbrand ef94f31204 Update error message to match new arc dialog
We now provide arc end points and interior angle, so we cannot check for
null radius in the same fashion.  Instead, the starpoint==endpoint
indicates a zero radius

Fixes https://gitlab.com/kicad/code/kicad/issues/10714
2022-02-03 14:31:58 -08:00
Seth Hillbrand 7601a3385f Convert strings to wide when using wxString routines
WxString does not allocate space for wide strings needed during
conversion unless the string is explicitly wide.  This can cause buffer
over/underflow

Fixes https://gitlab.com/kicad/code/kicad/issues/10605
2022-02-03 13:08:07 -08:00
Seth Hillbrand ccf2a63f45 When undoing creation of the sheet, get out first
We can't stay in a sheet that is deleted by the action of undo.  Checks
the current sheet and, if we are currently using it, ensures that the
following action is to leave the current sheet

Fixes https://gitlab.com/kicad/code/kicad/issues/10733
2022-02-03 11:19:33 -08:00
Seth Hillbrand 901685f01b Don't convert KIID on the fly
Converting to string on save prevent unneeded ops
2022-02-03 10:34:14 -08:00
Seth Hillbrand bdf235c25f Restore missing bitmaps 2022-02-03 09:23:27 -08:00
jean-pierre charras 0ffa266315 DIALOG_SPICE_MODEL: fix a cosmetic issue (no room for the help text)
Fixes #10170
https://gitlab.com/kicad/code/kicad/issues/10170

(cherry picked from commit 7c3f0612f1)
2022-02-03 15:01:04 +00:00
Jeff Young 5c94d59e75 Use natural order sorting for FP libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/10349

(cherry picked from commit a187076438)
2022-02-03 15:01:04 +00:00
Scott Candey 02f93805d0 Common: Corrects Mac OS text navigation shortcuts in Scintilla
Ctrl-A moves cursor to beginning of current line in text box.
Ctrl-E moves cursor to the end of the line.
This change makes navigation in Scintilla text boxes consistent
with other text boxes in KiCad.

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

(cherry picked from commit 23fdbe4b21)
2022-02-03 15:01:04 +00:00
Jeff Young 2e324aa845 Promote to cell selection for spreadsheet-style paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/9211

(cherry picked from commit 9de62d1dd4)
2022-02-03 15:01:04 +00:00
Jeff Young fecb625459 Resolve text variables in eeschema before passing to pcbnew.
Fixes https://gitlab.com/kicad/code/kicad/issues/10429

(cherry picked from commit 2b14b60c32)
2022-02-03 15:00:39 +00:00
Jeff Young b883eee911 Use superclass's copy c'tor from within subclass copy c'tor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10481

(cherry picked from commit 8c758aeeb5)
2022-02-03 15:00:39 +00:00
Jeff Young 01f3a14dc3 Allow more (lots more) unfold from bus menu entries.
Fixes https://gitlab.com/kicad/code/kicad/issues/10529

(cherry picked from commit 4665cdcdc5)
2022-02-03 15:00:39 +00:00
Jeff Young 2425444947 Map zone layers before checking their visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/10509

(cherry picked from commit 09d0f6e17c)
2022-02-03 15:00:39 +00:00
Jeff Young 66e12af548 Expand text vars in titleblock before exporting.
Fixes https://gitlab.com/kicad/code/kicad/issues/10197

(cherry picked from commit 407660201e)
2022-02-03 15:00:39 +00:00
Jeff Young ea38056e33 Resolve textvars in plot directory.
Fixes https://gitlab.com/kicad/code/kicad/issues/10405

(cherry picked from commit e5d5ee07f0)
2022-02-03 15:00:39 +00:00
Jeff Young c805144c08 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796

(cherry picked from commit 0036f44e37)
2022-02-03 15:00:39 +00:00
Seth Hillbrand 927afe313d Review ReadXY/ReadIJ to avoid static char arrays
Tighten up the code a bit, removing extra calls and loops.  Removes
unchecked use of stack char array

Fixes https://gitlab.com/kicad/code/kicad/issues/10719
2022-02-02 17:16:30 -08:00
Henrik Kauhanen 03f643ca42 Translated using Weblate (Swedish)
Currently translated at 98.4% (7072 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-02 22:43:15 +01:00
Axel Henriksson 945b841e1b Translated using Weblate (Swedish)
Currently translated at 98.4% (7072 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-02 22:43:15 +01:00
Arnau Llovet Vidal 6771ceb050 Translated using Weblate (Catalan)
Currently translated at 53.5% (3850 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-02 22:43:15 +01:00
Ian McInerney 61853a2d7c Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:15 +01:00
taotieren 92773335f7 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-02-02 22:43:15 +01:00
CloverGit ef58267013 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:15 +01:00
Mustafa Selçuk ÇAVDAR 35e9c57555 Translated using Weblate (Turkish)
Currently translated at 43.0% (3093 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-02 22:43:15 +01:00
Axel Henriksson 1e3b3df808 Translated using Weblate (Swedish)
Currently translated at 98.3% (7066 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-02-02 22:43:15 +01:00
Dejan Smole c062ba3044 Translated using Weblate (Slovenian)
Currently translated at 77.2% (5553 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sl/
2022-02-02 22:43:15 +01:00
Jakub Janek 44b4e6753c Translated using Weblate (Slovak)
Currently translated at 75.5% (5430 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sk/
2022-02-02 22:43:15 +01:00
dsa-t 9c22a8000e Translated using Weblate (Russian)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-02-02 22:43:15 +01:00
ZbeeGin 83729adca4 Translated using Weblate (Polish)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-02-02 22:43:14 +01:00
김랑기 2585f7e7a4 Translated using Weblate (Korean)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-02-02 22:43:14 +01:00
Tokita, Hiroshi a7d586818c Translated using Weblate (Japanese)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-02-02 22:43:14 +01:00
Mark Hämmerling 0030ddee26 Translated using Weblate (German)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-02-02 22:43:14 +01:00
Arnau Llovet Vidal 1853900389 Translated using Weblate (Catalan)
Currently translated at 53.4% (3842 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-02 22:43:14 +01:00
Eric f1a04828f7 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
Rigo Ligo c8b0a3697f Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
Tian Yunhao e8774181f8 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
taotieren b253d9085d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
taotieren 6d1351fa98 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-02-02 22:43:14 +01:00
taotieren d7eef72c29 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
Eric 84bae1f3df Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:14 +01:00
Mustafa Selçuk ÇAVDAR b5bc942758 Translated using Weblate (Turkish)
Currently translated at 23.9% (1718 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-02 22:43:14 +01:00
Wellington Terumi Uemura 86f485619a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-02-02 22:43:14 +01:00
Tokita, Hiroshi a9f832556c Translated using Weblate (Japanese)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-02-02 22:43:13 +01:00
Arnau Llovet Vidal 01aff3bf80 Translated using Weblate (Catalan)
Currently translated at 47.1% (3386 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-02 22:43:13 +01:00
Mustafa Selçuk ÇAVDAR 5ba8dcdcf1 Translated using Weblate (Turkish)
Currently translated at 12.7% (914 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-02 22:43:13 +01:00
Mustafa Selçuk ÇAVDAR c2edf23118 Translated using Weblate (Turkish)
Currently translated at 10.3% (742 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-02-02 22:43:13 +01:00
Rigo Ligo 00dd29ae8b Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-02-02 22:43:13 +01:00
Wellington Terumi Uemura 5c4389a3c4 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-02-02 22:43:13 +01:00
Arnau Llovet Vidal c81a71627f Translated using Weblate (Catalan)
Currently translated at 46.9% (3377 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-02-02 22:43:13 +01:00
Seth Hillbrand 6d84acfacd Handle invalid pads more gracefully
Pads generated outside of KiCad may have self-intersecting polygons that
simplify to multiple sets.  We handle this by adding multiple primitives
for such polygons and limiting our fracture calls to only polygons that
have holes

Fixes https://gitlab.com/kicad/code/kicad/issues/10712
2022-02-02 13:36:24 -08:00
jean-pierre charras 788c607d47 EDA_SHAPE::MakeEffectiveShapes(): protect against empty polygons.
Fixes #10713
https://gitlab.com/kicad/code/kicad/issues/10713
2022-02-02 20:48:42 +01:00
Steffen Mauch 169881dcf1 EAGLE plugin: use specified RATIO value for text size calculation
(cherry picked from commit 61b2b0ff0c)
2022-02-02 08:48:25 -08:00
Seth Hillbrand a7fbdfe918 Fix overflow vulnerability in Gerbview
Corrects an unguarded read that could lead to arbitrary code execution
in specifically crafted gerber files.

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

(cherry picked from commit 54b20cb049)
2022-02-02 08:31:15 -08:00
jean-pierre charras 3d11ce5139 export D356 netlist: fix incorrect id for pads type connectors.
these pads are similar to SMD pads and should have the same id.
Fixes #10694
https://gitlab.com/kicad/code/kicad/issues/10694
2022-02-01 08:45:02 +01:00
Seth Hillbrand 833ce19221 Be more diligent in preventing drag line errors
They can happen even when there are no collisions, so we need to reset
the 'ok' flag before using the line again.

Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-31 16:09:14 -08:00
Alex 73d0d7796c Allow overlay scrolling on GTK, except for GAL canvases.
This prevents glitches when both scrollbars
are visible and scrolling to the end.

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

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

(cherry picked from commit 4c4089e836)
2022-01-31 15:43:31 -05:00
jean-pierre charras 42dfdf8c38 PCB_CONTROL::unfilledZoneCheck(): skip rule areas: they are not filled by definition.
Fixes #10691
https://gitlab.com/kicad/code/kicad/issues/10691
2022-01-31 17:04:05 +01:00
Seth Hillbrand 70d00689ca Fully select a line for transformation
When not trying to select points, we need to ensure that the full
line is selected for transformation

Fixes https://gitlab.com/kicad/code/kicad/issues/10566
2022-01-29 17:36:54 -08:00
jean-pierre charras 26dfc4477f PCB_TARGET: add missing TransformShapeWithClearanceToPolygon() method.
From Master branch.
2022-01-29 20:07:14 +01:00
Seth Hillbrand 38a4894d92 Prevent multiple single-point line solutions
Suggested by @rivimey, we test the case where both lines return singular
point lines and prevent them leaking into our drag solution

Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-29 07:07:03 -08:00
Seth Hillbrand c2707f3cc0 Fix large memory leak in DRC
All elements get effective shapes, many of which get triangulated.  This
memory needs to be freed when destroying the tree
2022-01-28 17:07:11 -08:00
Seth Hillbrand 8753051db6 Don't count zero-length as duplicate
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points.  A null track always matched this case,
which removed the valid track.  We solve this by avoiding null tracks in
the duplicate checker.  They are removed separately in the null track
stage.

This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing

Fixes https://gitlab.com/kicad/code/kicad/issues/10624
2022-01-28 16:34:00 -08:00
Seth Hillbrand 8ae304dcca Don't allow degenerate lines in dragger
If walkaround returns an invalid line, don't consider it for a track

Fixes https://gitlab.com/kicad/code/kicad/issues/9555
2022-01-28 15:18:42 -08:00
Seth Hillbrand 796893de56 Fix negative arc angles in PCAD import 2022-01-28 10:18:17 -08:00
alexfanqi ea52101c1b Add riscv64 support for libcontext
modified to match function arguments different from upstream

Author: Andreas Schwab
(cherry picked from commit 01f0aad7c0)
2022-01-27 08:56:46 -05:00
Wayne Stambaugh ca27b38182 Fix broken environment variable substitution on Windows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10303

(cherry picked from commit 9af365b5b3)
2022-01-27 08:56:46 -05:00
jean-pierre charras 3f6a4296d9 Pcbnew, export svg: Fix incorrect saving of layer set.
From Master branch
2022-01-27 13:07:40 +01:00
jean-pierre charras 2a27899b9b French translation update.
Fixes #10588
https://gitlab.com/kicad/code/kicad/issues/10588
2022-01-25 09:38:39 +01:00
Marek Roszko 1a534ade89 Remove UpdateUI from preferences pdf viewer option
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/10590
2022-01-24 20:36:21 -05:00
Seth Hillbrand fddfce4fb1 Force a size event to avoid multiple yields
When the grid editor is shown, we also want to ensure that the grid gets
resized to account for the new editor.  Queuing the event will ensure
that happens after the editor is emplaced in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-24 15:31:45 -08:00
Wayne Stambaugh ab184ba9f3 Fix wxWidgets invalid string specifier assertion. 2022-01-24 15:44:42 -05:00
Seth Hillbrand a1615cce7e Enforce strictly weak ordering in sheets
This ensures that irreflexivity is given in sort ordering.  This may
have been triggering issues in MacOS when adding sheets

Fixes https://gitlab.com/kicad/code/kicad/issues/10557
2022-01-24 10:41:02 -08:00
Seth Hillbrand 871556ebda Allow time to update editor
On GTK, the full editor needs to be shown and, for some systems, the
editor will not show correctly.  By yielding we should allow the time to
recalculate sizes for the editor in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-24 09:55:46 -08:00
Marek Roszko 7152c4ebb8 Add extraction of patch version to feed to resource defines 2022-01-23 14:47:54 -05:00
Mark Roszko 34dafdd2c1 Try and silence the ci failure on windows 2022-01-23 19:23:43 +00:00
Seth Hillbrand f12d0cb0e2 Get all eeschema layers properly ordered
Layers not in the given order are drawn behind everyone else.  Missing
the text prevents global labels from showing properly in GAL order

Fixes https://gitlab.com/kicad/code/kicad/issues/10546
2022-01-23 10:03:03 -08:00
jean-pierre charras 029e42f8d1 DIALOG_SIM_SETTINGS: fix incorrect validation of DC souces in DC Transfer panel
From Master branch
Fixes #10568
https://gitlab.com/kicad/code/kicad/issues/10568
2022-01-23 17:01:55 +01:00
jean-pierre charras 60ae18893e PCB_POINT_EDITOR: fix missing init of PAD pos0 after changing
(From Master branch)
2022-01-22 10:43:23 +01:00
Marek Roszko e0b835fe20 Set curl to use the Windows cert store
(cherry picked from commit 3ede5f42be)
2022-01-22 03:10:11 +00:00
Steffen Mauch d6c4215a1f pcbnew: EAGLE importer does map value to wrong layer if nothing is defined in original EAGLE footprint
Fixes https://gitlab.com/kicad/code/kicad/issues/10311

(cherry picked from commit 55b782d66e)
2022-01-21 13:16:41 -08:00
Steven A. Falco 8b6a166698 Missing include file
(cherry picked from commit 042f584859)
2022-01-21 09:01:33 -08:00
jean-pierre charras e9a5e5466c SYMBOL_VIEWER_FRAME: fix refresh of the canvas after selecting a new symbol.
From Master branch
2022-01-21 17:34:51 +01:00
Jeff Young 0317185860 Don't update units for UNSCALED, PERCENT or DEGREES.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020

(cherry picked from commit 27d8df1122)
2022-01-21 15:42:48 +00:00
Jeff Young c02cadec2a Exclude rules which match no enabled layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/10227

(cherry picked from commit 0967cc82e2)
2022-01-21 15:06:18 +00:00
Jeff Young b608ebd058 Don't findnext on an empty string; show the dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10313

(cherry picked from commit 60fc75e239)
2022-01-21 15:05:27 +00:00
Jeff Young 6d7659fb20 Flip arc endpoints when mirroring in FPEditor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10550

(cherry picked from commit 7f6bc28f87)
2022-01-21 15:02:15 +00:00
Seth Hillbrand dd7029ea07 Always use the project directory for default save
Fixes https://gitlab.com/kicad/code/kicad/issues/10478
2022-01-20 11:51:16 -08:00
Seth Hillbrand 323a069738 Clear Undo list when renaming
Our undo/redo list is tied to the screen that gets cleared when we
reload the file after renaming.  We need to clear the Undo list at this
point to prevent possible crashes when moving too far back in the stack

Fixes https://gitlab.com/kicad/code/kicad/issues/10504
2022-01-20 11:28:41 -08:00
Seth Hillbrand 615eda816e Don't close filled polylines when printing
Eeschema/libedit support open, filled polylines.  When printing, this
should be drawn as a fill, followed by the polyline to avoid assumptions
about closed polygons in the graphic code

Fixes https://gitlab.com/kicad/code/kicad/issues/10537
2022-01-20 10:53:57 -08:00
Seth Hillbrand 6810479a19 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

Fixes https://gitlab.com/kicad/code/kicad/issues/10498
2022-01-20 10:09:25 -08:00
jean-pierre charras d9c6765be7 ITMAP_BASE::DrawBitmap(): fix position of the clipping area when using matrix transform.
Fixes #10525
https://gitlab.com/kicad/code/kicad/issues/10525
From Master branch
2022-01-20 16:27:18 +01:00
Seth Hillbrand 857683d372 Remove unneeded distance calc 2022-01-18 15:58:20 -08:00
jean-pierre charras 24865971af DRAWING_SHEET_PARSER: fix missing parse of "T_comment" case for DS_DATA_ITEM_BITMAP.
Fixes #10477
https://gitlab.com/kicad/code/kicad/issues/10477
From Master.
2022-01-17 18:04:26 +01:00
jean-pierre charras 10ce515aca LSET::SeqStackupBottom2Top(): add missing user layers to list of layers
These missing layers were not exported in export SVG.
From master branch
2022-01-17 11:01:11 +01:00
Wayne Stambaugh da28ade004 Footprint editor: use most recently used path on footprint import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10418

(cherry picked from commit c154e85ebd)
2022-01-16 09:48:21 -05:00
Marek Roszko f97a0fb3e9 Add a way to add a "revision" for use in windows manifests
(cherry picked from commit d4ee74a832)
2022-01-15 20:20:53 +00:00
Seth Hillbrand cccdac136f Fix transparent circle printing
DrawEllipse seems to work fine using transparent bg for all DCs except
printing (which is the only one we use now)  Use two arcs to draw a
transparent fill for the circle instead as a workaround until we
implement Cairo printing

Fixes https://gitlab.com/kicad/code/kicad/issues/10431
2022-01-14 16:13:05 -08:00
Jon Evans 2306d00c89 Do not check key states for non-key events in TryBefore
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10127
2022-01-13 22:28:45 -05:00
Jon Evans 20bbf9b179 PNS: Do not clear layer pairs when importing new sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10225
2022-01-13 20:37:37 -05:00
Jon Evans cf4d46b24d PNS: Do not allow smart pads when in 90-degree mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10386
2022-01-13 20:21:19 -05:00
qu1ck 739c14eaa2 FOOTPRINT::GetProperty() swig extension
(cherry picked from commit 33a4c9b08e)
2022-01-13 13:10:44 -08:00
Wayne Stambaugh adfbfc27af Footprint editor: fix Eagle plugin footprint library layer mapping bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10354

(cherry picked from commit a77b5649cc)
2022-01-12 20:52:55 -05:00
Wayne Stambaugh 26047615bd Fix X3D model parser.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10385

(cherry picked from commit 44e4abde0e)
2022-01-12 19:00:27 -05:00
Seth Hillbrand dcb8f29317 Handle rotated symbol rectangles in Eagle import
Fixes https://gitlab.com/kicad/code/kicad/issues/10360
2022-01-12 15:10:42 -08:00
dana 57d58fe335 Handle Unicode clipboard data in pcbnew and symbol editor
Fixes #10323

(cherry picked from commit 8373180cbb)
2022-01-12 09:23:24 -08:00
Seth Hillbrand 56d87a8613 Catch default autowire case
Since we are dereferencing the optional, we need to ensure it exists in
all cases

Fixes https://gitlab.com/kicad/code/kicad/issues/10394
2022-01-12 09:02:39 -08:00
Wayne Stambaugh 9a0323fe17 Begin version 6.0.2 development. 2022-01-11 21:22:36 -05:00
Wayne Stambaugh 0a9271f98e Tag release version 6.0.2. 2022-01-11 21:18:26 -05:00
prometheus 3c91b0c693 Translated using Weblate (Turkish)
Currently translated at 10.2% (737 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-01-12 01:42:50 +01:00
Arnau Llovet Vidal 562bd7d564 Translated using Weblate (Catalan)
Currently translated at 46.6% (3353 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ca/
2022-01-12 01:42:49 +01:00
Seth Hillbrand ad726dc6e4 Rework cd8d6ba0 for 6.0.1
Addresses https://gitlab.com/kicad/code/kicad/-/issues/10357 as well as
a few additional rounding points in 3d viewer based on master commit
2022-01-11 13:49:57 -08:00
Roberto Fernandez Bautista b2ecf097ed Include Footprints within Groups when re annotating duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10329

(cherry picked from commit de7158b80e)
2022-01-11 20:52:01 +00:00
Seth Hillbrand 8dca61ce9c Fix copy-paste error 2022-01-11 06:08:15 -08:00
Steven A. Falco e8e25fd732 Launchers must specify WM_CLASS
On some Linux desktops, we get extra icons in the application dock.
This happens because the dock doesn't know the "class" of the
application.  We need to add StartupWMClass=xxx lines, where xxx is
the name associated with the application.

This patch addresses the following issue:

https://gitlab.com/kicad/packaging/kicad-ubuntu-builder/kicad-daily-package/-/issues/30

While it was written against Ubuntu, it also affects Fedora, and
probably other Linux systems too.
2022-01-11 01:25:16 +00:00
Seth Hillbrand bd7841bf96 Handle arcs in global track width changes
Also add defensive code against invalid indices

Fixes https://gitlab.com/kicad/code/kicad/issues/10325
2022-01-10 17:19:49 -08:00
Seth Hillbrand 55020c2b89 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

Fixes https://gitlab.com/kicad/code/kicad/issues/10334
2022-01-10 13:37:47 -08:00
Seth Hillbrand a74d1d9962 Keep ratsnest setting when pasting
Paste items should copy the global ratsnest visibility setting

Fixes https://gitlab.com/kicad/code/kicad/issues/10346
2022-01-10 12:48:03 -08:00
Seth Hillbrand 4d899d7820 Remove default hotkey for toggle zone display
It is too easy to accidentally hide your zones and the 'A' hotkey is
intuitively mapped to Add Footprint, to match Add Symbol in eeschema.

This won't change current hotkey customizations but will help prevent
future user error.  Users can still map the action to a hotkey if the
new toggle is useful to their workflow
2022-01-10 11:48:26 -08:00
Seth Hillbrand 4907b90215 Fix FP circle validity check
Radius is encoded by m_endX

Fixes https://gitlab.com/kicad/code/kicad/issues/10337
2022-01-10 10:54:23 -08:00
Jan Straka a399f799ad Translated using Weblate (Czech)
Currently translated at 90.5% (6507 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-01-10 18:58:11 +01:00
Jan Straka 55cd2da432 Translated using Weblate (Czech)
Currently translated at 89.5% (6432 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-01-10 18:58:11 +01:00
obit 096600ffc4 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-01-10 18:58:11 +01:00
Axel Henriksson b4bae29c02 Translated using Weblate (Swedish)
Currently translated at 98.3% (7066 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-01-10 18:58:11 +01:00
Mark Hämmerling e4a5ce78aa Translated using Weblate (German)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-01-10 18:58:11 +01:00
Mark Hämmerling 522738284d Translated using Weblate (German)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-01-10 18:58:11 +01:00
pondahai cc0d5ec46a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hant/
2022-01-10 18:58:11 +01:00
Tian Yunhao f2018a09d8 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-01-10 18:58:11 +01:00
김랑기 54952ca97e Translated using Weblate (Korean)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-01-10 18:58:10 +01:00
Tokita, Hiroshi a8543b1122 Translated using Weblate (Japanese)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-01-10 18:58:10 +01:00
Tian Yunhao 790ca19445 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-01-10 18:58:10 +01:00
Wellington Terumi Uemura f56b3bdd07 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-01-10 18:58:10 +01:00
Rafael Silva 7d635d3d43 Translated using Weblate (Portuguese)
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt/
2022-01-10 18:58:10 +01:00
Jose Perez 37f62e539b Translated using Weblate (Spanish)
Currently translated at 99.9% (7185 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es/
2022-01-10 18:58:10 +01:00
Jan Straka 3196f4adb6 Translated using Weblate (Czech)
Currently translated at 88.9% (6395 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/cs/
2022-01-10 18:58:10 +01:00
Gökhan Koçmarlı b4d67b6b29 Translated using Weblate (Turkish)
Currently translated at 9.9% (712 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-01-10 18:58:10 +01:00
Eric f7d790598b Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7186 of 7186 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-01-10 18:58:10 +01:00
Wayne Stambaugh bbf00e0461 Pcbnew: honor footprint exclude from BOM setting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10297

(cherry picked from commit f379c49084)
2022-01-09 11:30:06 -05:00
Mikolaj Wielgus a91f807e13 Update contributor name 2022-01-09 09:29:54 +01:00
Seth Hillbrand 100cf757fe Force Mesa to use its own call
Mesa does not support adaptive swapping but will sometimes report that
it does.  This prevents Mesa drivers from testing (and segfaulting) the
limits of their call

Fixes https://gitlab.com/kicad/code/kicad/issues/10069
2022-01-08 17:13:25 -08:00
Jon Evans 76f21d950d Ensure LIB_TREE cleans up while frame still exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10266
2022-01-08 17:32:17 -05:00
Seth Hillbrand 69469b254a Printing multiple bitmaps
A long-standing issue with multiple workarounds
(https://gitlab.com/kicad/code/kicad/-/issues/1877) prevented eeschema
printouts with multiple images or images in both the worksheet and the
schematic.

We worked around this by ordering the bitmap printing to be the first
step in the printing process.  This partially worked but didn't get
everything correct.  The primary difficulty in debugging this was that
the wxPrintPreview that we generate looked correct.  Only the actual
printout was incorrect.

The fix is to explicitly clip bitmap drawing to the bitmap area,
regardless of how large the bitmap is.
2022-01-07 17:15:59 -08:00
Seth Hillbrand bfca928900 Plot pads in layer color
v6 pads are not allowed to be a different color from the rest of the
copper layer, so don't query the GAL layer for a color

Fixes https://gitlab.com/kicad/code/kicad/issues/10293
2022-01-07 08:55:59 -08:00
Seth Hillbrand 62f8603353 Don't deduplicate symbol polygons
SHAPE_LINE_CHAIN will, by default, remove duplicate points when
appending.  We don't want to do this when constructing our polygons in
symbol editor, so we need to explicitly call the routine without
deduplication

Fixes https://gitlab.com/kicad/code/kicad/issues/10289
2022-01-07 08:25:09 -08:00
Seth Hillbrand 9a2332dfcf Clear edited point when exiting tool
When leaving the main point editor loop, we need to ensure that the edit
point is cleared as well.  This is usually cleared by a ClearEvent call
but in case this is missed, we need to ensure that other tools are not
caught out

Fixes https://gitlab.com/kicad/code/kicad/issues/10288
2022-01-07 08:23:31 -08:00
qu1ck 4bcfa8df1f Template for vector<VECTOR2I> in swig 2022-01-06 23:48:52 -05:00
Seth Hillbrand a0e424c2ac Forgot to build ninja files 2022-01-06 20:09:44 -08:00
Seth Hillbrand f4b9a92b94 Swap make for ninja in Fedora CI
Take advantage of extra cores on hetzner machine
2022-01-06 20:09:44 -08:00
Seth Hillbrand 184a592f82 Use KiCad builders for Fedora 2022-01-06 20:09:44 -08:00
Seth Hillbrand 3e6bf7814b Safely sort view layers
Changing view order of only some layers can cause overwriting of the
original layer if not pre-staged

Fixes https://gitlab.com/kicad/code/kicad/issues/10283
2022-01-06 14:41:10 -08:00
Seth Hillbrand 9864337914 Do not call SafeYield on close
wxSafeYield() is not "safe".  Pending actions may include deletion of
the currently active class.  This will cause crashes when exiting.  If
needed for specific behaviors, we should use wxSafeYieldFor( flag ) with
the appropriate events specified rather than a general yield which can
cause more problems
2022-01-06 12:31:59 -08:00
Seth Hillbrand 78e737b9d8 DRC scripting: load project from board if possible
s_SettingsManager is not always initialized when the WriteDRCReport is
run.  We should first attempt to extract the project from the actual
board being checked.  Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.

Fixes https://gitlab.com/kicad/code/kicad/issues/10221
2022-01-06 11:50:21 -08:00
Brian Mayton d014f0307b Add ORANGE to DXF output
Matches the schematic color options to DXF layers

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

Signed-off-by: Seth Hillbrand <seth@kipro-pcb.com>
2022-01-06 11:02:57 -08:00
Seth Hillbrand 7c9340f855 Fix swap interval checking
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support.  This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)

Fixes https://gitlab.com/kicad/code/kicad/issues/8944
2022-01-06 10:53:13 -08:00
jean-pierre charras 3069b198b1 PANEL_TEMPLATE_FIELDNAMES: fix incorrect management of boolean options
(it was impossible to disable them)
From Master branch.
Fixes https://gitlab.com/kicad/code/kicad/issues/10280
2022-01-06 19:44:23 +01:00
Seth Hillbrand 05d3dc533b Prevent cvpcb from losing text focus on filter
Refresh event changes focus (on GTK).  We fix this by storing the
existing insertion point in the text box, refocusing and restoring the
text position

Fixes https://gitlab.com/kicad/code/kicad/issues/10029
2022-01-06 09:16:34 -08:00
Marek Roszko 1e05732f55 Add std::hash specialization for VECTOR2I
(cherry picked from commit 589a03afcd)

Fixes https://gitlab.com/kicad/code/kicad/issues/10275
2022-01-05 20:32:46 -08:00
Seth Hillbrand 71e7b4b77b Use 'special' escaping for certain fields
Most fields are escaped using the `\` notation.  But the VALUE field and
the symbol name need to be escaped using braces notation.

Fixes https://gitlab.com/kicad/code/kicad/issues/10097
2022-01-05 17:18:39 -08:00
Seth Hillbrand b8a7a66a0a Keep symbol synced with edit tool
Undo/Redo can change the symbol referenced by the symbol drawing tool.
This updates the current symbol before important steps to keep the
system synced

Fixes https://gitlab.com/kicad/code/kicad/issues/10125
2022-01-05 16:51:41 -08:00
Seth Hillbrand 55087a9e82 Don't remove last point in libedit
SHAPE_LINE_CHAIN in libedit doesn't make a polygon, so we always need
the last point and it shouldn't be closed

Fixes https://gitlab.com/kicad/code/kicad/issues/9934
2022-01-05 16:02:50 -08:00
Seth Hillbrand 444801ada6 Prevent unneeded fallback
Starting in be8327bd54, we assume that all
exceptions in DoRePaint() are caused by OpenGL.  But many calls in
UpdateItems() will throw if there are internal errors such as
std::out_of_range.  Here, we catch those errors and simply skip ahead
rather than falling back to Cairo
2022-01-05 13:46:15 -08:00
Steffen Mauch 7afe188a29 eeschema: automatic generated symbol library from EAGLE plugin does not include footprint reference
Fixes https://gitlab.com/kicad/code/kicad/issues/10262

(cherry picked from commit 3ced3afa68)
2022-01-05 15:28:05 -05:00
Ian McInerney 1ad1cf8374 Fix compile error with UTF8 unicode wxWidgets build
Fixes https://gitlab.com/kicad/code/kicad/issues/10210

(Cherry-picked from bd828f598c)
2022-01-05 19:45:27 +00:00
Ian McInerney abaee94109 Revert caf406943e and don't install the kicad2step lib
This fixes https://gitlab.com/kicad/code/kicad/-/issues/9944 and reverts
caf406943e. The original fix caused issues
with some CMake versions because it tried to give library dependencies
to an object library, which can't have any library dependencies.
Instead, we need it as a static library, and since there is no need to
actually have it as an end-user library, it shouldn't be in the install
command.

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

(Cherry-picked from commit fb36e1b582)
2022-01-05 19:45:27 +00:00
Steffen Mauch d60e77176f eeschema: EAGLE plugin does not reference footprint with library suffix
Fixes https://gitlab.com/kicad/code/kicad/issues/10261

(cherry picked from commit 502e34349e)
2022-01-05 14:39:43 -05:00
Seth Hillbrand 7f1648934f Update pin cache when undoing
The pin cache is invalidated by swap, so we need to ensure that it is
reset when we undo a change to the pins in schematic editor

Fixes https://gitlab.com/kicad/code/kicad/issues/10272
2022-01-05 11:33:03 -08:00
Seth Hillbrand bef762e652 Don't strip extensions twice in BOM export
Exporting the Bill of Materials uses the netlist exporter.  Both of
these routines were stripping the extension, leading to projects like
"test.project.kicad_pro" having the project name stripped.  We separate
the BOM netlist export from generic plugin netlist export to allow the
correct behavior when exporting netlists and generating BOMs

Fixes https://gitlab.com/kicad/code/kicad/issues/10270
2022-01-05 11:07:23 -08:00
Seth Hillbrand a05ec04ee8 Set readable flags correctly on open
Missing files may be thrown during open.  These should have existence
and readable flags set correctly
2022-01-05 09:54:10 -08:00
Steffen Mauch 362eedc510 pcbnew: EAGLE plugin is case sensitive to >VALUE / >NAME
Fixes https://gitlab.com/kicad/code/kicad/issues/10253

(cherry picked from commit 82f147ecef)
2022-01-05 08:07:41 -05:00
Steffen Mauch 11402e2db1 pcbnew: fixing eagle_plugin with empty class names
Fixes #10229
https://gitlab.com/kicad/code/kicad/issues/10229

(cherry picked from commit a5307c6f59)
2022-01-05 07:22:01 -05:00
Seth Hillbrand b1658fdf9a Don't rename existing schematic file
We should never leave a situation where the schematic file may no longer
exist (if the first rename succeeds and the second fails).  So, make a
backup copy of the original schematic file and then attempt to rename
the autosave over the first file.  In this case, if either attempt
fails, we do not lose the original file

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/10219
2022-01-04 20:27:43 -08:00
Jon Evans f9d8ec6137 Handle footprint shapes in polygon creation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259
2022-01-04 21:31:22 -05:00
Jon Evans e9b91b6fab Fix creating polygons from footprint rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257
2022-01-04 21:28:04 -05:00
Seth Hillbrand 873353d8d7 Prevent clipping by default
The text bbox inflation from fb4343bc clips dimensions by default.  This
restores the default size to not clip the dimension line.  It is still a
bit larger than I'd like it to be but is usable

Fixes https://gitlab.com/kicad/code/kicad/issues/10033
2022-01-04 12:11:23 -08:00
Seth Hillbrand a326d777f0 Don't split legacy paths
The '.' is a valid character in the legacy preferences, not a separator.
Also adds fail-safe catch for JSON throws

Fixes https://gitlab.com/kicad/code/kicad/issues/10211
2022-01-04 19:08:12 +00:00
Thomas Pointhuber dec310f7f8 altium: Fix board outline import with arcs using SHAPE_LINE_CHAIN instead of a hack 2022-01-04 19:57:26 +01:00
Seth Hillbrand ca8cf14dff Fix missing FOOTPRINT cast in swig
Fixes https://gitlab.com/kicad/code/kicad/issues/10236
2022-01-04 10:49:29 -08:00
Seth Hillbrand ed9a3deb57 Fix pad snapping in renumber pads
Snap shouldn't be looking for other items in this routine or using the
grid

Fixes https://gitlab.com/kicad/code/kicad/issues/10238
2022-01-03 17:18:03 -08:00
Wayne Stambaugh 58b07efd99 Make footprint and symbol editors use MRU path for new libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10216

(cherry picked from commit ff38853886)
2022-01-03 18:36:46 -05:00
Seth Hillbrand 1874ad2f7e Catch errors from load()
Loading footprints may throw in some cases.  We need to catch these
nicely without breaking out of the full loading process

Fixes https://gitlab.com/kicad/code/kicad/issues/10213
2022-01-03 15:30:20 -08:00
Marco Ciampa b115aec42b Updated Italian translation 2022-01-03 12:02:20 +01:00
Roberto Fernandez Bautista 5e884d14c7 Rename ComparePageNumAndName -> ComparePageNum 2022-01-02 23:27:15 +00:00
Mike Williams e36381bdd2 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
(cherry picked from commit 404659d275)
2022-01-02 18:18:00 -05:00
Jon Evans 45182febaf Exit router and invoke edit tool when attempting to drag an arc track
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10208
2022-01-02 16:10:26 -05:00
Jon Evans ea99c42df6 Move duplicate field handling into field parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10130
2022-01-02 13:19:31 -05:00
Jon Evans 0065036899 Load local settings even when not setting project active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10179
2022-01-02 12:40:25 -05:00
Jon Evans bb388d47fc Fix undo/redo sample action plugin for latest API
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10212
2022-01-02 12:26:27 -05:00
Jon Evans 134b09004b Fix highlighting color logic when net colors are active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10157
2022-01-02 12:11:24 -05:00
Jon Evans c52421869a Fix saving of existing appearance presets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10166
2022-01-02 11:59:19 -05:00
Seth Hillbrand addc5574b4 Ensure merged line gets selected if either parent is
We were only checking for the selection of a single line that gets
merged.  This prevents the merged line from being highlighted but not
selected after merging

Fixes https://gitlab.com/kicad/code/kicad/issues/10202
2022-01-01 16:53:31 -08:00
Seth Hillbrand bd75cffff3 Prevent ops on empty selection
Fixes https://gitlab.com/kicad/code/kicad/issues/10164
2022-01-01 15:28:47 -08:00
Marco Ciampa 3453bf3f88 Updated Italian translation 2022-01-01 22:06:16 +01:00
Marek Roszko f139cc2d9f Add kicad_3dsg copy for qa_pcbnew to run out of build dir
Mirror of the pcbnew step for the same reason


(cherry picked from commit b85fb9137f)
2022-01-01 19:54:30 +00:00
Marek Roszko 6fd93eaa1e Silence MSVC warnings about type mismatch and unused var
(cherry picked from commit 34e90e5045)
2022-01-01 19:50:11 +00:00
Roberto Fernandez Bautista cf8c614a02 Use virtual page number when real page numbers are blank
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10158

(cherry picked from commit a0d708e04d)
2022-01-01 18:39:49 +00:00
Marco Ciampa 9fd1ad9b7b Updated Italian translation 2022-01-01 17:10:10 +01:00
jean-pierre charras d45472adcd French translation update 2021-12-31 13:23:17 +01:00
jean-pierre charras f67c0ea8c7 fix missing line breaks and non printable html char on Windows 2021-12-31 13:21:43 +01:00
jean-pierre charras 3c2bb97eae PANEL_PREVIEW_3D_MODEL: fix incorrect values of offset for unit inch and mil.
From master commit 49cb9586
2021-12-31 10:05:56 +01:00
Marek Roszko cbdfb5d396 Remove the unused updateui in the selection filter base
(cherry picked from commit e75d283007)
2021-12-30 17:18:38 +00:00
Roberto Fernandez Bautista e19acb4632 Correctly handle excluding an ERC marker in eeschema when right clicking
In addition, hide the option to exclude a marker if the selected marker
is already excluded.

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

(cherry picked from commit 701e256b3f)
2021-12-30 17:16:04 +00:00
Erwan Rouault 11c967b259 pcbnew: Add via height support in drc length
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10135
2021-12-30 14:34:44 +00:00
Jon Evans 517e44e917 3D viewer: Disable copper thickness in OpenGL mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10153
2021-12-30 09:20:09 -05:00
Jon Evans 0ec440805d Tune connectivity progress reporter
We don't need quite as many updates, this helps speed a little

See https://gitlab.com/kicad/code/kicad/-/issues/10154
2021-12-30 09:16:19 -05:00
Marek Roszko 67fe8904c0 Add win32 VERSION_INFO resource blocks for the DLLs
(cherry picked from commit 3f711b8958)
2021-12-29 04:56:26 +00:00
Marek Roszko da850036e3 Append product version to task manager titlebar (effectively)
(cherry picked from commit 426f6dd485)
2021-12-29 01:27:40 +00:00
Mike Williams b80595903c Eeschema: draw dangling end shadows
(cherry picked from commit bf2c4c1584)
2021-12-28 16:10:40 -08:00
Steven A. Falco c83880428c Add python 3.11 support
(Cherry-picked from commit 40589d2c33)
2021-12-28 14:53:31 +00:00
Jacob Mealey cc84344499 fix in pcbnew/python/swig/units.i ... added error handling
Added error handling in unit conversions for the pcbnew python bindings.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10081
2021-12-28 07:21:35 +00:00
Marek Roszko 32be48222a Fix parent of schematic setup parent nodes
(cherry picked from commit 705aa64c24)
2021-12-28 01:16:18 +00:00
Marek Roszko b7ec594c0a Use the correct parent for the root node placeholders of board setup
(cherry picked from commit 38842647b8)
2021-12-28 01:16:05 +00:00
Wayne Stambaugh 2481b21d80 Don't treat project Save As path as a path and file name.
The single string ctor of wxFileName treats the string as a path and file
name.  If there is a dot in the last path name, it assumes that the last
path is actually a file name and extension.

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

(cherry picked from commit fcc497509a)
2021-12-26 17:04:45 -05:00
Marek Roszko ceb4d08ce9 Fix race condition with ShowEventCounters on Windows
(cherry picked from commit 3dd8c57bdd)
2021-12-26 13:33:18 +00:00
Steven A. Falco 6edc605cab Several scripting options are no longer valid
Remove invalid scripting options from the yml file.
2021-12-25 11:14:26 -05:00
Mikolaj Wielgus d913e6a8f7 Restore Translators-Other section in credits 2021-12-24 20:36:10 +01:00
jean-pierre charras bde0c3e879 DIALOG_TEMPLATE_SELECTOR: Force display refresh after selecting a path
For some reason the panel showing the templates did not show the new selection
Fixes #10106
From Master branch
2021-12-24 11:51:26 +01:00
jean-pierre charras b95032901e pcbnew print: minor fix: option edge.cut on all layers not stored. Fixes #10046 https://gitlab.com/kicad/code/kicad/issues/10046 2021-12-23 18:36:42 +01:00
jean-pierre charras 753e08a944 Use ChangeValue() instead of SetValue() in some wxTextCtrl (It avoids generating unused events) 2021-12-23 18:36:42 +01:00
jean-pierre charras ee1b327162 3D viewer: fix a minor cosmetic issue. Fixes #10002 https://gitlab.com/kicad/code/kicad/issues/10002 2021-12-23 18:36:24 +01:00
jean-pierre charras da5f2366f9 PANEL_SETUP_BOARD_STACKUP: fix a typo that prevent displaying a color swatch. Fixes #10027 https://gitlab.com/kicad/code/kicad/issues/10027 2021-12-23 18:36:24 +01:00
Jeff Young e7cc177d94 Allow a 0 pin-symbol-size.
This is particularly important when reading legacy projects as 0 is
what signals the painter to use the old algorithm (1/2 pin name/number
size).

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

(cherry picked from commit f089cf44a7)
2021-12-23 17:01:48 +00:00
Jeff Young 93c48b9d46 Hot-update units in track editing dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10099

(cherry picked from commit 4e8a7fc911)
2021-12-23 17:01:44 +00:00
Jeff Young 1b033d56a7 Improve clean up tracks & vias algorithm for neck-downs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10098

(cherry picked from commit d5a5928e5a)
2021-12-23 17:01:39 +00:00
Jeff Young ad583eab13 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020

(cherry picked from commit 6e2460ad37)
2021-12-23 17:01:34 +00:00
Jeff Young 0d3246e3ab Don't commit zone refill if there were no changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10085

(cherry picked from commit 77239591c0)
2021-12-23 17:01:31 +00:00
Jeff Young 76fd029cd6 Don't leave stranded symbols/footprints in editors when doc closes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10026

(cherry picked from commit 9af33cdfe8)
2021-12-23 17:01:25 +00:00
Jeff Young 2efa878287 Use a bigger hammer to update adjacent segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/9927

(cherry picked from commit ee5db73113)
2021-12-23 17:01:22 +00:00
Jeff Young 1dc78c4adc Tidy up pad & parent footprint selection corner cases.
Fixes https://gitlab.com/kicad/code/kicad/issues/9923

(cherry picked from commit d9dba2edb2)
2021-12-23 17:01:19 +00:00
Jeff Young 34d855cd53 Make sure undo/redo of pagesetup is done to correct sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/9999

(cherry picked from commit aa4dcb2bf1)
2021-12-23 17:01:15 +00:00
Jeff Young 9cb36e5bc5 Restore units to a bunch of wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10063

(cherry picked from commit 8b52e969d6)
2021-12-23 17:01:10 +00:00
Jeff Young b6ff44cccf Fix failure to remove hover selection after rotate operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/10058

(cherry picked from commit f696c4ddfc)
2021-12-23 17:01:06 +00:00
Jeff Young e9e742816d Scale markers somewhat proportionally to zoom.
Fixes https://gitlab.com/kicad/code/kicad/issues/10048

(cherry picked from commit a1c8e36c99)
2021-12-23 17:01:01 +00:00
Wayne Stambaugh b403930601 Begin version 6.0.1 development. 2021-12-22 08:44:30 -05:00
942 changed files with 136735 additions and 136745 deletions
+1 -1
View File
@@ -40,6 +40,6 @@ include:
- local: '/.gitlab/templates.yml'
- local: '/.gitlab/Fedora-Linux-CI.yml'
- local: '/.gitlab/Ubuntu-20.04-CI.yml'
- local: '/.gitlab/Windows-CI.yml'
# - local: '/.gitlab/Windows-CI.yml'
- local: '/.gitlab/coverity.yml'
- local: '/.gitlab/linux-metadata-validate.yml'
+88 -14
View File
@@ -1,8 +1,12 @@
##########################################################################
# Build KiCad on Fedora and save the results
##########################################################################
fedora_build_linux:
.fedora_build_linux_base:
stage: build
# Don't tag until we have separate CI for MRs
# tags:
# - kicad-fedora
image: registry.gitlab.com/kicad/kicad-ci/source_containers/master/fedora:34
extends: .only_code
interruptible: false
cache:
@@ -18,14 +22,14 @@ fedora_build_linux:
- mkdir -p build/linux
- cd build/linux
- cmake
-DCMAKE_BUILD_TYPE=Debug
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
../../
- make 2>&1 | tee compilation_log.txt
- ninja 2>&1 | tee compilation_log.txt
- cd ../../
artifacts:
# Only save the artifacts that are needed for running the tests in the next stage
@@ -39,15 +43,31 @@ fedora_build_linux:
- build/linux/pcbnew/_pcbnew.so
- build/linux/qa/
- build/linux/compilation_log.txt
exclude:
- build/linux/**/*.o
- build/linux/**/*.a
# This split is to ensure we can always use our runner for our jobs
fedora_build_linux_kicad:
extends: .fedora_build_linux_base
tags:
- kicad-fedora
only:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
fedora_build_linux_public:
extends: .fedora_build_linux_base
except:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
# Upload the compilation log in an easily downloadable form
fedora_report_build_warn:
.fedora_report_build_warn:
stage: report
extends: .only_code
when: always
needs:
- job: fedora_build_linux
artifacts: true
script:
- echo "Uploading compilation log"
- cp build/linux/compilation_log.txt compilation_log.txt
@@ -58,14 +78,32 @@ fedora_report_build_warn:
paths:
- compilation_log.txt
fedora_report_build_warn_kicad:
extends: .fedora_report_build_warn
tags:
- kicad-fedora
needs:
- job: fedora_build_linux_kicad
artifacts: true
only:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
fedora_report_build_warn_public:
extends: .fedora_report_build_warn
needs:
- job: fedora_build_linux_public
artifacts: true
except:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
# Report on the metrics of the code
fedora_report_metrics:
.fedora_report_metrics:
stage: report
extends: .only_code
when: always
needs:
- job: fedora_build_linux
artifacts: true
script:
- cat build/linux/compilation_log.txt | { grep "warning:" || test $? = 1; } | awk 'END{print "number_of_fedora_warnings "NR}' > metrics.txt
- cat metrics.txt
@@ -73,11 +111,30 @@ fedora_report_metrics:
reports:
metrics: metrics.txt
fedora_report_metrics_kicad:
extends: .fedora_report_metrics
tags:
- kicad-fedora
needs:
- job: fedora_build_linux_kicad
artifacts: true
only:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
fedora_report_metrics_public:
extends: .fedora_report_metrics
needs:
- job: fedora_build_linux_public
artifacts: true
except:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
##########################################################################
# Run the code unit tests.
##########################################################################
fedora_qa:
.fedora_qa:
extends:
- .unit_test
- .only_code
@@ -85,6 +142,23 @@ fedora_qa:
matrix:
# The name of the test without the qa_ prefix
- TEST: [python, common, gerbview, pcbnew, eeschema, kimath, sexpr, kicad2step]
fedora_qa_kicad:
extends: .fedora_qa
tags:
- kicad-fedora
needs:
- job: fedora_build_linux
- job: fedora_build_linux_kicad
artifacts: true
only:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
fedora_qa_public:
extends: .fedora_qa
needs:
- job: fedora_build_linux_public
artifacts: true
except:
variables:
- $CI_PROJECT_ROOT_NAMESPACE == "kicad"
+4 -9
View File
@@ -1,7 +1,7 @@
##########################################################################
# Build KiCad on Ubuntu 20.04 and save the results
##########################################################################
ubuntu20.04_build:
.ubuntu20.04_build:
stage: build
tags:
- kicad-ubuntu20.04
@@ -30,12 +30,7 @@ ubuntu20.04_build:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_BUILD_TYPE=Debug
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_PYTHON3=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
@@ -57,7 +52,7 @@ ubuntu20.04_build:
- build/linux/compilation_log.txt
# Upload the compilation log in an easily downloadable form
ubuntu20.04_report_build_warn:
.ubuntu20.04_report_build_warn:
stage: report
when: always
only:
@@ -79,7 +74,7 @@ ubuntu20.04_report_build_warn:
- compilation_log.txt
# Report on the metrics of the code
ubuntu20.04_report_metrics:
.ubuntu20.04_report_metrics:
stage: report
when: always
only:
@@ -100,7 +95,7 @@ ubuntu20.04_report_metrics:
##########################################################################
# Run the code unit tests.
##########################################################################
ubuntu20.04_qa:
.ubuntu20.04_qa:
extends:
- .unit_test
needs:
-5
View File
@@ -18,12 +18,7 @@ win64_build:
-G "Ninja" `
-DCMAKE_TOOLCHAIN_FILE=C:\build\vcpkg\scripts\buildsystems\vcpkg.cmake `
-DCMAKE_BUILD_TYPE=Debug `
-DKICAD_SCRIPTING=OFF `
-DKICAD_SCRIPTING_MODULES=OFF `
-DKICAD_SCRIPTING_PYTHON3=OFF `
-DKICAD_SCRIPTING_WXPYTHON=OFF `
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF `
-DKICAD_SCRIPTING_ACTION_MENU=OFF `
-DKICAD_USE_OCC=ON `
-DKICAD_SPICE=ON `
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON `
-5
View File
@@ -59,12 +59,7 @@ Coverity:
- cmake
-DCMAKE_BUILD_TYPE=Debug
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_PYTHON3=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
- coverity/bin/cov-build --dir cov-int make -j8
-5
View File
@@ -30,12 +30,7 @@ validate_linux_metadata:
- cmake
-DCMAKE_BUILD_TYPE=Debug
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING=ON
-DKICAD_SCRIPTING_MODULES=ON
-DKICAD_SCRIPTING_PYTHON3=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
-DKICAD_SCRIPTING_ACTION_MENU=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
-DKICAD_BUILD_I18N=ON
+29 -26
View File
@@ -165,7 +165,7 @@ void S3D_CACHE_ENTRY::SetSHA1( const unsigned char* aSHA1Sum )
{
if( nullptr == aSHA1Sum )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum",
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] NULL passed for aSHA1Sum" ),
__FILE__, __FUNCTION__, __LINE__ );
return;
@@ -194,12 +194,13 @@ S3D_CACHE::S3D_CACHE()
S3D_CACHE::~S3D_CACHE()
{
COMMON_SETTINGS* commonSettings = Pgm().GetCommonSettings();
FlushCache();
// We'll delete ".3dc" cache files older than this many days
int clearCacheInterval = commonSettings->m_System.clear_3d_cache_interval;
int clearCacheInterval = 0;
if( Pgm().GetCommonSettings() )
clearCacheInterval = Pgm().GetCommonSettings()->m_System.clear_3d_cache_interval;
// An interval of zero means the user doesn't want to ever clear the cache
@@ -221,7 +222,7 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, S3D_CACHE_ENTRY** aCach
if( full3Dpath.empty() )
{
// the model cannot be found; we cannot proceed
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [3D model] could not find model '%s'\n",
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [3D model] could not find model '%s'\n" ),
__FILE__, __FUNCTION__, __LINE__, aModelFile );
return nullptr;
}
@@ -307,7 +308,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
( aFileName, ep ) ).second == false )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
m_CacheList.pop_back();
@@ -325,7 +327,8 @@ SCENEGRAPH* S3D_CACHE::checkCache( const wxString& aFileName, S3D_CACHE_ENTRY**
if( m_CacheMap.insert( std::pair< wxString, S3D_CACHE_ENTRY* >
( aFileName, ep ) ).second == false )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'",
wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * [BUG] duplicate entry in map file; key = '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
m_CacheList.pop_back();
@@ -358,7 +361,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
{
if( aFileName.empty() )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * [BUG] empty filename",
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * [BUG] empty filename" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -366,7 +369,7 @@ bool S3D_CACHE::getSHA1( const wxString& aFileName, unsigned char* aSHA1Sum )
if( nullptr == aSHA1Sum )
{
wxLogTrace( MASK_3D_CACHE, "%s\n * [BUG] NULL pointer passed for aMD5Sum",
wxLogTrace( MASK_3D_CACHE, wxT( "%s\n * [BUG] NULL pointer passed for aMD5Sum" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -417,7 +420,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() )
{
wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; no file hash available" );
wxT( " * [3D model] cannot load cached model; no file hash available" ) );
return false;
}
@@ -425,7 +428,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() )
{
wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; config directory unknown" );
wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
return false;
}
@@ -434,8 +437,7 @@ bool S3D_CACHE::loadCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( !wxFileName::FileExists( fname ) )
{
wxString errmsg = "cannot open file";
wxLogTrace( MASK_3D_CACHE, " * [3D model] %s '%s'", errmsg.GetData(), fname.GetData() );
wxLogTrace( MASK_3D_CACHE, wxT( " * [3D model] cannot open file '%s'" ), fname.GetData() );
return false;
}
@@ -455,7 +457,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
{
if( nullptr == aCacheItem )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * NULL passed for aCacheItem",
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * NULL passed for aCacheItem" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -463,7 +465,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( nullptr == aCacheItem->sceneData )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * aCacheItem has no valid scene data",
wxLogTrace( MASK_3D_CACHE, wxT( "%s:%s:%d\n * aCacheItem has no valid scene data" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -474,7 +476,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( bname.empty() )
{
wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; no file hash available" );
wxT( " * [3D model] cannot load cached model; no file hash available" ) );
return false;
}
@@ -482,7 +484,7 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
if( m_CacheDir.empty() )
{
wxLogTrace( MASK_3D_CACHE,
" * [3D model] cannot load cached model; config directory unknown" );
wxT( " * [3D model] cannot load cached model; config directory unknown" ) );
return false;
}
@@ -493,8 +495,8 @@ bool S3D_CACHE::saveCacheData( S3D_CACHE_ENTRY* aCacheItem )
{
if( !wxFileName::FileExists( fname ) )
{
wxLogTrace( MASK_3D_CACHE, " * [3D model] path exists but is not a regular file '%s'",
fname );
wxLogTrace( MASK_3D_CACHE,
wxT( " * [3D model] path exists but is not a regular file '%s'" ), fname );
return false;
}
@@ -510,7 +512,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_ConfigDir.empty() )
return false;
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
cfgdir.Normalize();
@@ -521,7 +523,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !cfgdir.DirExists() )
{
wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * failed to create 3D configuration directory '%s'",
wxT( "%s:%s:%d\n * failed to create 3D configuration directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, cfgdir.GetPath() );
return false;
@@ -534,8 +536,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !m_FNResolver->Set3DConfigDir( m_ConfigDir ) )
{
wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
" * config directory: '%s'",
wxT( "%s:%s:%d\n * could not set 3D Config Directory on filename resolver\n"
" * config directory: '%s'" ),
__FILE__, __FUNCTION__, __LINE__, m_ConfigDir );
}
@@ -548,7 +550,7 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
// 3. MSWin: AppData\Local\kicad\3d
wxFileName cacheDir;
cacheDir.AssignDir( PATHS::GetUserCachePath() );
cacheDir.AppendDir( "3d" );
cacheDir.AppendDir( wxT( "3d" ) );
if( !cacheDir.DirExists() )
{
@@ -556,7 +558,8 @@ bool S3D_CACHE::Set3DConfigDir( const wxString& aConfigDir )
if( !cacheDir.DirExists() )
{
wxLogTrace( MASK_3D_CACHE, "%s:%s:%d\n * failed to create 3D cache directory '%s'",
wxLogTrace( MASK_3D_CACHE,
wxT( "%s:%s:%d\n * failed to create 3D cache directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, cacheDir.GetPath() );
return false;
@@ -651,7 +654,7 @@ S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName )
if( !cp )
{
wxLogTrace( MASK_3D_CACHE,
"%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY",
wxT( "%s:%s:%d\n * [BUG] model loaded with no associated S3D_CACHE_ENTRY" ),
__FILE__, __FUNCTION__, __LINE__ );
return nullptr;
+21 -20
View File
@@ -65,11 +65,11 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
{
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator sM = m_ExtMap.begin();
std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator eM = m_ExtMap.end();
wxLogTrace( MASK_3D_PLUGINMGR, " * Extension [plugin name]:\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * Extension [plugin name]:\n" ) );
while( sM != eM )
{
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.GetData(),
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s' [%s]\n" ), sM->first.GetData(),
sM->second->GetKicadPluginName() );
++sM;
}
@@ -77,7 +77,7 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
}
else
{
wxLogTrace( MASK_3D_PLUGINMGR, " * No plugins available\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No plugins available\n" ) );
}
@@ -86,17 +86,17 @@ S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER()
/// list of file filters
std::list< wxString >::const_iterator sFF = m_FileFilters.begin();
std::list< wxString >::const_iterator eFF = m_FileFilters.end();
wxLogTrace( MASK_3D_PLUGINMGR, " * File filters:\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * File filters:\n" ) );
while( sFF != eFF )
{
wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).GetData() );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " + '%s'\n" ), (*sFF).GetData() );
++sFF;
}
}
else
{
wxLogTrace( MASK_3D_PLUGINMGR, " * No file filters available\n" );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * No file filters available\n" ) );
}
#endif // DEBUG
}
@@ -178,7 +178,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
while( sPL != ePL )
{
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] searching path: '%s'",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] searching path: '%s'" ),
__FILE__, __FUNCTION__, __LINE__, (*sPL).ToUTF8() );
listPlugins( *sPL, pluginlist );
@@ -197,13 +197,13 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
if( pp->Open( sPL->ToUTF8() ) )
{
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding plugin",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding plugin" ),
__FILE__, __FUNCTION__, __LINE__ );
m_Plugins.push_back( pp );
int nf = pp->GetNFilters();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] adding %d filters",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] adding %d filters" ),
__FILE__, __FUNCTION__, __LINE__, nf );
for( int i = 0; i < nf; ++i )
@@ -221,7 +221,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
}
else
{
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] deleting plugin",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] deleting plugin" ),
__FILE__, __FUNCTION__, __LINE__ );
delete pp;
@@ -230,7 +230,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
++sPL;
}
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [DEBUG] plugins loaded",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [DEBUG] plugins loaded" ),
__FILE__, __FUNCTION__, __LINE__ );
}
@@ -305,7 +305,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
aPluginList.push_back( wxpath );
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] found 3D plugin '%s'\n", wxpath.GetData() );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] found 3D plugin '%s'\n" ), wxpath.GetData() );
}
@@ -316,14 +316,15 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
if( aPath.empty() )
return;
wxLogTrace( MASK_3D_PLUGINMGR, " * [INFO] checking for 3D plugins in '%s'\n", aPath.GetData() );
wxLogTrace( MASK_3D_PLUGINMGR, wxT( " * [INFO] checking for 3D plugins in '%s'\n" ),
aPath.GetData() );
wxFileName path;
if( aPath.StartsWith( "${" ) || aPath.StartsWith( "$(" ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), "" );
if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
else
path.Assign( aPath, "" );
path.Assign( aPath, wxEmptyString );
path.Normalize();
@@ -377,7 +378,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
int nExt = aPlugin->GetNExtensions();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] adding %d extensions",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] adding %d extensions" ),
__FILE__, __FUNCTION__, __LINE__, nExt );
for( int i = 0; i < nExt; ++i )
@@ -415,10 +416,10 @@ SCENEGRAPH* S3D_PLUGIN_MANAGER::Load3DModel( const wxString& aFileName, std::str
#endif
// .gz files are compressed versions that may have additional information in the previous extension
if( ext_to_find == "gz" )
if( ext_to_find == wxT( "gz" ) )
{
wxFileName second( raw.GetName() );
ext_to_find = second.GetExt() + ".gz";
ext_to_find = second.GetExt() + wxT( ".gz" );
}
std::pair < std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::iterator,
@@ -452,7 +453,7 @@ void S3D_PLUGIN_MANAGER::ClosePlugins( void )
std::list< KICAD_PLUGIN_LDR_3D* >::iterator sP = m_Plugins.begin();
std::list< KICAD_PLUGIN_LDR_3D* >::iterator eP = m_Plugins.end();
wxLogTrace( MASK_3D_PLUGINMGR, "%s:%s:%d * [INFO] closing %d extensions",
wxLogTrace( MASK_3D_PLUGINMGR, wxT( "%s:%s:%d * [INFO] closing %d extensions" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( m_Plugins.size() ) );
while( sP != eP )
+24 -22
View File
@@ -25,6 +25,7 @@
#include <iostream>
#include <sstream>
#include <fstream>
#include <memory>
#include <wx/filename.h>
#include <wx/log.h>
#include "plugins/3dapi/ifsg_api.h"
@@ -97,7 +98,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
if( op.fail() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, filename );
return false;
@@ -122,7 +123,7 @@ bool S3D::WriteVRML( const char* filename, bool overwrite, SGNODE* aTopNode,
CLOSE_STREAM( op );
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing file '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered writing file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, filename );
return false;
@@ -167,7 +168,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
{
if( !overwrite )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] file exists not overwriting '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] file exists not overwriting '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
return false;
@@ -176,7 +177,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
// make sure we make no attempt to write a directory
if( !wxFileName::FileExists( aFileName ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] specified path is a directory '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] specified path is a directory '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
return false;
@@ -187,7 +188,7 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
if( output.fail() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
return false;
@@ -205,7 +206,8 @@ bool S3D::WriteCache( const char* aFileName, bool overwrite, SGNODE* aNode,
if( !rval )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered writing cache file '%s'",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] problems encountered writing cache file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
// delete the defective file
@@ -226,21 +228,19 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( !wxFileName::FileExists( aFileName ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] no such file '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] no such file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
return nullptr;
}
SGNODE* np = new SCENEGRAPH( nullptr );
std::unique_ptr<SGNODE> np = std::make_unique<SCENEGRAPH>( nullptr );
OPEN_ISTREAM( file, aFileName );
if( file.fail() )
{
delete np;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] failed to open file '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] failed to open file '%s'" ),
__FILE__, __FUNCTION__, __LINE__, aFileName );
return nullptr;
@@ -256,9 +256,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
" at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file );
return nullptr;
@@ -290,9 +291,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( '(' != schar )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; missing left parenthesis at position '%d'",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( file.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left parenthesis"
" at position '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( file.tellg() ) );
CLOSE_STREAM( file );
return nullptr;
@@ -321,15 +323,15 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
if( !rval )
{
delete np;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered reading cache file '%s'",
__FILE__, __FUNCTION__, __LINE__, aFileName );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered reading cache file "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
aFileName );
return nullptr;
}
return np;
return np.release();
}
+10 -6
View File
@@ -56,7 +56,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -72,7 +73,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
#ifdef DEBUG
if( ! pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -83,7 +85,8 @@ IFSG_APPEARANCE::IFSG_APPEARANCE( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -123,7 +126,8 @@ bool IFSG_APPEARANCE::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGAPPEARANCE" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@@ -250,7 +254,7 @@ bool IFSG_APPEARANCE::SetShininess( float aShininess ) noexcept
if( aShininess < 0 || aShininess > 1.0 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] shininess out of range [0..1]",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] shininess out of range [0..1]" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -268,7 +272,7 @@ bool IFSG_APPEARANCE::SetTransparency( float aTransparency ) noexcept
if( aTransparency < 0 || aTransparency > 1.0 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] transparency out of range [0..1]",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] transparency out of range [0..1]" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
+5 -4
View File
@@ -56,7 +56,7 @@ IFSG_COLORS::IFSG_COLORS( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d" ), __FILE__, __FUNCTION__, __LINE__ );
return;
}
@@ -73,7 +73,8 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
// Braces needed due to dangling else warning from wxLogTrace macro
if( !pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -84,7 +85,7 @@ IFSG_COLORS::IFSG_COLORS( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__,
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
@@ -125,7 +126,7 @@ bool IFSG_COLORS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOLORS" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+8 -4
View File
@@ -57,7 +57,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -72,7 +73,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
if( !pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
return;
}
@@ -81,7 +83,8 @@ IFSG_COORDINDEX::IFSG_COORDINDEX( IFSG_NODE& aParent )
if( !m_node->SetParent( pp ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
delete m_node;
m_node = nullptr;
@@ -123,7 +126,8 @@ bool IFSG_COORDINDEX::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDINDEX" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+7 -4
View File
@@ -56,7 +56,8 @@ IFSG_COORDS::IFSG_COORDS( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -72,7 +73,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
#ifdef DEBUG
if( !pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -83,7 +85,8 @@ IFSG_COORDS::IFSG_COORDS( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -123,7 +126,7 @@ bool IFSG_COORDS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGCOORDS" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+7 -4
View File
@@ -57,7 +57,8 @@ IFSG_FACESET::IFSG_FACESET( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -73,7 +74,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
#ifdef DEBUG
if( ! pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -84,7 +86,8 @@ IFSG_FACESET::IFSG_FACESET( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -124,7 +127,7 @@ bool IFSG_FACESET::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGFACESET" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+7 -4
View File
@@ -57,7 +57,8 @@ IFSG_NORMALS::IFSG_NORMALS( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -73,7 +74,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
#ifdef DEBUG
if( ! pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -84,7 +86,8 @@ IFSG_NORMALS::IFSG_NORMALS( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -124,7 +127,7 @@ bool IFSG_NORMALS::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGNORMALS" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+7 -4
View File
@@ -57,7 +57,8 @@ IFSG_SHAPE::IFSG_SHAPE( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -73,7 +74,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
#ifdef DEBUG
if( !pp )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, BadParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
BadParent );
}
#endif
@@ -84,7 +86,8 @@ IFSG_SHAPE::IFSG_SHAPE( IFSG_NODE& aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -124,7 +127,7 @@ bool IFSG_SHAPE::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SGSHAPE" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
+4 -3
View File
@@ -56,7 +56,8 @@ IFSG_TRANSFORM::IFSG_TRANSFORM( SGNODE* aParent )
delete m_node;
m_node = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d %s", __FILE__, __FUNCTION__, __LINE__, WrongParent );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d %s" ), __FILE__, __FUNCTION__, __LINE__,
WrongParent );
return;
}
@@ -96,7 +97,7 @@ bool IFSG_TRANSFORM::NewNode( SGNODE* aParent )
if( aParent != m_node->GetParent() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid SGNODE parent (%s) to SCENEGRAPH" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeTypeName( aParent->GetNodeType() ) );
@@ -148,7 +149,7 @@ bool IFSG_TRANSFORM::SetScale( double aScale )
if( aScale < 1e-8 && aScale > -1e-8 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] |scale| is < 1e-8 - this seems strange" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
+39 -31
View File
@@ -49,8 +49,10 @@ SCENEGRAPH::SCENEGRAPH( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ,
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SCENEGRAPH (type %d)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
{
@@ -140,7 +142,7 @@ void SCENEGRAPH::unlinkNode( const SGNODE* aNode, bool isChild )
break;
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ );
}
@@ -166,8 +168,11 @@ bool SCENEGRAPH::addNode( SGNODE* aNode, bool isChild )
ADD_NODE( S3D::SGTYPE_TRANSFORM, SCENEGRAPH, aNode, m_Transforms, m_RTransforms, isChild );
ADD_NODE( S3D::SGTYPE_SHAPE, SGSHAPE, aNode, m_Shape, m_RShape, isChild );
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)",
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] object '%s' is not a valid type for this object (%d)" ),
__FILE__, __FUNCTION__, __LINE__,
aNode->GetName(),
aNode->GetNodeType() );
return false;
}
@@ -358,7 +363,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( aFile.fail() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
@@ -414,7 +420,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{
if( !m_Transforms[i]->WriteCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child transforms",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] bad stream while writing child transforms" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -434,7 +441,8 @@ bool SCENEGRAPH::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{
if( !m_Shape[i]->WriteCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream while writing child shapes",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [INFO] bad stream while writing child shapes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -467,8 +475,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
// we need to read the tag and verify its type
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; tag mismatch at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; tag mismatch at position "
"%ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -504,8 +512,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child transform tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child transform tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -517,8 +525,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading transform %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading transform "
"%ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -531,8 +539,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_TRANSFORM != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref transform tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref transform tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -543,8 +551,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref transform at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"transform at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -553,8 +561,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_TRANSFORM != sp->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not TRANSFORM "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -569,8 +577,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child shape tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child shape tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -582,9 +590,9 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading shape at "
"position %ul", __FILE__, __FUNCTION__, __LINE__,
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
"reading shape at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
return false;
@@ -596,8 +604,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_SHAPE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref shape tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref shape tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -608,8 +616,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !sp )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref shape at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref shape "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -618,8 +626,8 @@ bool SCENEGRAPH::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( S3D::SGTYPE_SHAPE != sp->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGSHAPE at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
+14 -12
View File
@@ -45,7 +45,8 @@ SGAPPEARANCE::SGAPPEARANCE( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGAPPEARANCE (type %s )" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
@@ -98,7 +99,7 @@ bool SGAPPEARANCE::SetEmissive( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetEmissive( const SGCOLOR* aRGBColor )
{
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return emissive.SetColor( aRGBColor );
}
@@ -118,7 +119,7 @@ bool SGAPPEARANCE::SetDiffuse( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetDiffuse( const SGCOLOR* aRGBColor )
{
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return diffuse.SetColor( aRGBColor );
}
@@ -138,7 +139,7 @@ bool SGAPPEARANCE::SetSpecular( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetSpecular( const SGCOLOR* aRGBColor )
{
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return specular.SetColor( aRGBColor );
}
@@ -157,7 +158,7 @@ bool SGAPPEARANCE::SetAmbient( float aRVal, float aGVal, float aBVal )
bool SGAPPEARANCE::SetAmbient( const SGCOLOR* aRGBColor )
{
wxCHECK_MSG( aRGBColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aRGBColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
return ambient.SetColor( aRGBColor );
}
@@ -184,20 +185,20 @@ SGNODE* SGAPPEARANCE::FindNode( const char* aNodeName, const SGNODE* aCaller) no
void SGAPPEARANCE::unlinkChildNode( const SGNODE* aCaller ) noexcept
{
wxCHECK_MSG( aCaller, /* void */,
"unexpected code branch; node should have no children or refs" );
wxT( "unexpected code branch; node should have no children or refs" ) );
}
void SGAPPEARANCE::unlinkRefNode( const SGNODE* aCaller ) noexcept
{
wxCHECK_MSG( aCaller, /* void */,
"unexpected code branch; node should have no children or refs" );
wxT( "unexpected code branch; node should have no children or refs" ) );
}
bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
{
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" );
wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
// This is redundant but it keeps gcc from generating a warning on debug builds.
return false;
@@ -206,7 +207,7 @@ bool SGAPPEARANCE::AddRefNode( SGNODE* aNode ) noexcept
bool SGAPPEARANCE::AddChildNode( SGNODE* aNode ) noexcept
{
wxCHECK_MSG( aNode, false, "this node does not accept children or refs" );
wxCHECK_MSG( aNode, false, wxT( "this node does not accept children or refs" ) );
// This is redundant but it keeps gcc from generating a warning on debug builds.
return false;
@@ -304,7 +305,7 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
{
if( nullptr == parentNode )
{
wxCHECK_MSG( m_Parent, false, "corrupt data; m_aParent is NULL" );
wxCHECK_MSG( m_Parent, false, wxT( "corrupt data; m_aParent is NULL" ) );
SGNODE* np = m_Parent;
@@ -320,11 +321,12 @@ bool SGAPPEARANCE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
return false;
}
wxCHECK_MSG( parentNode == m_Parent, false, "corrupt data; parentNode != m_aParent" );
wxCHECK_MSG( parentNode == m_Parent, false, wxT( "corrupt data; parentNode != m_aParent" ) );
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
+7 -7
View File
@@ -42,7 +42,7 @@ SGCOLOR::SGCOLOR( float aRVal, float aGVal, float aBVal )
{
if( !checkRange( aRVal, aGVal, aBVal ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid value passed to constructor",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid value passed to constructor" ),
__FILE__, __FUNCTION__, __LINE__ );
red = 0.0;
green = 0.0;
@@ -74,7 +74,7 @@ void SGCOLOR::GetColor( SGCOLOR& aColor ) const noexcept
void SGCOLOR::GetColor( SGCOLOR* aColor ) const noexcept
{
wxCHECK_MSG( aColor, /* void */, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aColor, /* void */, wxT( "NULL pointer passed for aRGBColor" ) );
aColor->red = red;
aColor->green = green;
@@ -106,7 +106,7 @@ bool SGCOLOR::SetColor( const SGCOLOR& aColor ) noexcept
bool SGCOLOR::SetColor( const SGCOLOR* aColor ) noexcept
{
wxCHECK_MSG( aColor, false, "NULL pointer passed for aRGBColor" );
wxCHECK_MSG( aColor, false, wxT( "NULL pointer passed for aRGBColor" ) );
red = aColor->red;
green = aColor->green;
@@ -121,7 +121,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aRedVal < 0.0 || aRedVal > 1.0 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid RED value: %g",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid RED value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aRedVal );
ok = false;
@@ -129,7 +129,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aGreenVal < 0.0 || aGreenVal > 1.0 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid GREEN value: %g",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid GREEN value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aGreenVal );
ok = false;
@@ -137,7 +137,7 @@ bool SGCOLOR::checkRange( float aRedVal, float aGreenVal, float aBlueVal ) const
if( aBlueVal < 0.0 || aBlueVal > 1.0 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] invalid BLUE value: %g",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] invalid BLUE value: %g" ),
__FILE__, __FUNCTION__, __LINE__, aBlueVal );
ok = false;
@@ -181,7 +181,7 @@ void SGPOINT::GetPoint( const SGPOINT& aPoint ) noexcept
void SGPOINT::GetPoint( const SGPOINT* aPoint ) noexcept
{
wxCHECK_MSG( aPoint, /* void */, "NULL pointer passed for aPoint" );
wxCHECK_MSG( aPoint, /* void */, wxT( "NULL pointer passed for aPoint" ) );
x = aPoint->x;
y = aPoint->y;
+4 -2
View File
@@ -38,7 +38,8 @@ SGCOLORS::SGCOLORS( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOLORS (type %s)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@@ -259,7 +260,8 @@ bool SGCOLORS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
+4 -2
View File
@@ -40,7 +40,8 @@ SGCOORDS::SGCOORDS( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGCOORDS (type %s)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
@@ -261,7 +262,8 @@ bool SGCOORDS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
+100 -75
View File
@@ -52,8 +52,10 @@ SGFACESET::SGFACESET( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)",
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] inappropriate parent to SGFACESET (type %s)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_SHAPE == aParent->GetNodeType() )
{
@@ -252,7 +254,7 @@ void SGFACESET::unlinkNode( const SGNODE* aNode, bool isChild )
}
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ );
}
@@ -283,7 +285,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_Colors && aNode != m_RColors )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -312,7 +314,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_Coords && aNode != m_RCoords )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Colors nodes",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Colors nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -341,7 +343,7 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_Normals && aNode != m_RNormals )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Normals nodes",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Normals nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -370,7 +372,8 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_CoordIndices )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes",
wxLogTrace( MASK_3D_SG,
wxT( "%s:%s:%d * [BUG] assigning multiple CoordIndex nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -385,8 +388,10 @@ bool SGFACESET::addNode( SGNODE* aNode, bool isChild )
return true;
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object type '%s' is not a valid type for "
"this object '%d'", __FILE__, __FUNCTION__, __LINE__, aNode->GetName(),
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object type '%s' is not a valid type for "
"this object '%d'" ),
__FILE__, __FUNCTION__, __LINE__,
aNode->GetName(),
aNode->GetNodeType() );
return false;
@@ -509,7 +514,8 @@ bool SGFACESET::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
@@ -597,7 +603,7 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( m_Coords || m_RCoords || m_CoordIndices || m_Colors || m_RColors || m_Normals
|| m_RNormals )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] non-empty node",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] non-empty node" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -611,9 +617,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( ( items[0] && items[1] ) || ( items[3] && items[4] ) || ( items[5] && items[6] ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
"at position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -624,9 +631,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child coords tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child coords tag at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -636,9 +644,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Coords->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; corrupt data while reading coords '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; corrupt data while "
"reading coords '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -648,9 +657,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_COORDS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref coords tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref coords tag at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -659,18 +669,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; cannot find ref coords '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; cannot find ref "
"coords '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_COORDS != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; type is not SGCOORDS "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -683,9 +695,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_COORDINDEX != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad coord index tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad coord index tag at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -695,9 +708,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_CoordIndices->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading coord index '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading coord "
"index '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -707,9 +721,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child normals tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child normals tag "
"at position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -719,9 +734,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Normals->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading normals '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading normals "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -731,9 +747,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_NORMALS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref normals tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref normals tag at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -742,18 +759,19 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt: cannot find ref normals '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: cannot find ref normals "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_NORMALS != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt: type is not SGNORMALS '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -766,9 +784,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child colors tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child colors tag "
"at position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -778,9 +797,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Colors->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading colors '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading colors "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -790,9 +810,10 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_COLORS != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref colors tag at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref colors tag at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return false;
}
@@ -801,18 +822,20 @@ bool SGFACESET::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref colors '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref colors "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_COLORS != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGCOLORS "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -839,8 +862,8 @@ bool SGFACESET::validate( void )
|| ( nullptr == m_Normals && nullptr == m_RNormals )
|| ( nullptr == m_CoordIndices ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] bad model; no vertices, vertex indices, or normals",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertices, vertex indices, "
"or normals" ),
__FILE__, __FUNCTION__, __LINE__ );
validated = true;
@@ -860,7 +883,7 @@ bool SGFACESET::validate( void )
if( nCoords < 3 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; fewer than 3 vertices",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; fewer than 3 vertices" ),
__FILE__, __FUNCTION__, __LINE__ );
validated = true;
@@ -875,8 +898,8 @@ bool SGFACESET::validate( void )
if( nCIdx < 3 || ( nCIdx % 3 > 0 ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] bad model; no vertex indices or not multiple of 3",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; no vertex indices or not "
"multiple of 3" ),
__FILE__, __FUNCTION__, __LINE__ );
validated = true;
@@ -889,7 +912,8 @@ bool SGFACESET::validate( void )
{
if( lCIdx[i] < 0 || lCIdx[i] >= (int)nCoords )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; vertex index out of bounds",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; vertex index out of "
"bounds" ),
__FILE__, __FUNCTION__, __LINE__ );
validated = true;
@@ -910,10 +934,11 @@ bool SGFACESET::validate( void )
if( nNorms != nCoords )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] bad model; number of normals (%ul) does not match "
"number of vertices (%ul)", __FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( nNorms ), static_cast<unsigned long>( nCoords ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; number of normals (%ul) does "
"not match number of vertices (%ul)" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( nNorms ),
static_cast<unsigned long>( nCoords ) );
validated = true;
valid = false;
+19 -18
View File
@@ -199,9 +199,10 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( '[' != schar )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; missing left bracket at position %d",
__FILE__, __FUNCTION__, __LINE__, static_cast<int>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; missing left bracket at "
"position %d" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<int>( aFile.tellg() ) );
return S3D::SGTYPE_END;
}
@@ -217,8 +218,8 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( schar != ']' )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; could not find right bracket",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; could not find right "
"bracket" ),
__FILE__, __FUNCTION__, __LINE__ );
return S3D::SGTYPE_END;
@@ -229,9 +230,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
if( std::string::npos == upos )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no underscore in name '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return S3D::SGTYPE_END;
}
@@ -255,9 +256,9 @@ S3D::SGTYPES S3D::ReadTag( std::istream& aFile, std::string& aName )
return types[i];
}
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; no node type matching '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; no node type matching '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return S3D::SGTYPE_END;
}
@@ -356,8 +357,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( vsize < 3 )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] invalid vertex set (fewer than 3 vertices)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid vertex set (fewer than 3 "
"vertices)" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -367,7 +368,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( 0 != isize % 3 || index.empty() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] invalid index set (not multiple of 3)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] invalid index set (not multiple of 3)" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -375,7 +376,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( !norms.empty() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] normals set is not empty",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] normals set is not empty" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -398,7 +399,7 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
ostr << " * [INFO] invalid index set; index out of bounds";
wxLogTrace( MASK_3D_SG, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_SG, wxT( "%s\n" ), ostr.str().c_str() );
#endif
return false;
@@ -481,8 +482,8 @@ bool S3D::CalcTriangleNormals( std::vector< SGPOINT > coords, std::vector< int >
if( norms.size() != coords.size() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [BUG] number of normals does not equal number of vertices",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] number of normals does not equal number "
"of vertices" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
+7 -5
View File
@@ -35,8 +35,10 @@ SGINDEX::SGINDEX( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type '%d')",
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGINDEX (type "
"'%d')" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
}
}
@@ -182,8 +184,8 @@ bool SGINDEX::writeCoordIndex( std::ostream& aFile )
{
size_t n = index.size();
wxCHECK_MSG( n % 3 == 0, false,
"Coordinate index is not divisible by three (violates triangle constraint)" );
wxCHECK_MSG( n % 3 == 0, false, wxT( "Coordinate index is not divisible by three (violates "
"triangle constraint)" ) );
aFile << " coordIndex [\n ";
@@ -281,7 +283,7 @@ bool SGINDEX::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
+7 -5
View File
@@ -196,9 +196,11 @@ void SGNODE::delNodeRef( const SGNODE* aNode )
return;
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] delNodeRef() did not find its target, "
"this node type %d, referenced node type %d", __FILE__, __FUNCTION__, __LINE__,
m_SGtype, aNode->GetNodeType() );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] delNodeRef() did not find its target, this "
"node type %d, referenced node type %d" ),
__FILE__, __FUNCTION__, __LINE__,
m_SGtype,
aNode->GetNodeType() );
}
@@ -212,8 +214,8 @@ void SGNODE::AssociateWrapper( SGNODE** aWrapperRef ) noexcept
{
*m_Association = nullptr;
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [WARNING] association being broken with previous wrapper",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [WARNING] association being broken with "
"previous wrapper" ),
__FILE__, __FUNCTION__, __LINE__ );
}
+5 -3
View File
@@ -38,8 +38,10 @@ SGNORMALS::SGNORMALS( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS (type %d)",
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGNORMALS "
"(type %d)" ),
__FILE__, __FUNCTION__, __LINE__,
aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_FACESET == aParent->GetNodeType() )
{
@@ -253,7 +255,7 @@ bool SGNORMALS::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad stream",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
+45 -36
View File
@@ -49,7 +49,7 @@ SGSHAPE::SGSHAPE( SGNODE* aParent ) : SGNODE( aParent )
{
m_Parent = nullptr;
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] inappropriate parent to SGSHAPE (type %d)" ),
__FILE__, __FUNCTION__, __LINE__, aParent->GetNodeType() );
}
else if( nullptr != aParent && S3D::SGTYPE_TRANSFORM == aParent->GetNodeType() )
@@ -195,7 +195,7 @@ void SGSHAPE::unlinkNode( const SGNODE* aNode, bool isChild )
}
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] unlinkNode() did not find its target",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] unlinkNode() did not find its target" ),
__FILE__, __FUNCTION__, __LINE__ );
}
@@ -222,7 +222,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_Appearance && aNode != m_RAppearance )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple Appearance nodes",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple Appearance "
"nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -251,7 +252,7 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
{
if( aNode != m_FaceSet && aNode != m_RFaceSet )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] assigning multiple FaceSet nodes",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] assigning multiple FaceSet nodes" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
@@ -274,7 +275,8 @@ bool SGSHAPE::addNode( SGNODE* aNode, bool isChild )
return true;
}
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] object %s is not a valid type for this object (%d)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] object %s is not a valid type for this "
"object (%d)" ),
__FILE__, __FUNCTION__, __LINE__, aNode->GetName(), aNode->GetNodeType() );
return false;
@@ -378,7 +380,8 @@ bool SGSHAPE::WriteCache( std::ostream& aFile, SGNODE* parentNode )
if( !aFile.good() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [BUG] bad stream", __FILE__, __FUNCTION__, __LINE__ );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [BUG] bad stream" ),
__FILE__, __FUNCTION__, __LINE__ );
return false;
}
@@ -454,9 +457,10 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( ( items[0] && items[1] ) || ( items[2] && items[3] ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; multiple item definitions at position %ul",
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( aFile.tellg() ) );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; multiple item definitions "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
return false;
}
@@ -467,8 +471,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child appearance tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child appearance "
"tag at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -480,7 +484,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_Appearance->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] corrupt data while reading appearance '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading appearance "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name );
return false;
@@ -491,8 +496,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_APPEARANCE != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref appearance tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref appearance tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -503,18 +508,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref appearance '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref "
"appearance '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_APPEARANCE != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGAPPEARANCE '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not "
"SGAPPEARANCE '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -527,8 +534,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad child face set tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad child face set tag "
"at position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -540,8 +547,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !m_FaceSet->ReadCache( aFile, this ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data while reading face set '%s'",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data while reading face set "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__, name );
return false;
@@ -552,8 +559,8 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
{
if( S3D::SGTYPE_FACESET != S3D::ReadTag( aFile, name ) )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data; bad ref face set tag at position %ul",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data; bad ref face set tag at "
"position %ul" ),
__FILE__, __FUNCTION__, __LINE__,
static_cast<unsigned long>( aFile.tellg() ) );
@@ -564,18 +571,20 @@ bool SGSHAPE::ReadCache( std::istream& aFile, SGNODE* parentNode )
if( !np )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: cannot find ref face set '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: cannot find ref face "
"set '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
if( S3D::SGTYPE_FACESET != np->GetNodeType() )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] corrupt data: type is not SGFACESET '%s'",
__FILE__, __FUNCTION__, __LINE__, name );
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] corrupt data: type is not SGFACESET "
"'%s'" ),
__FILE__, __FUNCTION__, __LINE__,
name );
return false;
}
@@ -612,7 +621,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( !pf->validate() )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; inconsistent data",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; inconsistent data" ),
__FILE__, __FUNCTION__, __LINE__ );
return true;
@@ -665,8 +674,8 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( nColors < nCoords )
{
wxLogTrace( MASK_3D_SG,
"%s:%s:%d * [INFO] bad model; not enough colors per vertex (%ul vs %ul)",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough colors per "
"vertex (%ul vs %ul)" ),
__FILE__, __FUNCTION__, __LINE__, static_cast<unsigned long>( nColors ),
static_cast<unsigned long>( nCoords ) );
@@ -697,7 +706,7 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
if( vertices.size() < 3 )
{
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] bad model; not enough vertices",
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] bad model; not enough vertices" ),
__FILE__, __FUNCTION__, __LINE__ );
return true;
+62 -62
View File
@@ -164,49 +164,49 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
list.push_back( CUSTOM_COLOR_ITEM( r/255.0, g/255.0, b/255.0, a, name ) )
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, NotSpecifiedPrm() ); // White
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, "Green" );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, "Red" );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, "Blue" );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, "Black" );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, "White" );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, "Purple" );
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, "Yellow" );
ADD_COLOR( g_SilkscreenColors, 20, 51, 36, 1.0, wxT( "Green" ) );
ADD_COLOR( g_SilkscreenColors, 181, 19, 21, 1.0, wxT( "Red" ) );
ADD_COLOR( g_SilkscreenColors, 2, 59, 162, 1.0, wxT( "Blue" ) );
ADD_COLOR( g_SilkscreenColors, 11, 11, 11, 1.0, wxT( "Black" ) );
ADD_COLOR( g_SilkscreenColors, 245, 245, 245, 1.0, wxT( "White" ) );
ADD_COLOR( g_SilkscreenColors, 32, 2, 53, 1.0, wxT( "Purple" ) );
ADD_COLOR( g_SilkscreenColors, 194, 195, 0, 1.0, wxT( "Yellow" ) );
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, NotSpecifiedPrm() ); // Green
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, "Green" );
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, "Light Green" );
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, "Saturated Green" );
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, "Red" );
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, "Light Red" );
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, "Red/Orange" );
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, "Blue" );
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, "Light Blue 1" );
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, "Light Blue 2" );
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, "Green/Blue" );
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, "Black" );
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, "White" );
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, "Purple" );
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, "Light Purple" );
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, "Yellow" );
ADD_COLOR( g_MaskColors, 20, 51, 36, 0.83, wxT( "Green" ) );
ADD_COLOR( g_MaskColors, 91, 168, 12, 0.83, wxT( "Light Green" ) );
ADD_COLOR( g_MaskColors, 13, 104, 11, 0.83, wxT( "Saturated Green" ) );
ADD_COLOR( g_MaskColors, 181, 19, 21, 0.83, wxT( "Red" ) );
ADD_COLOR( g_MaskColors, 210, 40, 14, 0.83, wxT( "Light Red" ) );
ADD_COLOR( g_MaskColors, 239, 53, 41, 0.83, wxT( "Red/Orange" ) );
ADD_COLOR( g_MaskColors, 2, 59, 162, 0.83, wxT( "Blue" ) );
ADD_COLOR( g_MaskColors, 54, 79, 116, 0.83, wxT( "Light Blue 1" ) );
ADD_COLOR( g_MaskColors, 61, 85, 130, 0.83, wxT( "Light Blue 2" ) );
ADD_COLOR( g_MaskColors, 21, 70, 80, 0.83, wxT( "Green/Blue" ) );
ADD_COLOR( g_MaskColors, 11, 11, 11, 0.83, wxT( "Black" ) );
ADD_COLOR( g_MaskColors, 245, 245, 245, 0.83, wxT( "White" ) );
ADD_COLOR( g_MaskColors, 32, 2, 53, 0.83, wxT( "Purple" ) );
ADD_COLOR( g_MaskColors, 119, 31, 91, 0.83, wxT( "Light Purple" ) );
ADD_COLOR( g_MaskColors, 194, 195, 0, 0.83, wxT( "Yellow" ) );
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, "Grey" );
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, "Dark Grey" );
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, "Silver" );
ADD_COLOR( g_PasteColors, 128, 128, 128, 1.0, wxT( "Grey" ) );
ADD_COLOR( g_PasteColors, 90, 90, 90, 1.0, wxT( "Dark Grey" ) );
ADD_COLOR( g_PasteColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, "Copper" );
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, "Gold" );
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, "Silver" );
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, "Tin" );
ADD_COLOR( g_FinishColors, 184, 115, 50, 1.0, wxT( "Copper" ) );
ADD_COLOR( g_FinishColors, 178, 156, 0, 1.0, wxT( "Gold" ) );
ADD_COLOR( g_FinishColors, 213, 213, 213, 1.0, wxT( "Silver" ) );
ADD_COLOR( g_FinishColors, 160, 160, 160, 1.0, wxT( "Tin" ) );
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, "FR4 natural, dark" );
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, "FR4 natural" );
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, "PTFE natural" );
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, "Polyimide" );
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, "Phenolic natural" );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 1" );
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, "Brown 2" );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, "Brown 3" );
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, "Aluminum" );
ADD_COLOR( g_BoardColors, 51, 43, 22, 0.83, wxT( "FR4 natural, dark" ) );
ADD_COLOR( g_BoardColors, 109, 116, 75, 0.83, wxT( "FR4 natural" ) );
ADD_COLOR( g_BoardColors, 252, 252, 250, 0.90, wxT( "PTFE natural" ) );
ADD_COLOR( g_BoardColors, 205, 130, 0, 0.68, wxT( "Polyimide" ) );
ADD_COLOR( g_BoardColors, 92, 17, 6, 0.90, wxT( "Phenolic natural" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 1" ) );
ADD_COLOR( g_BoardColors, 160, 123, 54, 0.83, wxT( "Brown 2" ) );
ADD_COLOR( g_BoardColors, 146, 99, 47, 0.83, wxT( "Brown 3" ) );
ADD_COLOR( g_BoardColors, 213, 213, 213, 1.0, wxT( "Aluminum" ) );
g_DefaultBackgroundTop = COLOR4D( 0.80, 0.80, 0.90, 1.0 );
g_DefaultBackgroundBot = COLOR4D( 0.40, 0.40, 0.50, 1.0 );
@@ -559,7 +559,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
auto findColor =
[]( const wxString& aColorName, const CUSTOM_COLORS_LIST& aColorSet )
{
if( aColorName.StartsWith( "#" ) )
if( aColorName.StartsWith( wxT( "#" ) ) )
{
return KIGFX::COLOR4D( aColorName );
}
@@ -608,28 +608,28 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
KIGFX::COLOR4D layerColor = COLOR4D::UNSPECIFIED;
const wxString& materialName = stackupItem->GetMaterial();
if( materialName.StartsWith( "FR4" ) )
if( materialName.StartsWith( wxT( "FR4" ) ) )
{
layerColor = findColor( "FR4 natural", g_BoardColors );
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
}
else if( materialName.IsSameAs( "PTFE" )
|| materialName.IsSameAs( "Teflon" ) )
else if( materialName.IsSameAs( wxT( "PTFE" ) )
|| materialName.IsSameAs( wxT( "Teflon" ) ) )
{
layerColor = findColor( "PTFE natural", g_BoardColors );
layerColor = findColor( wxT( "PTFE natural" ), g_BoardColors );
}
else if( materialName.IsSameAs( "Polyimide" )
|| materialName.IsSameAs( "Kapton" ) )
else if( materialName.IsSameAs( wxT( "Polyimide" ) )
|| materialName.IsSameAs( wxT( "Kapton" ) ) )
{
layerColor = findColor( "Polyimide", g_BoardColors );
layerColor = findColor( wxT( "Polyimide" ), g_BoardColors );
}
else if( materialName.IsSameAs( "Al" ) )
else if( materialName.IsSameAs( wxT( "Al" ) ) )
{
layerColor = findColor( "Aluminum", g_BoardColors );
layerColor = findColor( wxT( "Aluminum" ), g_BoardColors );
}
else // A default color value for unknown dielectric material
// (i.e. an exotic name entered by hand)
{
layerColor = findColor( "FR4 natural", g_BoardColors );
layerColor = findColor( wxT( "FR4 natural" ), g_BoardColors );
}
if( bodyColor == COLOR4D( 0, 0, 0, 0 ) )
@@ -653,25 +653,25 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
const wxString& finishName = stackup.m_FinishType;
if( finishName.EndsWith( "OSP" ) )
if( finishName.EndsWith( wxT( "OSP" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( "Copper", g_FinishColors ) );
m_CopperColor = to_SFVEC4F( findColor( wxT( "Copper" ), g_FinishColors ) );
}
else if( finishName.EndsWith( "IG" )
|| finishName.EndsWith( "gold" ) )
else if( finishName.EndsWith( wxT( "IG" ) )
|| finishName.EndsWith( wxT( "gold" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( "Gold", g_FinishColors ) );
m_CopperColor = to_SFVEC4F( findColor( wxT( "Gold" ), g_FinishColors ) );
}
else if( finishName.StartsWith( "HAL" )
|| finishName.StartsWith( "HASL" )
|| finishName.EndsWith( "tin" )
|| finishName.EndsWith( "nickel" ) )
else if( finishName.StartsWith( wxT( "HAL" ) )
|| finishName.StartsWith( wxT( "HASL" ) )
|| finishName.EndsWith( wxT( "tin" ) )
|| finishName.EndsWith( wxT( "nickel" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( "Tin", g_FinishColors ) );
m_CopperColor = to_SFVEC4F( findColor( wxT( "Tin" ), g_FinishColors ) );
}
else if( finishName.EndsWith( "silver" ) )
else if( finishName.EndsWith( wxT( "silver" ) ) )
{
m_CopperColor = to_SFVEC4F( findColor( "Silver", g_FinishColors ) );
m_CopperColor = to_SFVEC4F( findColor( wxT( "Silver" ), g_FinishColors ) );
}
else
{
@@ -347,7 +347,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
-seg->GetSeg().A.y * m_biuTo3Dunits );
const SFVEC2F end3DU ( seg->GetSeg().B.x * m_biuTo3Dunits,
-seg->GetSeg().B.y * m_biuTo3Dunits );
const int width = seg->GetWidth() + clearance.x * 2;
const double width = seg->GetWidth() + clearance.x * 2;
// Cannot add segments that have the same start and end point
if( Is_segment_a_circle( start3DU, end3DU ) )
@@ -368,7 +368,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
case SH_CIRCLE:
{
const SHAPE_CIRCLE* circle = (SHAPE_CIRCLE*) shape;
const int radius = circle->GetRadius() + clearance.x;
const double radius = circle->GetRadius() + clearance.x;
const SFVEC2F center( circle->GetCenter().x * m_biuTo3Dunits,
-circle->GetCenter().y * m_biuTo3Dunits );
@@ -409,7 +409,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
-seg.GetSeg().A.y * m_biuTo3Dunits );
const SFVEC2F end3DU( seg.GetSeg().B.x * m_biuTo3Dunits,
-seg.GetSeg().B.y * m_biuTo3Dunits );
const int width = arc->GetWidth() + clearance.x * 2;
const double width = arc->GetWidth() + clearance.x * 2;
// Cannot add segments that have the same start and end point
if( Is_segment_a_circle( start3DU, end3DU ) )
@@ -429,7 +429,7 @@ void BOARD_ADAPTER::createPadWithClearance( const PAD* aPad, CONTAINER_2D_BASE*
break;
default:
wxFAIL_MSG( "BOARD_ADAPTER::createPadWithClearance no implementation for "
wxFAIL_MSG( wxT( "BOARD_ADAPTER::createPadWithClearance no implementation for " )
+ SHAPE_TYPE_asString( shape->Type() ) );
break;
}
@@ -459,7 +459,7 @@ OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue
if( drillSize.x == drillSize.y ) // usual round hole
{
const int radius = ( drillSize.x / 2 ) + aInflateValue;
const double radius = ( drillSize.x / 2.0 ) + aInflateValue;
const SFVEC2F center( aPad->GetPosition().x * m_biuTo3Dunits,
-aPad->GetPosition().y * m_biuTo3Dunits );
@@ -470,7 +470,7 @@ OBJECT_2D* BOARD_ADAPTER::createPadWithDrill( const PAD* aPad, int aInflateValue
else // Oblong hole
{
const SHAPE_SEGMENT* seg = aPad->GetEffectiveHoleShape();
float width = seg->GetWidth() + aInflateValue * 2;
double width = seg->GetWidth() + aInflateValue * 2;
SFVEC2F start3DU( seg->GetSeg().A.x * m_biuTo3Dunits,
-seg->GetSeg().A.y * m_biuTo3Dunits );
@@ -493,15 +493,10 @@ void BOARD_ADAPTER::addPadsWithClearance( const FOOTPRINT* aFootprint,
{
for( PAD* pad : aFootprint->Pads() )
{
if( !pad->IsOnLayer( aLayerId ) )
if( !pad->FlashLayer( aLayerId ) )
continue;
// Skip pad annulus when not connected on this layer (if removing is enabled)
if( !pad->FlashLayer( aLayerId ) && IsCopperLayer( aLayerId ) )
continue;
// NPTH pads are not drawn on layers if the
// shape size and pos is the same as their hole:
// NPTH pads are not drawn on layers if the shape size and pos is the same as their hole:
if( aSkipNPTHPadsWihNoCopper && ( pad->GetAttribute() == PAD_ATTRIB::NPTH ) )
{
if( pad->GetDrillSize() == pad->GetSize() && pad->GetOffset() == wxPoint( 0, 0 ) )
@@ -526,19 +521,28 @@ void BOARD_ADAPTER::addPadsWithClearance( const FOOTPRINT* aFootprint,
}
}
const bool isPlated = ( ( aLayerId == F_Cu ) && pad->FlashLayer( F_Mask ) ) ||
( ( aLayerId == B_Cu ) && pad->FlashLayer( B_Mask ) );
if( aSkipPlatedPads && isPlated )
continue;
if( aSkipNonPlatedPads && !isPlated )
continue;
wxSize margin( aInflateValue, aInflateValue );
switch( aLayerId )
{
case F_Cu:
if( aSkipPlatedPads && pad->FlashLayer( F_Mask ) )
continue;
if( aSkipNonPlatedPads && !pad->FlashLayer( F_Mask ) )
continue;
break;
case B_Cu:
if( aSkipPlatedPads && pad->FlashLayer( B_Mask ) )
continue;
if( aSkipNonPlatedPads && !pad->FlashLayer( B_Mask ) )
continue;
break;
case F_Mask:
case B_Mask:
margin.x += pad->GetSolderMaskMargin();
@@ -567,7 +571,7 @@ void BOARD_ADAPTER::transformArcToSegments( const wxPoint& aCentre, const wxPoin
const BOARD_ITEM& aBoardItem )
{
wxPoint arc_start, arc_end;
int delta = 3600 / aCircleToSegmentsCount; // rotate angle in 0.1 degree
double delta = 3600 / aCircleToSegmentsCount; // rotate angle in 0.1 degree
arc_end = arc_start = aStart;
@@ -586,7 +590,7 @@ void BOARD_ADAPTER::transformArcToSegments( const wxPoint& aCentre, const wxPoin
wxPoint curr_end = arc_start;
wxPoint curr_start = arc_start;
for( int ii = delta; ii < aArcAngle; ii += delta )
for( double ii = delta; ii < aArcAngle; ii += delta )
{
curr_end = arc_start;
RotatePoint( &curr_end, aCentre, -ii );
@@ -636,7 +640,7 @@ void BOARD_ADAPTER::addShapeWithClearance( const PCB_SHAPE* aShape,
{
// The full width of the lines to create
// The extra 1 protects the inner/outer radius values from degeneracy
const int linewidth = aShape->GetWidth() + ( 2 * aClearanceValue ) + 1;
const double linewidth = aShape->GetWidth() + ( 2 * aClearanceValue ) + 1;
switch( aShape->GetShape() )
{
@@ -738,7 +742,7 @@ void BOARD_ADAPTER::addShapeWithClearance( const PCB_SHAPE* aShape,
break;
default:
wxFAIL_MSG( "BOARD_ADAPTER::addShapeWithClearance no implementation for "
wxFAIL_MSG( wxT( "BOARD_ADAPTER::addShapeWithClearance no implementation for " )
+ aShape->SHAPE_T_asString() );
break;
}
@@ -831,9 +835,9 @@ void BOARD_ADAPTER::buildPadOutlineAsSegments( const PAD* aPad, CONTAINER_2D_BAS
const SFVEC2F center3DU( aPad->ShapePos().x * m_biuTo3Dunits,
-aPad->ShapePos().y * m_biuTo3Dunits );
const int radius = aPad->GetSize().x / 2;
const float inner_radius = ( radius - aWidth / 2 ) * m_biuTo3Dunits;
const float outer_radius = ( radius + aWidth / 2 ) * m_biuTo3Dunits;
const double radius = aPad->GetSize().x / 2.0;
const float inner_radius = ( radius - aWidth / 2.0 ) * m_biuTo3Dunits;
const float outer_radius = ( radius + aWidth / 2.0 ) * m_biuTo3Dunits;
aDstContainer->Add( new RING_2D( center3DU, inner_radius, outer_radius, *aPad ) );
+2 -3
View File
@@ -549,7 +549,6 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
for( FOOTPRINT* footprint : m_board->Footprints() )
{
addPadsWithClearance( footprint, m_platedPadsFront, F_Cu, 0, true, false, true );
addPadsWithClearance( footprint, m_platedPadsBack, B_Cu, 0, true, false, true );
}
@@ -569,8 +568,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// Add pads to polygon list
for( FOOTPRINT* footprint : m_board->Footprints() )
{
// Note: NPTH pads are not drawn on copper layers when the pad
// has same shape as its hole
// Note: NPTH pads are not drawn on copper layers when the pad has same shape as
// its hole
footprint->TransformPadsWithClearanceToPolygon( *layerPoly, curr_layer_id,
0, ARC_HIGH_DEF, ERROR_INSIDE,
true, renderPlatedPadsAsPlated,
+16 -15
View File
@@ -114,7 +114,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
m_accelerator3DShapes( nullptr ),
m_currentRollOverItem( nullptr )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::EDA_3D_CANVAS" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::EDA_3D_CANVAS" ) );
m_editing_timeout_timer.SetOwner( this );
Connect( m_editing_timeout_timer.GetId(), wxEVT_TIMER,
@@ -167,7 +167,7 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const int* aAttribList,
EDA_3D_CANVAS::~EDA_3D_CANVAS()
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::~EDA_3D_CANVAS" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::~EDA_3D_CANVAS" ) );
delete m_accelerator3DShapes;
m_accelerator3DShapes = nullptr;
@@ -214,7 +214,7 @@ void EDA_3D_CANVAS::OnResize( wxSizeEvent& event )
bool EDA_3D_CANVAS::initializeOpenGL()
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL" ) );
const GLenum err = glewInit();
@@ -228,13 +228,13 @@ bool EDA_3D_CANVAS::initializeOpenGL()
}
else
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s",
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::initializeOpenGL Using GLEW version %s" ),
FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
wxString version = FROM_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL version string %s.",
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
__WXFUNCTION__, version );
// Extract OpenGL version from string. This method is used because prior to OpenGL 2,
@@ -250,7 +250,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
tmp = tokenizer.GetNextToken();
tokenizer.SetString( tmp, wxString( "." ) );
tokenizer.SetString( tmp, wxString( wxT( "." ) ) );
if( tokenizer.HasMoreTokens() )
tokenizer.GetNextToken().ToLong( &major );
@@ -260,7 +260,7 @@ bool EDA_3D_CANVAS::initializeOpenGL()
if( major < 2 || ( ( major == 2 ) && ( minor < 1 ) ) )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL ray tracing not supported.",
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL ray tracing not supported." ),
__WXFUNCTION__ );
if( GetParent() )
@@ -274,7 +274,8 @@ bool EDA_3D_CANVAS::initializeOpenGL()
if( ( major == 1 ) && ( minor < 5 ) )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::%s OpenGL not supported.", __WXFUNCTION__ );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL not supported." ),
__WXFUNCTION__ );
m_is_opengl_version_supported = false;
}
@@ -327,10 +328,10 @@ void EDA_3D_CANVAS::DisplayStatus()
{
wxString msg;
msg.Printf( "dx %3.2f", m_camera.GetCameraPos().x );
msg.Printf( wxT( "dx %3.2f" ), m_camera.GetCameraPos().x );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::X_POS ) );
msg.Printf( "dy %3.2f", m_camera.GetCameraPos().y );
msg.Printf( wxT( "dy %3.2f" ), m_camera.GetCameraPos().y );
m_parentStatusBar->SetStatusText( msg, static_cast<int>( EDA_3D_VIEWER_STATUSBAR::Y_POS ) );
}
}
@@ -351,7 +352,7 @@ void EDA_3D_CANVAS::DoRePaint()
// SwapBuffer requires the window to be shown before calling
if( !IsShownOnScreen() )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::DoRePaint !IsShown" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::DoRePaint !IsShown" ) );
m_is_currently_painting.clear();
return;
}
@@ -518,7 +519,7 @@ void EDA_3D_CANVAS::DoRePaint()
if( m_render_pivot )
{
const float scale = glm::min( m_camera.GetZoom(), 1.0f );
render_pivot( curtime_delta_s, scale * scale );
render_pivot( curtime_delta_s, scale );
}
// "Swaps the double-buffer of this window, making the back-buffer the
@@ -577,7 +578,7 @@ void EDA_3D_CANVAS::OnEvent( wxEvent& aEvent )
void EDA_3D_CANVAS::OnEraseBackground( wxEraseEvent& event )
{
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnEraseBackground" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnEraseBackground" ) );
// Do nothing, to avoid flashing.
}
@@ -586,7 +587,7 @@ void EDA_3D_CANVAS::OnMouseWheel( wxMouseEvent& event )
{
bool mouseActivity = false;
wxLogTrace( m_logTrace, "EDA_3D_CANVAS::OnMouseWheel" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::OnMouseWheel" ) );
if( m_camera_is_moving )
return;
@@ -782,7 +783,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
m_3d_render_opengl->SetCurrentRollOverItem( nullptr );
Request_refresh();
reporter.Report( "" );
reporter.Report( wxEmptyString );
}
m_currentRollOverItem = nullptr;
@@ -102,7 +102,6 @@ void EDA_3D_CANVAS::render_pivot( float t , float aScale )
glTranslatef( lookAtPos.x, lookAtPos.y, lookAtPos.z );
glScalef( aScale, aScale, aScale );
pivot_render_triangles( t * 0.5f );
t = t * 0.80f;
+1 -1
View File
@@ -41,7 +41,7 @@ static void dbg_save_rgb_buffer( const wxString& aFileName, unsigned char *aRGBp
wxImage image( aXSize, aYSize );
image.SetData( aRGBpixelBuffer );
image = image.Mirror( false );
image.SaveFile( aFileName + ".png", wxBITMAP_TYPE_PNG );
image.SaveFile( aFileName + wxT( ".png" ), wxBITMAP_TYPE_PNG );
image.Destroy();
}
+33 -11
View File
@@ -276,7 +276,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateHoles( const LIST_OBJECT2D& aListH
break;
default:
wxFAIL_MSG( "RENDER_3D_OPENGL::generateHoles: Object type is not implemented" );
wxFAIL_MSG( wxT( "RENDER_3D_OPENGL::generateHoles: Object type not implemented" ) );
break;
}
}
@@ -358,7 +358,7 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
break;
default:
wxFAIL_MSG( "RENDER_3D_OPENGL: Object type is not implemented" );
wxFAIL_MSG( wxT( "RENDER_3D_OPENGL: Object type is not implemented" ) );
break;
}
}
@@ -374,6 +374,22 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateLayerList( const BVH_CONTAINER_2D*
}
OPENGL_RENDER_LIST* RENDER_3D_OPENGL::generateEmptyLayerList( PCB_LAYER_ID aLayerId )
{
float layer_z_bot = 0.0f;
float layer_z_top = 0.0f;
getLayerZPos( aLayerId, layer_z_top, layer_z_bot );
TRIANGLE_DISPLAY_LIST* layerTriangles = new TRIANGLE_DISPLAY_LIST( 1 );
// store in a list so it will be latter deleted
m_triangles.push_back( layerTriangles );
return new OPENGL_RENDER_LIST( *layerTriangles, m_circleTexture, layer_z_bot, layer_z_top );
}
OPENGL_RENDER_LIST* RENDER_3D_OPENGL::createBoard( const SHAPE_POLY_SET& aBoardPoly,
const BVH_CONTAINER_2D* aThroughHoles )
{
@@ -388,9 +404,8 @@ OPENGL_RENDER_LIST* RENDER_3D_OPENGL::createBoard( const SHAPE_POLY_SET& aBoardP
if( listBoardObject2d.size() > 0 )
{
// We will set a unitary Z so it will in future used with transformations
// since the board poly will be used not only to draw itself but also the
// solder mask layers.
// We will set a unitary Z so it will in future used with transformations since the
// board poly will be used not only to draw itself but also the solder mask layers.
const float layer_z_top = 1.0f;
const float layer_z_bot = 0.0f;
@@ -563,7 +578,7 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
const BVH_CONTAINER_2D* container2d = ii.second;
SHAPE_POLY_SET polyListSubtracted;
SHAPE_POLY_SET* aPolyList = nullptr;
SHAPE_POLY_SET* polyList = nullptr;
// Load the vertical (Z axis) component of shapes
@@ -580,9 +595,8 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
{
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetThroughHoleOdPolys(),
SHAPE_POLY_SET::PM_FAST );
polyListSubtracted.BooleanSubtract(
m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
SHAPE_POLY_SET::PM_FAST );
polyListSubtracted.BooleanSubtract( m_boardAdapter.GetOuterNonPlatedThroughHolePoly(),
SHAPE_POLY_SET::PM_FAST );
}
if( m_boardAdapter.GetFlag( FL_SUBTRACT_MASK_FROM_SILK ) )
@@ -600,10 +614,10 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
}
}
aPolyList = &polyListSubtracted;
polyList = &polyListSubtracted;
}
OPENGL_RENDER_LIST* oglList = generateLayerList( container2d, aPolyList, layer_id,
OPENGL_RENDER_LIST* oglList = generateLayerList( container2d, polyList, layer_id,
&m_boardAdapter.GetThroughHoleIds() );
if( oglList != nullptr )
@@ -626,6 +640,10 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
m_platedPadsFront = generateLayerList( m_boardAdapter.GetPlatedPadsFront(),
&polySubtracted, F_Cu );
// An entry for F_Cu must exist in m_layers or we'll never look at m_platedPadsFront
if( m_layers.count( F_Cu ) == 0 )
m_layers[F_Cu] = generateEmptyLayerList( F_Cu );
}
if( m_boardAdapter.GetBackPlatedPadPolys() )
@@ -640,6 +658,10 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
m_platedPadsBack = generateLayerList( m_boardAdapter.GetPlatedPadsBack(),
&polySubtracted, B_Cu );
// An entry for B_Cu must exist in m_layers or we'll never look at m_platedPadsBack
if( m_layers.count( B_Cu ) == 0 )
m_layers[B_Cu] = generateEmptyLayerList( B_Cu );
}
}
@@ -650,6 +650,7 @@ GLuint OPENGL_RENDER_LIST::generate_top_or_bot_seg_ends(
glDrawArrays( GL_TRIANGLES, 0, aTriangleContainer->GetVertexSize() );
glBindTexture( GL_TEXTURE_2D, 0 );
glDisable( GL_TEXTURE_2D );
glDisable( GL_ALPHA_TEST );
glDisable( GL_BLEND );
@@ -504,7 +504,7 @@ void RENDER_3D_OPENGL::setCopperMaterial()
void RENDER_3D_OPENGL::setPlatedCopperAndDepthOffset( PCB_LAYER_ID aLayer_id )
{
glEnable( GL_POLYGON_OFFSET_FILL );
glPolygonOffset(-0.1f, -2.0f );
glPolygonOffset( -0.1f, -2.0f );
setLayerMaterial( aLayer_id );
}
@@ -704,18 +704,16 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
{
pLayerDispList->DrawAllCameraCulled( m_camera.GetPos().z, drawMiddleSegments );
// Draw copper plated pads
if( ( ( layer_id == F_Cu ) || ( layer_id == B_Cu ) ) &&
( m_platedPadsFront || m_platedPadsBack ) )
setPlatedCopperAndDepthOffset( layer_id );
// Draw plated pads
if( layer_id == F_Cu && m_platedPadsFront )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsFront->DrawAllCameraCulled( m_camera.GetPos().z,
drawMiddleSegments );
}
else if( layer_id == B_Cu && m_platedPadsBack )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsBack->DrawAllCameraCulled( m_camera.GetPos().z,
drawMiddleSegments );
}
@@ -751,16 +749,10 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
viasHolesLayer,
m_antiBoard );
// Draw copper plated pads
if( ( ( layer_id == F_Cu ) || ( layer_id == B_Cu ) ) &&
( m_platedPadsFront || m_platedPadsBack ) )
{
setPlatedCopperAndDepthOffset( layer_id );
}
// Draw plated pads
if( layer_id == F_Cu && m_platedPadsFront )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsFront->DrawAllCameraCulledSubtractLayer(
drawMiddleSegments,
m_outerThroughHoles,
@@ -769,6 +761,7 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
}
else if( layer_id == B_Cu && m_platedPadsBack )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsBack->DrawAllCameraCulledSubtractLayer(
drawMiddleSegments,
m_outerThroughHoles,
@@ -785,21 +778,16 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
m_outerThroughHoles,
m_antiBoard );
// Draw copper plated pads
if( ( ( layer_id == F_Cu ) || ( layer_id == B_Cu ) ) &&
( m_platedPadsFront || m_platedPadsBack ) )
{
setPlatedCopperAndDepthOffset( layer_id );
}
if( layer_id == F_Cu && m_platedPadsFront )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsFront->DrawAllCameraCulledSubtractLayer( drawMiddleSegments,
m_outerThroughHoles,
m_antiBoard );
}
else if( layer_id == B_Cu && m_platedPadsBack )
{
setPlatedCopperAndDepthOffset( layer_id );
m_platedPadsBack->DrawAllCameraCulledSubtractLayer( drawMiddleSegments,
m_outerThroughHoles,
m_antiBoard );
@@ -938,7 +926,7 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
glTexEnvi( GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_PRIMARY_COLOR );
glTexEnvi( GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, GL_SRC_ALPHA );
glTexEnvi( GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_CONSTANT );
glTexEnvi( GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_CONSTANT );
glTexEnvi( GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, GL_SRC_ALPHA );
render3dModels( false, true );
render3dModels( true, true );
@@ -84,6 +84,8 @@ private:
PCB_LAYER_ID aLayerId,
const BVH_CONTAINER_2D* aThroughHoles = nullptr );
OPENGL_RENDER_LIST* generateEmptyLayerList( PCB_LAYER_ID aLayerId );
void addTopAndBottomTriangles( TRIANGLE_DISPLAY_LIST* aDst, const SFVEC2F& v0,
const SFVEC2F& v1, const SFVEC2F& v2, float top, float bot );
+4 -4
View File
@@ -192,9 +192,9 @@ const float& POST_SHADER::GetShadowFactorAt( const SFVEC2I& aPos ) const
void POST_SHADER::DebugBuffersOutputAsImages() const
{
DBG_SaveBuffer( "m_shadow_att_factor", m_shadow_att_factor, m_size.x, m_size.y );
DBG_SaveBuffer( "m_color", m_color, m_size.x, m_size.y );
DBG_SaveNormalsBuffer( "m_normals", m_normals, m_size.x, m_size.y );
DBG_SaveBuffer( wxT( "m_shadow_att_factor" ), m_shadow_att_factor, m_size.x, m_size.y );
DBG_SaveBuffer( wxT( "m_color" ), m_color, m_size.x, m_size.y );
DBG_SaveNormalsBuffer( wxT( "m_normals" ), m_normals, m_size.x, m_size.y );
// Normalize depth
float *normalizedDepth = (float*) malloc( m_size.x * m_size.y * sizeof( float ) );
@@ -210,7 +210,7 @@ void POST_SHADER::DebugBuffersOutputAsImages() const
}
}
DBG_SaveBuffer( "m_depthNormalized", normalizedDepth, m_size.x, m_size.y );
DBG_SaveBuffer( wxT( "m_depthNormalized" ), normalizedDepth, m_size.x, m_size.y );
free( normalizedDepth );
}
@@ -327,7 +327,7 @@ void RENDER_3D_RAYTRACE::render( GLubyte* ptrPBO, REPORTER* aStatusReporter )
break;
default:
wxASSERT_MSG( false, "Invalid state on m_renderState");
wxASSERT_MSG( false, wxT( "Invalid state on m_renderState" ) );
restartRenderState();
break;
}
+5 -5
View File
@@ -37,7 +37,7 @@
void EDA_3D_VIEWER_FRAME::CreateMenuBar()
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CreateMenuBar" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CreateMenuBar" ) );
COMMON_CONTROL* tool = m_toolManager->GetTool<COMMON_CONTROL>();
WX_MENUBAR* menuBar = new WX_MENUBAR();
@@ -48,12 +48,12 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
fileMenu->Add( _( "Export Current View as PNG..." ),
"",
wxEmptyString,
ID_MENU_SCREENCOPY_PNG,
BITMAPS::export_png );
fileMenu->Add( _( "Export Current View as JPEG..." ),
"",
wxEmptyString,
ID_MENU_SCREENCOPY_JPEG,
BITMAPS::export_file );
@@ -67,7 +67,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
ACTION_MENU* editMenu = new ACTION_MENU( false, tool );
editMenu->Add( _( "Copy 3D Image" ),
"",
wxEmptyString,
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
BITMAPS::copy );
@@ -109,7 +109,7 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
BITMAPS::tools,
ACTION_MENU::CHECK );
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
_( "Show preferences for all open tools" ),
wxID_PREFERENCES,
BITMAPS::preference );
+1 -1
View File
@@ -35,7 +35,7 @@
void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ) );
wxWindowUpdateLocker dummy( this );
+22 -19
View File
@@ -92,7 +92,7 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY *aKiway, PCB_BASE_FRAME *aParent
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s", aTitle );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s" ), aTitle );
m_disable_ray_tracing = false;
m_aboutTitle = _( "KiCad 3D Viewer" );
@@ -281,7 +281,7 @@ void EDA_3D_VIEWER_FRAME::refreshRender()
void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Exit3DFrame" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Exit3DFrame" ) );
Close( true );
}
@@ -289,7 +289,7 @@ void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event )
void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnCloseWindow" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnCloseWindow" ) );
if( m_canvas )
m_canvas->Close();
@@ -308,7 +308,8 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
int id = event.GetId();
bool isChecked = event.IsChecked();
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d isChecked %d",
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d "
"isChecked %d" ),
id,
isChecked );
@@ -341,7 +342,7 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
return;
default:
wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" );
wxFAIL_MSG( wxT( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ) );
return;
}
}
@@ -356,9 +357,9 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
else
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ",
( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "raytracing" :
"realtime" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s " ),
m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ? wxT( "raytracing" )
: wxT( "realtime" ) );
if( old_engine != m_boardAdapter.GetRenderEngine() )
RenderEngineChanged();
@@ -367,7 +368,8 @@ void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event )
void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::%s disabling ray tracing.", __WXFUNCTION__ );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::%s disabling ray tracing." ),
__WXFUNCTION__ );
m_disable_ray_tracing = true;
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
@@ -376,7 +378,7 @@ void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent )
void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnActivate" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnActivate" ) );
if( aEvent.GetActive() && m_canvas )
{
@@ -410,7 +412,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast<EDA_3D_VIEWER_SETTINGS*>( aCfg );
wxASSERT( cfg );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::LoadSettings" ) );
if( cfg )
{
@@ -503,8 +505,9 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
#if 0
RENDER_ENGINE engine = static_cast<RENDER_ENGINE>( cfg->m_Render.engine );
wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ?
"EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" :
"EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" );
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" )
:
wxT( "EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ) );
#else
m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL );
#endif
@@ -526,11 +529,11 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
EDA_BASE_FRAME::SaveSettings( cfg );
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::SaveSettings" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::SaveSettings" ) );
wxLogTrace( m_logTrace, m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ?
"EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" :
"EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" );
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" ) :
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ) );
if( cfg )
{
@@ -623,7 +626,7 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ) );
// Regen menu bars, etc
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
@@ -732,7 +735,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
{
wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" ) );
if( m_canvas )
m_canvas->RenderEngineChanged();
@@ -741,7 +744,7 @@ void EDA_3D_VIEWER_FRAME::RenderEngineChanged()
void EDA_3D_VIEWER_FRAME::loadCommonSettings()
{
wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" );
wxCHECK_RET( m_canvas, wxT( "Cannot load settings to null canvas" ) );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
@@ -29,7 +29,7 @@
using KIGFX::COLOR4D;
///! Update the schema version whenever a migration is required
const int viewer3dSchemaVersion = 1;
const int viewer3dSchemaVersion = 2;
EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
@@ -63,7 +63,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
// OpenGL options
m_params.emplace_back( new PARAM<bool>( "render.opengl_copper_thickness",
&m_Render.opengl_copper_thickness, true ) );
&m_Render.opengl_copper_thickness, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_show_model_bbox",
&m_Render.opengl_show_model_bbox, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_highlight_on_rollover",
@@ -202,6 +202,12 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS()
&m_Camera.projection_mode, 1 ) );
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
registerMigration( 1, 2, [&]() -> bool
{
Set( "render.opengl_copper_thickness", false );
return true;
} );
}
+4 -7
View File
@@ -202,21 +202,18 @@ TOOL_ACTION EDA_3D_ACTIONS::materialCAD( "3DViewer.Control.materialCAD",
_( "Use a CAD color style based on the diffuse color of the material" ),
BITMAPS::INVALID_BITMAP, AF_NONE, (void*) MATERIAL_MODE::CAD_MODE );
TOOL_ACTION EDA_3D_ACTIONS::rotate45axisZ( "3DViewer.Control.rotate45axisZ",
AS_ACTIVE,
WXK_TAB, "",
"Rotate 45 degrees over Z axis" );
TOOL_ACTION EDA_3D_ACTIONS::showTHT( "3DViewer.Control.attributesTHT",
AS_ACTIVE,
'T', "",
_( "Toggle Through Hole 3D models" ), _( "Toggle 3D models for 'Through hole' type components" ),
_( "Toggle Through Hole 3D models" ),
_( "Toggle 3D models for 'Through hole' type components" ),
BITMAPS::show_tht, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL );
TOOL_ACTION EDA_3D_ACTIONS::showSMD( "3DViewer.Control.attributesSMD",
AS_ACTIVE,
'S', "",
_( "Toggle SMD 3D models" ), _( "Toggle 3D models for 'Surface mount' type components" ),
_( "Toggle SMD 3D models" ),
_( "Toggle 3D models for 'Surface mount' type components" ),
BITMAPS::show_smt, AF_NONE, (void*) FL_FP_ATTRIBUTES_NORMAL_INSERT );
TOOL_ACTION EDA_3D_ACTIONS::showVirtual( "3DViewer.Control.attributesOther",
@@ -75,7 +75,6 @@ public:
static TOOL_ACTION materialDiffuse;
static TOOL_ACTION materialCAD;
static TOOL_ACTION rotate45axisZ;
static TOOL_ACTION showTHT;
static TOOL_ACTION showSMD;
static TOOL_ACTION showVirtual;
@@ -29,6 +29,7 @@
#include <kiface_base.h>
#include <tools/eda_3d_controller.h>
#include "eda_3d_actions.h"
#include "dialogs/panel_preview_3d_model.h"
#include <3d_rendering/opengl/render_3d_opengl.h>
@@ -113,10 +114,36 @@ int EDA_3D_CONTROLLER::Main( const TOOL_EVENT& aEvent )
// Main loop: keep receiving events
while( TOOL_EVENT* evt = Wait() )
{
if( evt->IsClick( BUT_RIGHT ) )
if( evt->IsCancelInteractive() )
{
wxWindow* canvas = m_toolMgr->GetToolHolder()->GetToolCanvas();
wxWindow* topLevelParent = canvas->GetParent();
while( topLevelParent && !topLevelParent->IsTopLevel() )
topLevelParent = topLevelParent->GetParent();
if( topLevelParent && dynamic_cast<DIALOG_SHIM*>( topLevelParent ) )
{
DIALOG_SHIM* dialog = static_cast<DIALOG_SHIM*>( topLevelParent );
if( dialog->IsQuasiModal() )
dialog->EndQuasiModal( wxID_CANCEL );
else
dialog->EndModal( wxID_CANCEL );
}
else
{
evt->SetPassEvent();
}
}
else if( evt->IsClick( BUT_RIGHT ) )
{
m_menu.ShowContextMenu();
}
else
{
evt->SetPassEvent();
}
}
return 0;
+36 -26
View File
@@ -4,7 +4,7 @@
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Cirilo Bernardo <cirilo.bernardo@gmail.com>
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2015-2022 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
@@ -124,8 +124,10 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } )
{
Connect( eventType, wxMenuEventHandler( PANEL_PREVIEW_3D_MODEL::OnMenuEvent ), nullptr,
this );
}
#ifdef __WXOSX__
// Call layout once to get the proper button sizes after the bitmaps have been set
@@ -166,7 +168,7 @@ void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent )
void PANEL_PREVIEW_3D_MODEL::loadSettings()
{
wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" );
wxCHECK_RET( m_previewPane, wxT( "Cannot load settings to null canvas" ) );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
@@ -241,13 +243,16 @@ static double rotationFromString( const wxString& aValue )
wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
{
return wxString::Format( "%.4f", aValue );
return wxString::Format( wxT( "%.4f" ),
aValue );
}
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
{
return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
return wxString::Format( wxT( "%.2f %s" ),
aValue,
GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
}
@@ -255,9 +260,13 @@ wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue )
{
// Convert from internal units (mm) to user units
if( m_userUnits == EDA_UNITS::INCHES )
aValue /= 25.4f;
aValue /= 25.4;
else if( m_userUnits == EDA_UNITS::MILS )
aValue /= 25.4 / 1e3;
return wxString::Format( "%.4f %s", aValue, GetAbbreviatedUnitsLabel( m_userUnits ) );
return wxString::Format( wxT( "%.6f %s" ),
aValue,
GetAbbreviatedUnitsLabel( m_userUnits ) );
}
@@ -397,18 +406,19 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
else if( spinCtrl == m_spinZoffset )
textCtrl = zoff;
double step = OFFSET_INCREMENT_MM;
double step_mm = OFFSET_INCREMENT_MM;
double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
if( m_userUnits == EDA_UNITS::INCHES )
step = OFFSET_INCREMENT_MIL/1000.0;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
}
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / 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 );
curr_value += ( step * aSign );
curr_value = std::max( -MAX_OFFSET, curr_value );
curr_value = std::min( curr_value, MAX_OFFSET );
textCtrl->SetValue( formatOffsetValue( curr_value ) );
textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
}
@@ -460,29 +470,29 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = OFFSET_INCREMENT_MM;
double step_mm = OFFSET_INCREMENT_MM;
if( event.ShiftDown( ) )
step = OFFSET_INCREMENT_MM_FINE;
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::INCHES )
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step = OFFSET_INCREMENT_MIL/1000.0;
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000.0;
if( event.ShiftDown( ) )
step = OFFSET_INCREMENT_MIL_FINE/1000.0;
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000.0;
}
if( event.GetWheelRotation() >= 0 )
step = -step;
step_mm = -step_mm;
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
double curr_value_mm = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
curr_value += step;
curr_value = std::max( -MAX_OFFSET, curr_value );
curr_value = std::min( curr_value, MAX_OFFSET );
curr_value_mm += step_mm;
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
textCtrl->SetValue( formatOffsetValue( curr_value ) );
textCtrl->SetValue( formatOffsetValue( curr_value_mm ) );
}
+1 -1
View File
@@ -81,7 +81,7 @@ German (DE) Rafael Sokolowski <Rafael.Sokolowski[at]web-dot-de
Japanese (JA) Kenta Yonekura <yoneken[at]kicad-dot-jp>
Simplified Chinese (zh_CN) taotieren <admin[at]taotieren-dot-com>
Remy Halvick, David Briscoe, Dominique Laigle, Paul Burke
Remy Halvick, David J S Briscoe, Dominique Laigle, Paul Burke
== Programm credits for icons and others
+28 -13
View File
@@ -156,6 +156,11 @@ option( KICAD_STEP_EXPORT_LIB
"Build and use kicad2step as a library, meant for debugging"
OFF )
cmake_dependent_option( KICAD_WIN32_VERIFY_CODESIGN
"When enabled, verifies the code signing signature of certain DLLs loaded during runtime."
OFF "WIN32"
OFF )
# Global setting: exports are explicit
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
@@ -177,6 +182,10 @@ if( KICAD_GAL_PROFILE )
add_definitions( -DKICAD_GAL_PROFILE )
endif()
if( KICAD_WIN32_VERIFY_CODESIGN )
add_definitions( -DKICAD_WIN32_VERIFY_CODESIGN )
endif()
# Ensure DEBUG is defined for all platforms in Debug builds
# change to add_compile_definitions() after minimum required CMake version is 3.12
set_property( DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:Debug>:DEBUG> )
@@ -490,9 +499,10 @@ endif()
# KIFACE_SUFFIX is the file extension used for top level program modules which
# implement the KIFACE interface. A valid suffix starts with a period '.'.
if( false )
# This is the eventual situation near milestone C) of modular-kicad blueprint.
# Until then we use .kiface extension so we don't collide with python DSO.
if( WIN32 )
# We use .kiface extension so we don't collide with python DSO. (Linux/mac issue?)
# Windows works fine with the native dll extension
# which also resolves metadata issues because windows wants to see the dll extension
set( KIFACE_SUFFIX ${CMAKE_SHARED_MODULE_SUFFIX} )
else()
# Temporary situation until we can dovetail the python DSO into the kiface DSO.
@@ -769,12 +779,6 @@ set( INC_AFTER
find_package( SWIG 3.0 REQUIRED )
include( ${SWIG_USE_FILE} )
# pybind11 is header-only, so include the subdir
add_subdirectory(thirdparty/pybind11)
# Make sure that we get our pybind11 and not the system pybind11 (ours is patched to work with wx)
include_directories( BEFORE SYSTEM ${PYBIND11_INCLUDE_DIR} )
set( PythonInterp_FIND_VERSION 3.6 )
set( PythonLibs_FIND_VERSION 3.6 )
@@ -816,6 +820,12 @@ message( STATUS "Python module install path: ${PYTHON_DEST}" )
find_package( PythonLibs 3.6 REQUIRED )
# pybind11 is header-only, so include the subdir
add_subdirectory(thirdparty/pybind11)
# Make sure that we get our pybind11 and not the system pybind11 (ours is patched to work with wx)
include_directories( BEFORE SYSTEM ${PYBIND11_INCLUDE_DIR} )
# Infrequently needed headers go at end of search paths, append to INC_AFTER which
# although is used for all components, should be a harmless hit for something like eeschema
# so long as unused search paths are at the end like this.
@@ -838,9 +848,11 @@ if( UNIX AND NOT APPLE AND KICAD_SCRIPTING_WXPYTHON )
endif()
endif()
message( STATUS "Found ${WXPYTHON_FLAVOR} "
"${WXPYTHON_VERSION}/${WXPYTHON_TOOLKIT} "
"(wxWidgets ${WXPYTHON_WXVERSION})" )
if( WXPYTHON_FLAVOR )
message( STATUS "Found wxPython ${WXPYTHON_FLAVOR} "
"${WXPYTHON_VERSION}/${WXPYTHON_TOOLKIT} "
"(wxWidgets ${WXPYTHON_WXVERSION})" )
endif()
#
# Find wxWidgets library, required
@@ -1000,7 +1012,10 @@ add_subdirectory( cvpcb ) # must be after pcbnew
add_subdirectory( kicad ) # should follow pcbnew, eeschema
add_subdirectory( tools )
add_subdirectory( utils )
add_subdirectory( qa )
if( KICAD_BUILD_QA_TESTS )
add_subdirectory( qa )
endif()
# Demos
if( KICAD_INSTALL_DEMOS )
@@ -28,22 +28,28 @@ include( ${CMAKE_MODULE_PATH}/KiCadFullVersion.cmake )
# Extract the major and minor build version as a string
string( REGEX MATCH
"([0-9]+)\\.([0-9]+)\\..*"
KICAD_MAJOR_MINOR_VERSION
"([0-9]+)\\.([0-9]+)\\.([0-9]+).*"
KICAD_MAJOR_MINOR_PATCH_VERSION
"${KICAD_SEMANTIC_VERSION}"
)
if( CMAKE_MATCH_COUNT EQUAL 2 )
if( CMAKE_MATCH_COUNT EQUAL 3 )
# Match slot 0 is the full string, so we want slots 1 & 2
set( KICAD_MAJOR_MINOR_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}" )
set( KICAD_MAJOR_MINOR_VERSION_TUPLE "{ ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2} }" )
set( KICAD_MAJOR_MINOR_PATCH_VERSION "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}" )
set( KICAD_MAJOR_VERSION "${CMAKE_MATCH_1}" )
set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.0.0\\0" )
set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" )
set( KICAD_WIN32_RC_PRODVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}\\0" )
set( KICAD_WIN32_RC_PRODVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, 0, 0" )
set( KICAD_MINOR_VERSION "${CMAKE_MATCH_2}" )
set( KICAD_PATCH_VERSION "${CMAKE_MATCH_3}" )
set( KICAD_WIN32_RC_FILEVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}.${KICAD_GIT_REV}\\0" )
set( KICAD_WIN32_RC_FILEVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, ${CMAKE_MATCH_3}, ${KICAD_GIT_REV}" )
set( KICAD_WIN32_RC_PRODVER_STR "${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3}\\0" )
set( KICAD_WIN32_RC_PRODVER "${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, ${CMAKE_MATCH_3}, ${KICAD_GIT_REV}" )
else()
message( FATAL_ERROR "Unable to extract major and minor version string" )
message( FATAL_ERROR "Unable to extract major, minor and patch version string" )
endif()
set( _wvh_new_version_text
@@ -58,6 +64,8 @@ set( _wvh_new_version_text
#define KICAD_VERSION_FULL \"${KICAD_VERSION_FULL}\"
#define KICAD_SEMANTIC_VERSION \"${KICAD_SEMANTIC_VERSION}\"
#define KICAD_MAJOR_VERSION \"${KICAD_MAJOR_VERSION}\"
#define KICAD_MINOR_VERSION \"${KICAD_MINOR_VERSION}\"
#define KICAD_PATCH_VERSION \"${KICAD_PATCH_VERSION}\"
#define KICAD_MAJOR_MINOR_VERSION \"${KICAD_MAJOR_MINOR_VERSION}\"
#define KICAD_MAJOR_MINOR_VERSION_TUPLE ${KICAD_MAJOR_MINOR_VERSION_TUPLE}
#define KICAD_WIN32_RC_PRODVER ${KICAD_WIN32_RC_PRODVER}
+21
View File
@@ -42,6 +42,15 @@ macro( create_git_version_header _git_src_path )
RESULT_VARIABLE _git_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(
COMMAND
${GIT_EXECUTABLE} rev-list --count --first-parent HEAD
WORKING_DIRECTORY ${_git_src_path}
OUTPUT_VARIABLE _git_REV_COUNT
ERROR_VARIABLE _git_log_error
RESULT_VARIABLE _git_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
set( ENV{LC_ALL} ${_Git_SAVED_LC_ALL} )
endif( GIT_FOUND )
@@ -51,4 +60,16 @@ macro( create_git_version_header _git_src_path )
set( KICAD_VERSION "(${_git_DESCRIBE})" )
endif()
if( _git_REV_COUNT )
set( KICAD_GIT_REV "${_git_REV_COUNT}" )
# Sanity check
if (NOT KICAD_GIT_REV MATCHES "^[0-9]+$")
set( KICAD_GIT_REV "0" )
endif ()
else()
# Incase the command failed, we can just default to 0, only a problem in CI right now
set( KICAD_GIT_REV "0" )
endif()
endmacro()
+9 -7
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.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.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
@@ -75,11 +75,15 @@ if( ${PYTHON_ROOT_DIR} )
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}
PATHS ${PYTHON_ROOT_DIR}
NO_DEFAULT_PATH )
elseif(VCPKG_TOOLCHAIN)
# Our VCPKG usage will always place it in a known location
find_program(PYTHON_EXECUTABLE
NAMES ${_Python_NAMES}
PATHS "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3"
)
else()
if(NOT VCPKG_TOOLCHAIN)
# If there is no specific path given, look for python in the path
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
endif()
# If there is no specific path given, look for python in the path
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
endif()
# Set up the versions we know about, in the order we will search. Always add
@@ -112,8 +116,6 @@ if(NOT PYTHON_EXECUTABLE)
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.2" )
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.1" )
list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.0" )
elseif(VCPKG_TOOLCHAIN)
list( APPEND _Python_PPATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/python3" )
else()
list( APPEND _Python_PPATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] )
endif()
+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.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.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
@@ -40,7 +40,7 @@ if( VCPKG_TOOLCHAIN )
# python 3.8+ requires us to use python to add additional load directories (PATH no longer supported)
# vcpkg does not copy all the dlls into the python folder so we need this for development
# as the wxpython modules need the wxwidgets library DLLs to load
set( _py_dll "import os;os.add_dll_directory(\"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin\");os.add_dll_directory(\"${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin\");" )
set( _py_dll "import os;os.add_dll_directory(\"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin\");os.add_dll_directory(\"${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin\");" )
else()
set( _py_dll "" )
endif()
+26 -98
View File
@@ -231,11 +231,7 @@ endif()
#=====================================================================
if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Useful common wx libs needed by almost all components.
if(VCPKG_TOOLCHAIN)
set(wxWidgets_COMMON_LIBRARIES libpng16 tiff jpeg zlib libexpat)
else()
set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
endif()
set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
# DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead.
if(NOT wxWidgets_FIND_COMPONENTS)
@@ -258,22 +254,24 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
#-------------------------------------------------------------------
#
# Get filename components for a configuration. For example,
# if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d
# if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG=""
# if _CONFIGURATION = mswunivud, then _PF="msw", _UNV=univ, _UCD=u _DBG=d
# if _CONFIGURATION = mswu, then _PF="msw", _UNV="", _UCD=u _DBG=""
#
macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG)
macro(WX_GET_NAME_COMPONENTS _CONFIGURATION _PF _UNV _UCD _DBG)
DBG_MSG_V(${_CONFIGURATION})
string(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}")
string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}")
string(REGEX REPLACE "[msw|qt].*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}")
if(${_UCD} STREQUAL ${_CONFIGURATION})
set(${_UCD} "")
endif()
string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}")
string(REGEX MATCH "^[msw|qt]*" ${_PF} "${_CONFIGURATION}")
endmacro()
#
# Find libraries associated to a configuration.
#
macro(WX_FIND_LIBS _UNV _UCD _DBG)
macro(WX_FIND_LIBS _PF _UNV _UCD _DBG)
DBG_MSG_V("m_unv = ${_UNV}")
DBG_MSG_V("m_ucd = ${_UCD}")
DBG_MSG_V("m_dbg = ${_DBG}")
@@ -286,7 +284,6 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
NAMES
wx${LIB}${_UCD}${_DBG} # for regex
wx${LIB}${_DBG}
${LIB}${_DBG} # vcpkg libraries aren't specific to wx
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
@@ -326,13 +323,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets monolithic library.
find_library(WX_mono${_DBG}
NAMES
wxmsw${_UNV}31${_UCD}${_DBG}
wxmsw${_UNV}30${_UCD}${_DBG}
wxmsw${_UNV}29${_UCD}${_DBG}
wxmsw${_UNV}28${_UCD}${_DBG}
wxmsw${_UNV}27${_UCD}${_DBG}
wxmsw${_UNV}26${_UCD}${_DBG}
wxmsw${_UNV}25${_UCD}${_DBG}
wx${_PF}${_UNV}31${_UCD}${_DBG}
wx${_PF}${_UNV}30${_UCD}${_DBG}
wx${_PF}${_UNV}29${_UCD}${_DBG}
wx${_PF}${_UNV}28${_UCD}${_DBG}
wx${_PF}${_UNV}27${_UCD}${_DBG}
wx${_PF}${_UNV}26${_UCD}${_DBG}
wx${_PF}${_UNV}25${_UCD}${_DBG}
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
@@ -340,16 +337,16 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets multilib libraries.
foreach(LIB core adv aui html media xrc dbgrid gl qa richtext
webview stc ribbon propgrid)
stc ribbon propgrid webview)
find_library(WX_${LIB}${_DBG}
NAMES
wxmsw${_UNV}31${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}30${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}29${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}28${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}27${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}26${_UCD}${_DBG}_${LIB}
wxmsw${_UNV}25${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}31${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}30${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}29${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}28${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}27${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}26${_UCD}${_DBG}_${LIB}
wx${_PF}${_UNV}25${_UCD}${_DBG}_${LIB}
PATHS ${WX_LIB_DIR}
NO_DEFAULT_PATH
)
@@ -515,74 +512,6 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(WX_LIB_DIR_PREFIX vc)
endif()
if(VCPKG_TOOLCHAIN)
set(wxWidgets_FOUND TRUE)
find_path(wxWidgets_ROOT_DIR
NAMES include/wx/wx.h
PATHS
ENV wxWidgets_ROOT_DIR
DOC "wxWidgets base/installation directory"
)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(wxWidgets_LIB_DIR ${wxWidgets_ROOT_DIR}/debug/lib)
set(wxWidgets_CONFIGURATION mswud)
else()
set(wxWidgets_LIB_DIR ${wxWidgets_ROOT_DIR}/lib)
set(wxWidgets_CONFIGURATION mswu)
endif()
set(wxWidgets_BIN_DIR ${wxWidgets_ROOT_DIR}/bin)
set(wxWidgets_INCLUDE_DIR ${wxWidgets_ROOT_DIR}/include)
file(GLOB DLL ${wxWidgets_BIN_DIR}/wxmsw*.dll)
if (DLL)
set(wxWidgets_DEFINITIONS WXUSINGDLL)
DBG_MSG_V("detected SHARED/DLL tree wxWidgets_LIB_DIR=${wxWidgets_LIB_DIR}")
endif ()
set(WX_ROOT_DIR ${wxWidgets_ROOT_DIR})
set(WX_LIB_DIR ${wxWidgets_LIB_DIR}) # needed by macro
set(WX_CONFIGURATION_LIST ${wxWidgets_CONFIGURATION})
# Set wxWidgets lib setup include directory.
if (EXISTS ${wxWidgets_INCLUDE_DIR}/wx/setup.h)
set(wxWidgets_INCLUDE_DIRS ${wxWidgets_INCLUDE_DIR})
else ()
DBG_MSG("wxWidgets_FOUND FALSE because ${wxWidgets_INCLUDE_DIR}/wx/setup.h does not exists.")
set(wxWidgets_FOUND FALSE)
endif ()
# Set wxWidgets main include directory.
if (EXISTS ${wxWidgets_ROOT_DIR}/include/wx/wx.h)
list(APPEND wxWidgets_INCLUDE_DIRS ${wxWidgets_ROOT_DIR}/include)
else ()
DBG_MSG("wxWidgets_FOUND FALSE because wxWidgets_ROOT_DIR=${wxWidgets_ROOT_DIR} has no ${wxWidgets_ROOT_DIR}/include/wx/wx.h")
set(wxWidgets_FOUND FALSE)
endif ()
DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}")
# Get configuration parameters from the name.
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
# Find wxWidgets libraries.
WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
if (WX_USE_REL_AND_DBG)
WX_FIND_LIBS("${UNV}" "${UCD}" "d")
endif ()
# Settings for requested libs (i.e., include dir, libraries, etc.).
WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}")
# Add necessary definitions for unicode builds
if ("${UCD}" STREQUAL "u")
list(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE)
endif ()
# Add necessary definitions for debug builds
set(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__)
else()
if(BUILD_SHARED_LIBS)
find_path(wxWidgets_LIB_DIR
NAMES
@@ -617,7 +546,6 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
DOC "Path to wxWidgets libraries"
NO_DEFAULT_PATH
)
endif()
endif()
# If wxWidgets_LIB_DIR changed, clear all libraries.
@@ -675,7 +603,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endif()
# Get configuration parameters from the name.
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG)
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} PF UNV UCD DBG)
# Set wxWidgets lib setup include directory.
if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h)
@@ -695,9 +623,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endif()
# Find wxWidgets libraries.
WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}")
WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}")
if(WX_USE_REL_AND_DBG)
WX_FIND_LIBS("${UNV}" "${UCD}" "d")
WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "d")
endif()
# Settings for requested libs (i.e., include dir, libraries, etc.).
+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-2021 KiCad Developers, see AUTHORS.txt for contributors.
# Copyright (C) 2016-2022 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 "6.0.0" )
set( KICAD_SEMANTIC_VERSION "6.0.6" )
# Default the version to the semantic version.
# This is overridden by the git repository tag though (if using git)
-3
View File
@@ -16,9 +16,6 @@ KiCad uses a host of CI resources.
GitLab CI pipeline status can be viewed for Linux and Windows builds of the latest commits.
Additional status is available for builds:
[<img alt="Jenkins" src="https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.simonrichter.eu%2Fjob%2Fwindows-kicad-ps-pipeline%2F&label=Windows%2C%20MSVC%Nightly&style=plastic">](https://jenkins.simonrichter.eu/job/windows-kicad-ps-pipeline/)
## Release status
[![latest released version(s)](https://repology.org/badge/latest-versions/kicad.svg)](https://repology.org/project/kicad/versions)
[![Release status](https://repology.org/badge/tiny-repos/kicad.svg)](https://repology.org/metapackage/kicad/versions)
+7 -5
View File
@@ -26,11 +26,13 @@ set_source_files_properties( bitmap2cmp_gui.cpp PROPERTIES
COMPILE_DEFINITIONS "COMPILING_DLL"
)
if( MINGW )
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler( bitmap2component )
else()
set( BITMAP2COMPONENT_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/bitmap2component.rc )
if( WIN32 )
if( MINGW )
# BITMAP2COMPONENT_RESOURCES variable is set by the macro.
mingw_resource_compiler( bitmap2component )
else()
set( BITMAP2COMPONENT_RESOURCES ${CMAKE_SOURCE_DIR}/resources/msw/bitmap2component.rc )
endif()
endif()
if( APPLE )
+2 -2
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 1992-2010 jean-pierre.charras
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2022 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
@@ -468,7 +468,7 @@ wxString BM2CMP_FRAME::FormatOutputSize( double aSize )
}
else
{
text.Printf( "%d", KiROUND( aSize ) );
text.Printf( wxT( "%d" ), KiROUND( aSize ) );
}
return text;
+39 -39
View File
@@ -194,7 +194,7 @@ static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
*/
wxString dumpParamCfg( const PARAM_CFG& aParam )
{
wxString s = aParam.m_Ident + ": ";
wxString s = aParam.m_Ident + wxT( ": " );
/*
* This implementation is rather simplistic, but it is
@@ -217,9 +217,9 @@ wxString dumpParamCfg( const PARAM_CFG& aParam )
s << *static_cast<const PARAM_CFG_FILENAME&>( aParam ).m_Pt_param;
break;
case paramcfg_id::PARAM_BOOL:
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? "true" : "false" );
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? wxT( "true" ) : wxT( "false" ) );
break;
default: s << "Unsupported PARAM_CFG variant: " << aParam.m_Type;
default: s << wxT( "Unsupported PARAM_CFG variant: " ) << aParam.m_Type;
}
return s;
@@ -249,14 +249,14 @@ static void dumpCfg( const std::vector<PARAM_CFG*>& aArray )
*/
static wxFileName getAdvancedCfgFilename()
{
const static wxString cfg_filename{ "kicad_advanced" };
const static wxString cfg_filename{ wxT( "kicad_advanced" ) };
return wxFileName( SETTINGS_MANAGER::GetUserSettingsPath(), cfg_filename );
}
ADVANCED_CFG::ADVANCED_CFG()
{
wxLogTrace( AdvancedConfigMask, "Init advanced config" );
wxLogTrace( AdvancedConfigMask, wxT( "Init advanced config" ) );
// Init defaults - this is done in case the config doesn't exist,
// then the values will remain as set here.
@@ -266,12 +266,12 @@ ADVANCED_CFG::ADVANCED_CFG()
m_DrawArcAccuracy = 10.0;
m_DrawArcCenterMaxAngle = 50.0;
m_MaxTangentAngleDeviation = 1.0;
m_MaxTrackLengthToKeep = 0.0001;
m_MaxTrackLengthToKeep = 0.0005;
m_ExtraZoneDisplayModes = false;
m_DrawTriangulationOutlines = false;
m_ExtraClearance = 0.0001;
m_DRCEpsilon = 0.0001; // 0.1um is small enough not to materially violate
m_ExtraClearance = 0.0005;
m_DRCEpsilon = 0.0005; // 0.5um is small enough not to materially violate
// any constraints.
m_HoleWallThickness = 0.020; // IPC-6012 says 15-18um; Cadence says at least
@@ -313,7 +313,7 @@ void ADVANCED_CFG::loadFromConfigFile()
if( !k_advanced.FileExists() )
{
wxLogTrace( AdvancedConfigMask, "File does not exist %s", k_advanced.GetFullPath() );
wxLogTrace( AdvancedConfigMask, wxT( "File does not exist %s" ), k_advanced.GetFullPath() );
// load the defaults
wxConfig emptyConfig;
@@ -322,9 +322,9 @@ void ADVANCED_CFG::loadFromConfigFile()
return;
}
wxLogTrace( AdvancedConfigMask, "Loading advanced config from: %s", k_advanced.GetFullPath() );
wxLogTrace( AdvancedConfigMask, wxT( "Loading advanced config from: %s" ), k_advanced.GetFullPath() );
wxFileConfig file_cfg( "", "", k_advanced.GetFullPath() );
wxFileConfig file_cfg( wxEmptyString, wxEmptyString, k_advanced.GetFullPath() );
loadSettings( file_cfg );
}
@@ -334,94 +334,94 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
std::vector<PARAM_CFG*> configParams;
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::RealtimeConnectivity,
&m_RealTimeConnectivity, true ) );
&m_RealTimeConnectivity, m_RealTimeConnectivity ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::ExtraFillMargin,
&m_ExtraClearance, 0.0005, 0.0, 1.0 ) );
&m_ExtraClearance, m_ExtraClearance, 0.0, 1.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DRCEpsilon,
&m_DRCEpsilon, 0.0005, 0.0, 1.0 ) );
&m_DRCEpsilon, m_DRCEpsilon, 0.0, 1.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::HoleWallThickness,
&m_HoleWallThickness, 0.020, 0.0, 1.0 ) );
&m_HoleWallThickness, m_HoleWallThickness, 0.0, 1.0 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::CoroutineStackSize,
&m_CoroutineStackSize, AC_STACK::default_stack,
AC_STACK::min_stack, AC_STACK::max_stack ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRouterDebugGraphics,
&m_ShowRouterDebugGraphics, false ) );
&m_ShowRouterDebugGraphics, m_ShowRouterDebugGraphics ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::CompactFileSave,
&m_CompactSave, false ) );
&m_CompactSave, m_CompactSave ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DrawArcAccuracy,
&m_DrawArcAccuracy, 10.0, 0.0, 100000.0 ) );
&m_DrawArcAccuracy, m_DrawArcAccuracy, 0.0, 100000.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::DrawArcCenterStartEndMaxAngle,
&m_DrawArcCenterMaxAngle, 50.0, 0.0, 100000.0 ) );
&m_DrawArcCenterMaxAngle, m_DrawArcCenterMaxAngle, 0.0, 100000.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::MaxTangentTrackAngleDeviation,
&m_MaxTangentAngleDeviation, 1.0, 0.0, 90.0 ) );
&m_MaxTangentAngleDeviation, m_MaxTangentAngleDeviation, 0.0, 90.0 ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::MaxTrackLengthToKeep,
&m_MaxTrackLengthToKeep, 0.0005, 0.0, 1.0 ) );
&m_MaxTrackLengthToKeep, m_MaxTrackLengthToKeep, 0.0, 1.0 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ExtraZoneDisplayModes,
&m_ExtraZoneDisplayModes, false ) );
&m_ExtraZoneDisplayModes, m_ExtraZoneDisplayModes ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::StrokeTriangulation,
&m_DrawTriangulationOutlines, false ) );
&m_DrawTriangulationOutlines, m_DrawTriangulationOutlines ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::MinPlotPenWidth,
&m_MinPlotPenWidth, 0.0212, 0.0, 1.0 ) );
&m_MinPlotPenWidth, m_MinPlotPenWidth, 0.0, 1.0 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DebugZoneFiller,
&m_DebugZoneFiller, false ) );
&m_DebugZoneFiller, m_DebugZoneFiller ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DebugPDFWriter,
&m_DebugPDFWriter, false ) );
&m_DebugPDFWriter, m_DebugPDFWriter ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::SmallDrillMarkSize,
&m_SmallDrillMarkSize, 0.35, 0.0, 3.0 ) );
&m_SmallDrillMarkSize, m_SmallDrillMarkSize, 0.0, 3.0 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::HotkeysDumper,
&m_HotkeysDumper, false ) );
&m_HotkeysDumper, m_HotkeysDumper ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::DrawBoundingBoxes,
&m_DrawBoundingBoxes, false ) );
&m_DrawBoundingBoxes, m_DrawBoundingBoxes ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowPcbnewExportNetlist,
&m_ShowPcbnewExportNetlist, false ) );
&m_ShowPcbnewExportNetlist, m_ShowPcbnewExportNetlist ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::Skip3DModelFileCache,
&m_Skip3DModelFileCache, false ) );
&m_Skip3DModelFileCache, m_Skip3DModelFileCache ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::Skip3DModelMemoryCache,
&m_Skip3DModelMemoryCache, false ) );
&m_Skip3DModelMemoryCache, m_Skip3DModelMemoryCache ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::HideVersionFromTitle,
&m_HideVersionFromTitle, false ) );
&m_HideVersionFromTitle, m_HideVersionFromTitle ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowRepairSchematic,
&m_ShowRepairSchematic, false ) );
&m_ShowRepairSchematic, m_ShowRepairSchematic ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ShowEventCounters,
&m_ShowEventCounters, false ) );
&m_ShowEventCounters, m_ShowEventCounters ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::AllowManualCanvasScale,
&m_AllowManualCanvasScale, false ) );
&m_AllowManualCanvasScale, m_AllowManualCanvasScale ) );
// 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 = "";
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, "" ) );
wxString traceMasks = wxEmptyString;
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, wxEmptyString ) );
// Load the config from file
wxConfigLoadSetups( &aCfg, configParams );
// Now actually set the trace masks
wxStringTokenizer traceMaskTokenizer( traceMasks, "," );
wxStringTokenizer traceMaskTokenizer( traceMasks, wxT( "," ) );
while( traceMaskTokenizer.HasMoreTokens() )
{
+4 -4
View File
@@ -42,10 +42,10 @@ ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset
const wxString& ARRAY_AXIS::GetAlphabet() const
{
static const wxString alphaNumeric = "0123456789";
static const wxString alphaHex = "0123456789ABCDEF";
static const wxString alphaFull = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
static const wxString alphaNoIOSQXZ = "ABCDEFGHJKLMNPRTUVWY";
static const wxString alphaNumeric = wxT( "0123456789" );
static const wxString alphaHex = wxT( "0123456789ABCDEF" );
static const wxString alphaFull = wxT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
static const wxString alphaNoIOSQXZ = wxT( "ABCDEFGHJKLMNPRTUVWY" );
switch( m_type )
{
+1 -1
View File
@@ -87,7 +87,7 @@ bool ASSET_ARCHIVE::Load()
long ASSET_ARCHIVE::GetFileContents( const wxString& aFilePath, const unsigned char* aDest,
size_t aMaxLen )
{
wxFAIL_MSG( "Unimplemented" );
wxFAIL_MSG( wxT( "Unimplemented" ) );
return 0;
}
+3 -3
View File
@@ -73,7 +73,7 @@ const wxString& BASE_SCREEN::GetPageNumber() const
static wxString pageNumber;
if( m_pageNumber.IsEmpty() )
pageNumber.Printf( "%d", m_virtualPageNumber );
pageNumber.Printf( wxT( "%d" ), m_virtualPageNumber );
else
pageNumber = m_pageNumber;
@@ -86,9 +86,9 @@ const wxString& BASE_SCREEN::GetPageNumber() const
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
{
// for now, make it look like XML, expand on this later.
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << wxT( ">\n" );
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
NestedSpace( nestLevel, os ) << wxT( "</" ) << GetClass().Lower().mb_str() << wxT( ">\n" );
}
#endif
+2 -2
View File
@@ -181,7 +181,7 @@ wxString MessageTextFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitLab
if( aAddUnitLabel )
{
text += " ";
text += wxT( " " );
text += GetAbbreviatedUnitsLabel( aUnits, aType );
}
@@ -352,7 +352,7 @@ double DoubleValueFromString( EDA_UNITS aUnits, const wxString& aTextValue, EDA_
{
aUnits = EDA_UNITS::INCHES;
}
else if( unit == "oz" ) // 1 oz = 1.37 mils
else if( unit == wxT( "oz" ) ) // 1 oz = 1.37 mils
{
aUnits = EDA_UNITS::MILS;
dtmp *= 1.37;
+14 -1
View File
@@ -6,7 +6,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 jean-pierre.charras
* Copyright (C) 2011-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2011-2022 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
@@ -253,12 +253,16 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
bool useTransform = aDC->CanUseTransformMatrix();
wxAffineMatrix2D init_matrix = aDC->GetTransformMatrix();
wxPoint clipAreaPos;
if( useTransform )
{
wxAffineMatrix2D matrix = aDC->GetTransformMatrix();
matrix.Translate( pos.x, pos.y );
matrix.Scale( GetScalingFactor(), GetScalingFactor() );
aDC->SetTransformMatrix( matrix );
clipAreaPos.x = pos.x;
clipAreaPos.y = pos.y;
pos.x = pos.y = 0;
}
else
@@ -269,8 +273,15 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
pos.x = KiROUND( pos.x / GetScalingFactor() );
pos.y = KiROUND( pos.y / GetScalingFactor() );
size.x = KiROUND( size.x / GetScalingFactor() );
size.y = KiROUND( size.y / GetScalingFactor() );
clipAreaPos.x = pos.x;
clipAreaPos.y = pos.y;
}
aDC->DestroyClippingRegion();
aDC->SetClippingRegion( clipAreaPos, size );
if( GetGRForceBlackPenState() )
{
wxBitmap result( m_bitmap->ConvertToImage().ConvertToGreyscale() );
@@ -288,6 +299,8 @@ void BITMAP_BASE::DrawBitmap( wxDC* aDC, const wxPoint& aPos )
aDC->SetUserScale( scale, scale );
aDC->SetLogicalOrigin( logicalOriginX, logicalOriginY );
}
aDC->DestroyClippingRegion();
}
+5 -6
View File
@@ -101,7 +101,7 @@ BITMAP_STORE::BITMAP_STORE()
{
wxFileName path( PATHS::GetStockDataPath() + wxT( "/resources" ), IMAGE_ARCHIVE );
wxLogTrace( traceBitmaps, "Loading bitmaps from " + path.GetFullPath() );
wxLogTrace( traceBitmaps, wxT( "Loading bitmaps from " ) + path.GetFullPath() );
m_archive = std::make_unique<ASSET_ARCHIVE>( path.GetFullPath() );
@@ -148,8 +148,8 @@ wxImage BITMAP_STORE::getImage( BITMAPS aBitmapId, int aHeight )
if( count < 0 )
{
wxLogTrace( traceBitmaps, "Bitmap for %d, %d, %s has an info tag with file %s,"
"but that file could not be found in the archive!",
wxLogTrace( traceBitmaps, wxT( "Bitmap for %d, %d, %s has an info tag with file %s," )
wxT( "but that file could not be found in the archive!" ),
aBitmapId, aHeight, m_theme );
data = s_imageNotFound;
count = sizeof( s_imageNotFound );
@@ -158,7 +158,6 @@ wxImage BITMAP_STORE::getImage( BITMAPS aBitmapId, int aHeight )
wxMemoryInputStream is( data, count );
wxImage image( is, wxBITMAP_TYPE_PNG );
wxBitmap bitmap( image );
return image;
}
@@ -205,7 +204,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
{
if( !m_bitmapInfoCache.count( aBitmapId ) )
{
wxLogTrace( traceBitmaps, "No bitmap info available for %d", aBitmapId );
wxLogTrace( traceBitmaps, wxT( "No bitmap info available for %d" ), aBitmapId );
return wxEmptyString;
}
@@ -225,7 +224,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
if( fn.IsEmpty() )
{
wxLogTrace( traceBitmaps, "No bitmap found matching ID %d, height %d, theme %s",
wxLogTrace( traceBitmaps, wxT( "No bitmap found matching ID %d, height %d, theme %s" ),
aBitmapId, aHeight, m_theme );
return m_bitmapInfoCache.at( aBitmapId ).begin()->filename;
}
+13 -7
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
* Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras at wanadoo.fr
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018 CERN
* Author: Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -70,6 +70,7 @@ BOARD_PRINTOUT::BOARD_PRINTOUT( const BOARD_PRINTOUT_SETTINGS& aParams,
m_settings( aParams )
{
m_view = aView;
m_gerbviewPrint = false;
}
@@ -85,12 +86,12 @@ void BOARD_PRINTOUT::GetPageInfo( int* minPage, int* maxPage, int* selPageFrom,
void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPageCount )
{
auto dc = GetDC();
wxDC* dc = GetDC();
KIGFX::GAL_DISPLAY_OPTIONS options;
auto galPrint = KIGFX::GAL_PRINT::Create( options, dc );
auto gal = galPrint->GetGAL();
auto printCtx = galPrint->GetPrintCtx();
auto painter = getPainter( gal );
std::unique_ptr<KIGFX::GAL_PRINT> galPrint = KIGFX::GAL_PRINT::Create( options, dc );
KIGFX::GAL* gal = galPrint->GetGAL();
KIGFX::PRINT_CONTEXT* printCtx = galPrint->GetPrintCtx();
std::unique_ptr<KIGFX::PAINTER> painter = getPainter( gal );
std::unique_ptr<KIGFX::VIEW> view( m_view->DataReference() );
// Target paper size
@@ -175,6 +176,11 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
gal->SetClearColor( dstSettings->GetBackgroundColor() );
gal->ClearScreen();
if( m_gerbviewPrint )
// Mandatory in Gerbview to use the same order for printing as for screen redraw
// due to negative objects that need a specific order
view->UseDrawPriority( true );
{
KIGFX::GAL_DRAWING_CONTEXT ctx( gal );
view->Redraw();
+48 -48
View File
@@ -95,42 +95,42 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
wxString aMsg;
// DO NOT translate information in the msg_version string
wxString eol = aHtml ? "<br>" : "\n";
wxString eol = aHtml ? wxT( "<br>" ) : wxT( "\n" );
// Tabs instead of spaces for the plaintext version for shorter string length
wxString indent4 = aHtml ? "&nbsp;&nbsp;&nbsp;&nbsp;" : "\t";
wxString indent4 = aHtml ? wxT( "&nbsp;&nbsp;&nbsp;&nbsp;" ) : wxT( "\t" );
#define ON "ON" << eol
#define OFF "OFF" << eol
#define ON wxT( "ON" ) << eol
#define OFF wxT( "OFF" ) << eol
wxString version;
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
: GetBuildVersion() )
#ifdef DEBUG
<< ", debug"
<< wxT( ", debug" )
#else
<< ", release"
<< wxT( ", release" )
#endif
<< " build";
<< wxT( " build" );
wxPlatformInfo platform;
aMsg << "Application: " << aTitle;
aMsg << wxT( "Application: " ) << aTitle;
#if defined( KICAD_BUILD_ARCH_X64 )
aMsg << " (64-bit)";
aMsg << wxT( " (64-bit)" );
#elif defined( KICAD_BUILD_ARCH_X86 )
aMsg << " (32-bit)";
aMsg << wxT( " (32-bit)" );
#elif defined( KICAD_BUILD_ARCH_ARM )
aMsg << " (ARM 32-bit)";
aMsg << wxT( " (ARM 32-bit)" );
#elif defined( KICAD_BUILD_ARCH_ARM64 )
aMsg << " (ARM 64-bit)";
aMsg << wxT( " (ARM 64-bit)" );
#endif
aMsg << eol << eol;
aMsg << "Version: " << version << eol << eol;
aMsg << "Libraries:" << eol;
aMsg << wxT( "Version: " ) << version << eol << eol;
aMsg << wxT( "Libraries:" ) << eol;
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
@@ -139,26 +139,26 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
aMsg << eol;
aMsg << "Platform: " << wxGetOsDescription() << ", "
<< GetPlatformGetBitnessName() << ", "
<< platform.GetEndiannessName() << ", "
aMsg << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
<< GetPlatformGetBitnessName() << wxT( ", " )
<< platform.GetEndiannessName() << wxT( ", " )
<< platform.GetPortIdName();
#ifdef __WXGTK__
aMsg << ", " << wxGetenv( "XDG_SESSION_DESKTOP" )
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
aMsg << wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_DESKTOP" ) )
<< wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_TYPE" ) );
#endif
aMsg << eol << eol;
if( !aBrief )
{
aMsg << "Build Info:" << eol;
aMsg << indent4 << "Date: " << GetBuildDate() << eol;
aMsg << wxT( "Build Info:" ) << eol;
aMsg << indent4 << wxT( "Date: " ) << GetBuildDate() << eol;
}
aMsg << indent4 << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " (";
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")";
aMsg << indent4 << wxT( "wxWidgets: " ) << wxVERSION_NUM_DOT_STRING << wxT( " (" );
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 wxT( ")" );
// Get the GTK+ version where possible.
#ifdef __WXGTK__
@@ -166,68 +166,68 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
major = wxPlatformInfo().Get().GetToolkitMajorVersion();
minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
aMsg << " GTK+ " << major << "." << minor;
aMsg << wxT( " GTK+ " ) << major << wxT( "." ) << minor;
#endif
aMsg << eol;
aMsg << indent4 << "Boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
aMsg << indent4 << wxT( "Boost: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
<< ( BOOST_VERSION % 100 ) << eol;
#ifdef KICAD_USE_OCC
aMsg << indent4 << "OCC: " << OCC_VERSION_COMPLETE << eol;
aMsg << indent4 << wxT( "OCC: " ) << OCC_VERSION_COMPLETE << eol;
#endif
aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol;
aMsg << indent4 << wxT( "Curl: " ) << GetCurlLibVersion() << eol;
#if defined( KICAD_SPICE )
#if defined( NGSPICE_BUILD_VERSION )
aMsg << indent4 << "ngspice: " << NGSPICE_BUILD_VERSION << eol;
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_BUILD_VERSION << eol;
#elif defined( NGSPICE_HAVE_CONFIG_H )
#undef HAVE_STRNCASECMP /* is redefined in ngspice/config.h */
#include <ngspice/config.h>
aMsg << indent4 << "ngspice: " << PACKAGE_VERSION << eol;
aMsg << indent4 << wxT( "ngspice: " ) << PACKAGE_VERSION << eol;
#elif defined( NGSPICE_PACKAGE_VERSION )
aMsg << indent4 << "ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_PACKAGE_VERSION << eol;
#else
aMsg << indent4 << "ngspice: " << "unknown" << eol;
aMsg << indent4 << wxT( "ngspice: " ) << wxT( "unknown" ) << eol;
#endif
#endif
aMsg << indent4 << "Compiler: ";
aMsg << indent4 << wxT( "Compiler: " );
#if defined(__clang__)
aMsg << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
aMsg << wxT( "Clang " ) << __clang_major__ << wxT( "." ) << __clang_minor__ << wxT( "." ) << __clang_patchlevel__;
#elif defined(__GNUG__)
aMsg << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
aMsg << wxT( "GCC " ) << __GNUC__ << wxT( "." ) << __GNUC_MINOR__ << wxT( "." ) << __GNUC_PATCHLEVEL__;
#elif defined(_MSC_VER)
aMsg << "Visual C++ " << _MSC_VER;
aMsg << wxT( "Visual C++ " ) << _MSC_VER;
#elif defined(__INTEL_COMPILER)
aMsg << "Intel C++ " << __INTEL_COMPILER;
aMsg << wxT( "Intel C++ " ) << __INTEL_COMPILER;
#else
aMsg << "Other Compiler ";
aMsg << wxT( "Other Compiler " );
#endif
#if defined(__GXX_ABI_VERSION)
aMsg << " with C++ ABI " << __GXX_ABI_VERSION << eol;
aMsg << wxT( " with C++ ABI " ) << __GXX_ABI_VERSION << eol;
#else
aMsg << " without C++ ABI" << eol;
aMsg << wxT( " without C++ ABI" ) << eol;
#endif
aMsg << eol;
// Add build settings config (build options):
aMsg << "Build settings:" << eol;
aMsg << wxT( "Build settings:" ) << eol;
#ifdef KICAD_USE_OCC
aMsg << indent4 << "KICAD_USE_OCC=" << ON;
aMsg << indent4 << wxT( "KICAD_USE_OCC=" ) << ON;
#endif
#ifdef KICAD_USE_EGL
aMsg << indent4 << "KICAD_USE_EGL=" << ON;
aMsg << indent4 << wxT( "KICAD_USE_EGL=" ) << ON;
#endif
aMsg << indent4 << "KICAD_SPICE=";
aMsg << indent4 << wxT( "KICAD_SPICE=" );
#ifdef KICAD_SPICE
aMsg << ON;
#else
@@ -235,12 +235,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
#endif
#ifndef NDEBUG
aMsg << indent4 << "KICAD_STDLIB_DEBUG=";
aMsg << indent4 << wxT( "KICAD_STDLIB_DEBUG=" );
#ifdef KICAD_STDLIB_DEBUG
aMsg << ON;
#else
aMsg << OFF;
aMsg << indent4 << "KICAD_STDLIB_LIGHT_DEBUG=";
aMsg << indent4 << wxT( "KICAD_STDLIB_LIGHT_DEBUG=" );
#ifdef KICAD_STDLIB_LIGHT_DEBUG
aMsg << ON;
#else
@@ -248,14 +248,14 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
#endif
#endif
aMsg << indent4 << "KICAD_SANITIZE_ADDRESS=";
aMsg << indent4 << wxT( "KICAD_SANITIZE_ADDRESS=" );
#ifdef KICAD_SANITIZE_ADDRESS
aMsg << ON;
#else
aMsg << OFF;
#endif
aMsg << indent4 << "KICAD_SANITIZE_THREADS=";
aMsg << indent4 << wxT( "KICAD_SANITIZE_THREADS=" );
#ifdef KICAD_SANITIZE_THREADS
aMsg << ON;
#else
+1 -1
View File
@@ -102,7 +102,7 @@ wxString ExpandTextVars( const wxString& aSource,
else
{
// Token not resolved: leave the reference unchanged
newbuf.append( "${" + token + "}" );
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
}
}
else
+2 -2
View File
@@ -404,7 +404,7 @@ void PARAM_CFG_WXSTRING_SET::ReadParam( wxConfigBase* aConfig ) const
key = m_Ident;
key << i;
data = aConfig->Read( key, wxT( "" ) );
data = aConfig->Read( key, wxEmptyString );
if( data.IsEmpty() )
break;
@@ -494,7 +494,7 @@ void PARAM_CFG_LIBNAME_LIST::ReadParam( wxConfigBase* aConfig ) const
id_lib = m_Ident;
id_lib << indexlib;
indexlib++;
libname = aConfig->Read( id_lib, wxT( "" ) );
libname = aConfig->Read( id_lib, wxEmptyString );
if( libname.IsEmpty() )
break;
+248 -228
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
* Copyright (C) 2010-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2010-2022 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
@@ -64,18 +64,18 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.SetAppName( Pgm().App().GetAppName() );
/* Copyright information */
aInfo.SetCopyright( "(C) 1992-2021 KiCad Developers Team" );
aInfo.SetCopyright( "(C) 1992-2022 KiCad Developers Team" );
/* KiCad build version */
wxString version;
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
: GetBuildVersion() )
#ifdef DEBUG
<< ", debug"
<< wxT( ", debug" )
#else
<< ", release"
<< wxT( ", release" )
#endif
<< " build";
<< wxT( " build" );
aInfo.SetBuildVersion( version );
aInfo.SetBuildDate( GetBuildDate() );
@@ -93,15 +93,15 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
// Just in case someone builds KiCad with the platform native of Boost instead of
// the version included with the KiCad source.
libVersion << "and Boost " << ( BOOST_VERSION / 100000 ) << "."
<< ( BOOST_VERSION / 100 % 1000 ) << "." << ( BOOST_VERSION % 100 )
<< "\n";
libVersion << wxT( "and Boost " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 )
<< wxT( "\n" );
// Operating System Information
wxPlatformInfo platformInfo;
libVersion << "Platform: " << wxGetOsDescription() << ", "
libVersion << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
// TODO (ISM): Readd conditional once our wx fork and flatpaks are running released 3.1.5
#if 0 && wxCHECK_VERSION( 3, 1, 5 )
<< platformInfo.GetBitnessName();
@@ -117,64 +117,64 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxString description;
/* short description */
description << "<p>";
description << "<b><u>"
description << wxT( "<p>" );
description << wxT( "<b><u>" )
<< _( "Description" )
<< "</u></b>"; // bold & underlined font for caption
<< wxT( "</u></b>" ); // bold & underlined font for caption
description << "<p>"
description << wxT( "<p>" )
<< _( "The KiCad EDA Suite is a set of open source applications for the "
"creation of electronic schematics and printed circuit boards." )
<< "</p>";
<< wxT( "</p>" );
description << "</p>";
description << wxT( "</p>" );
/* websites */
description << "<p><b><u>"
description << wxT( "<p><b><u>" )
<< _( "KiCad on the web" )
<< "</u></b>"; // bold & underlined font for caption
<< wxT( "</u></b>" ); // bold & underlined font for caption
// bullet-ed list with some http links
description << "<ul>";
description << "<li>"
description << wxT( "<ul>" );
description << wxT( "<li>" )
<< _( "The official KiCad website - " )
<< HtmlHyperlink( "http://www.kicad.org" )
<< "</li>";
description << "<li>"
<< HtmlHyperlink( wxT( "http://www.kicad.org" ) )
<< wxT( "</li>" );
description << wxT( "<li>" )
<< _( "Developer website - " )
<< HtmlHyperlink( "https://go.kicad.org/dev" )
<< "</li>";
<< HtmlHyperlink( wxT( "https://go.kicad.org/dev" ) )
<< wxT( "</li>" );
description << "<li>"
description << wxT( "<li>" )
<< _("Official KiCad library repositories - " )
<< HtmlHyperlink( "https://go.kicad.org/libraries" )
<< "</li>";
<< HtmlHyperlink( wxT( "https://go.kicad.org/libraries" ) )
<< wxT( "</li>" );
description << "</ul></p>";
description << wxT( "</ul></p>" );
description << "<p><b><u>"
description << wxT( "<p><b><u>" )
<< _( "Bug tracker" )
<< "</u></b>"; // bold & underlined font caption
<< wxT( "</u></b>" ); // bold & underlined font caption
// bullet-ed list with some http links
description << "<ul>";
description << "<li>"
description << wxT( "<ul>" );
description << wxT( "<li>" )
<< _( "Report or examine bugs - " )
<< HtmlHyperlink( "https://go.kicad.org/bugs" )
<< "</li>";
description << "</ul></p>";
<< HtmlHyperlink( wxT( "https://go.kicad.org/bugs" ) )
<< wxT( "</li>" );
description << wxT( "</ul></p>" );
description << "<p><b><u>"
description << wxT( "<p><b><u>" )
<< _( "KiCad users group and community" )
<< "</u></b>"; // bold & underlined font caption
<< wxT( "</u></b>" ); // bold & underlined font caption
description << "<ul>";
description << "<li>"
description << wxT( "<ul>" );
description << wxT( "<li>" )
<< _( "KiCad forum - " )
<< HtmlHyperlink( "https://go.kicad.org/forum" )
<< "</li>";
<< HtmlHyperlink( wxT( "https://go.kicad.org/forum" ) )
<< wxT( "</li>" );
description << "</ul></p>";
description << wxT( "</ul></p>" );
aInfo.SetDescription( description );
@@ -182,12 +182,12 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
// License information also HTML formatted:
wxString license;
license
<< "<div align='center'>"
<< wxT( "<div align='center'>" )
<< HtmlNewline( 4 )
<< _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
<< HtmlHyperlink( "http://www.gnu.org/licenses",
<< HtmlHyperlink( wxT( "http://www.gnu.org/licenses" ),
_( "GNU General Public License (GPL) version 3 or any later version" ) )
<< "</div>";
<< wxT( "</div>" );
aInfo.SetLicense( license );
@@ -208,20 +208,20 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
#define LEAD_DEV _( "Lead Development Team" )
#define FORMER_DEV _( "Lead Development Alumni" )
#define CONTRIB_DEV _( "Additional Contributions By")
aInfo.AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ), LEAD_DEV, nullptr ) );
// Alphabetical after the first two
aInfo.AddDeveloper( new CONTRIBUTOR( "Jon Evans", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jon Evans" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Ian McInerney", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Seth Hillbrand" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ian McInerney" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Mark Roszko", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Thomas Pointhuber", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Mikolaj Wielgus", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( "Jeff Young", LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark Roszko" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Thomas Pointhuber" ), LEAD_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mikolaj Wielgus" ), LEAD_DEV, nullptr ) );
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( "John Beard" ), FORMER_DEV, nullptr ) );
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ), FORMER_DEV, nullptr ) );
@@ -533,13 +533,13 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ), CONTRIB_DEV, nullptr ) );
// The document writers
aInfo.AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Jon Evans" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Marco Ciampa" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jon Evans" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Igor Plyatov" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ) ) );
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ) ) );
/* The translators
* As category the language to which the translation was done is used
@@ -547,319 +547,339 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
wxEmptyString,
wxEmptyString,
"Czech (CS)" ) );
wxT( "Czech (CS)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Radek Kuznik" ),
wxEmptyString,
wxEmptyString,
"Czech (CS)" ) );
wxT( "Czech (CS)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roman Ondráček" ),
wxEmptyString,
wxEmptyString,
"Czech (CS)" ) );
wxT( "Czech (CS)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Straka" ),
wxEmptyString,
wxEmptyString,
"Czech (CS)" ) );
wxT( "Czech (CS)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Vykydal" ),
wxEmptyString,
wxEmptyString,
"Czech (CS)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Jonathan Haas",
wxT( "Czech (CS)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jonathan Haas" ),
wxEmptyString,
wxEmptyString,
"German (DE)" ) );
wxT( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Hämmerling" ),
wxEmptyString,
wxEmptyString,
"German (DE)" ) );
wxT( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mathias Neumann" ),
wxEmptyString,
wxEmptyString,
"German (DE)" ) );
wxT( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominik Wernberger" ),
wxEmptyString,
wxEmptyString,
"German (DE)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
wxT( "German (DE)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Manolis Stefanis" ),
wxEmptyString,
wxEmptyString,
"Greek (el_GR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
wxT( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Athanasios Vlastos" ),
wxEmptyString,
wxEmptyString,
"Greek (el_GR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
wxT( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Milonas Kostas" ),
wxEmptyString,
wxEmptyString,
"Greek (el_GR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
wxT( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Michail Misirlis" ),
wxEmptyString,
wxEmptyString,
"Greek (el_GR)" ) );
wxT( "Greek (el_GR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Adolfo Jayme Barrientos" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pedro Martin del Valle" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
wxEmptyString,
wxEmptyString,
"Spanish (ES)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
wxT( "Spanish (ES)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Vesa Solonen" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Alex Gellen",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Alex Gellen" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "J. Lavoie",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "J. Lavoie" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Purkka Koodari",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Purkka Koodari" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Ola Rinta-Koski",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ola Rinta-Koski" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Riku Viitanen",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Riku Viitanen" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Simo Mattila",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Simo Mattila" ),
wxEmptyString,
wxEmptyString,
"Finnish (FI)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
wxT( "Finnish (FI)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ),
wxEmptyString,
wxEmptyString,
"French (FR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
wxT( "French (FR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Marco Ciampa" ),
wxEmptyString,
wxEmptyString,
"Italian (IT)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Hiroshi Tokita",
wxT( "Italian (IT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hiroshi Tokita" ),
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kenta Yonekura" ),
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Ji Yoon Choi",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Hidemichi Gotou",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Kaoru Zenyouji",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Kinichiro Inoguchi",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Norio Suzuki",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "starfort-jp",
wxEmptyString,
wxEmptyString,
"Japanese (JA)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hidemichi Gotou" ),
wxEmptyString,
wxEmptyString,
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kaoru Zenyouji" ),
wxEmptyString,
wxEmptyString,
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kinichiro Inoguchi" ),
wxEmptyString,
wxEmptyString,
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Norio Suzuki" ),
wxEmptyString,
wxEmptyString,
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "starfort-jp" ),
wxEmptyString,
wxEmptyString,
wxT( "Japanese (JA)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
wxEmptyString,
wxEmptyString,
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
wxEmptyString,
wxEmptyString,
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jeongsuAn" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "이상수" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jehunseo" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Uibeom Jung" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박준언" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "방준영" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박기정" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "hokim" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "강명구" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "서범기" ),
wxEmptyString,
wxEmptyString,
"Korean (KO)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Arend-Jan van Hilten",
wxT( "Korean (KO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Arend-Jan van Hilten" ),
wxEmptyString,
wxEmptyString,
"Dutch (NL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "CJ van der Hoeven",
wxT( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "CJ van der Hoeven" ),
wxEmptyString,
wxEmptyString,
"Dutch (NL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Pim Jansen",
wxT( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pim Jansen" ),
wxEmptyString,
wxEmptyString,
"Dutch (NL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
wxT( "Dutch (NL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
wxEmptyString,
wxEmptyString,
"Norwegian (NO)" ) );
wxT( "Norwegian (NO)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
wxEmptyString,
wxEmptyString,
"Polish (PL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
wxT( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kerusey Karyu" ),
wxEmptyString,
wxEmptyString,
"Polish (PL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Mark Roszko",
wxT( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Roszko" ),
wxEmptyString,
wxEmptyString,
"Polish (PL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "ZbeeGin",
wxT( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "ZbeeGin" ),
wxEmptyString,
wxEmptyString,
"Polish (PL)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
wxT( "Polish (PL)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
wxEmptyString,
wxEmptyString,
"Brazilian Portuguese (PT_BR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Wellington Terumi Uemura",
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Wellington Terumi Uemura" ),
wxEmptyString,
wxEmptyString,
"Brazilian Portuguese (PT_BR)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
wxEmptyString,
wxEmptyString,
"Portuguese (PT)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Renie Marquet",
wxT( "Portuguese (PT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Renie Marquet" ),
wxEmptyString,
wxEmptyString,
"Portuguese (PT)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Rafael Silva",
wxT( "Portuguese (PT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rafael Silva" ),
wxEmptyString,
wxEmptyString,
"Portuguese (PT)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
wxT( "Portuguese (PT)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Igor Plyatov" ),
wxEmptyString,
wxEmptyString,
"Russian (RU)" ) );
wxT( "Russian (RU)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Дмитрий Дёмин" ),
wxEmptyString,
wxEmptyString,
"Russian (RU)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
wxT( "Russian (RU)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Andrey Fedorushkov" ),
wxEmptyString,
wxEmptyString,
"Russian (RU)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
wxT( "Russian (RU)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Eldar Khayrullin" ),
wxEmptyString,
wxEmptyString,
"Russian (RU)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Konstantin Baranovskiy",
wxT( "Russian (RU)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Konstantin Baranovskiy" ),
wxEmptyString,
wxEmptyString,
"Russian (RU)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Axel Henriksson",
wxT( "Russian (RU)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Axel Henriksson" ),
wxEmptyString,
wxEmptyString,
"Swedish (SV)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Richard Jonsson",
wxT( "Swedish (SV)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Richard Jonsson" ),
wxEmptyString,
wxEmptyString,
"Swedish (SV)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
wxT( "Swedish (SV)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
wxEmptyString,
wxEmptyString,
"Swedish (SV)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Boonchai Kingrungped",
wxT( "Swedish (SV)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Boonchai Kingrungped" ),
wxEmptyString,
wxEmptyString,
"Thai (TH)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Liu Guang",
wxT( "Thai (TH)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Liu Guang" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Dingzhong Chen",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dingzhong Chen" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Rigo Ligo",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rigo Ligo" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Tian Yunhao",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tian Yunhao" ),
wxEmptyString,
wxEmptyString,
"Simplified Chinese (zh_CN)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
wxT( "Simplified Chinese (zh_CN)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
wxEmptyString,
wxEmptyString,
"Traditional Chinese (zh_TW)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "kai chiao chuang",
wxT( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "kai chiao chuang" ),
wxEmptyString,
wxEmptyString,
"Traditional Chinese (zh_TW)" ) );
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
wxT( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
wxEmptyString,
wxEmptyString,
"Traditional Chinese (zh_TW)" ) );
wxT( "Traditional Chinese (zh_TW)" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Remy Halvick" ),
wxEmptyString,
wxEmptyString,
wxT( "Other" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David J S Briscoe" ),
wxEmptyString,
wxEmptyString,
wxT( "Other" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominique Laigle" ),
wxEmptyString,
wxEmptyString,
wxT( "Other" ) ) );
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Paul Burke" ),
wxEmptyString,
wxEmptyString,
wxT( "Other" ) ) );
// Program credits for 3d models
@@ -879,33 +899,33 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Evan Shultz"), LIBRARIANS, aInfo.CreateKiBitmap( BITMAPS::library ) ) );
#define MODELS_3D_CONTRIBUTION _( "3D models by" )
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Maui",
"https://github.com/easyw",
"https://gitlab.com/kicad/libraries/kicad-packages3D-generator",
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Maui" ),
wxT( "https://github.com/easyw" ),
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D-generator" ),
MODELS_3D_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
wxEmptyString,
"https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master",
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master" ),
MODELS_3D_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
#define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
wxEmptyString,
"https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master",
wxT( "https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master" ),
SYMBOL_LIB_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::add_component ) ) );
#define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints by" )
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Thomas Pointhuber",
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Thomas Pointhuber" ),
wxEmptyString,
"https://gitlab.com/kicad/libraries/kicad-footprint-generator",
wxT( "https://gitlab.com/kicad/libraries/kicad-footprint-generator" ),
FOOTPRINT_LIB_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
wxEmptyString,
"https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master",
wxT( "https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master" ),
FOOTPRINT_LIB_CONTRIBUTION,
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
@@ -919,16 +939,16 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
wxEmptyString,
wxEmptyString,
ICON_CONTRIBUTION ) );
aInfo.AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
aInfo.AddArtist( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ),
wxEmptyString,
wxEmptyString,
ICON_CONTRIBUTION ) );
// Program credits for package developers.
aInfo.AddPackager( new CONTRIBUTOR( "Steven Falco" ) );
aInfo.AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
aInfo.AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
aInfo.AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Steven Falco" ) ) );
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Jean-Samuel Reynaud" ) ) );
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Bernhard Stegmaier" ) ) );
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Adam Wolf" ) ) );
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
}
@@ -961,9 +981,9 @@ static wxString HtmlHyperlink( const wxString& aUrl, const wxString& aDescriptio
wxString hyperlink = wxEmptyString;
if( aDescription.IsEmpty() )
hyperlink << "<a href='" << aUrl << "'>" << aUrl << "</a>";
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aUrl << wxT( "</a>" );
else
hyperlink << "<a href='" << aUrl << "'>" << aDescription << "</a>";
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aDescription << wxT( "</a>" );
return hyperlink;
}
@@ -981,7 +1001,7 @@ static wxString HtmlNewline( const unsigned int aCount )
wxString newlineTags = wxEmptyString;
for( size_t i = 0; i<aCount; ++i )
newlineTags << "<br>";
newlineTags << wxT( "<br>" );
return newlineTags;
}
+2 -2
View File
@@ -84,7 +84,7 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
m_titleName = aParent->GetAboutTitle();
m_staticTextAppTitle->SetLabel( m_titleName );
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
m_staticTextBuildVersion->SetLabel( wxT( "Version: " ) + m_info.GetBuildVersion() );
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
@@ -222,7 +222,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
// Of course the padding is different depending on the platform so we adjust the
// padding accordingly.
#if defined( __WXGTK__ )
padding += " ";
padding += wxT( " " );
#endif
wxPanel* outerPanel = new wxPanel( aParent );
wxBoxSizer* outerSizer = new wxBoxSizer( wxVERTICAL );
+4 -4
View File
@@ -399,8 +399,8 @@ void DIALOG_SHIM::OnPaint( wxPaintEvent &event )
void DIALOG_SHIM::OnModify()
{
if( !GetTitle().StartsWith( "*" ) )
SetTitle( "*" + GetTitle() );
if( !GetTitle().StartsWith( wxT( "*" ) ) )
SetTitle( wxT( "*" ) + GetTitle() );
}
@@ -488,8 +488,8 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
if( !IsQuasiModal() )
{
wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
"wasn't called" );
wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal" )
wxT( "wasn't called" ) );
return;
}
+6 -6
View File
@@ -153,7 +153,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
for( auto it = paths->begin(); it != paths->end(); ++it )
{
if ( !( *it ).m_Alias.StartsWith( "${" ) && !( *it ).m_Alias.StartsWith( "$(" ) )
if ( !( *it ).m_Alias.StartsWith( wxT( "${" ) ) && !( *it ).m_Alias.StartsWith( wxT( "$(" ) ) )
{
AppendSearchPath( it->m_Alias, it->m_Pathvar, it->m_Description );
@@ -172,7 +172,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
const wxString& path = it->second.GetValue();
AppendEnvVar( it->first, path, it->second.GetDefinedExternally() );
if( m_curdir.IsEmpty() && !path.StartsWith( "${" ) && !path.StartsWith( "$(" ) )
if( m_curdir.IsEmpty() && !path.StartsWith( wxT( "${" ) ) && !path.StartsWith( wxT( "$(" ) ) )
m_curdir = path;
}
@@ -639,19 +639,19 @@ void DIALOG_CONFIGURE_PATHS::OnHelp( wxCommandEvent& event )
"level. Environment variables defined at the system or user level "
"take precedence over the ones defined in this table. This means the "
"values in this table are ignored." );
msg << "<br><br><b>";
msg << wxT( "<br><br><b>" );
msg << _( "To ensure environment variable names are valid on all platforms, the name field "
"will only accept upper case letters, digits, and the underscore characters." );
msg << "</b>";
msg << wxT( "</b>" );
for( const auto& var : ENV_VAR::GetPredefinedEnvVars() )
{
msg << "<br><br><b>" << var << "</b>";
msg << wxT( "<br><br><b>" ) << var << wxT( "</b>" );
const auto desc = ENV_VAR::LookUpEnvVarHelp( var );
if( desc.size() > 0 )
msg << ": " << desc;
msg << wxT( ": " ) << desc;
}
+1 -1
View File
@@ -38,7 +38,7 @@ DIALOG_PASTE_SPECIAL::DIALOG_PASTE_SPECIAL( wxWindow* aParent,
"any designators that already exist in the design." ) );
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::KEEP_ANNOTATIONS ),
wxT( "" ) ); // Self explanatory
wxEmptyString ); // Self explanatory
m_pasteOptions->SetItemToolTip( static_cast<int>( PASTE_MODE::REMOVE_ANNOTATIONS ),
wxString::Format( _( "Replaces reference designators "
+25 -17
View File
@@ -144,32 +144,32 @@ PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS( DIALOG_SHIM* aDialog, wxWindow* aP
if( m_iconScaleSlider )
{
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
m_iconScaleSlider->Connect( wxEVT_SCROLL_TOP,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
m_iconScaleSlider->Connect( wxEVT_SCROLL_BOTTOM,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEUP,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_LINEDOWN,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEUP,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_PAGEDOWN,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBTRACK,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
m_iconScaleSlider->Connect( wxEVT_SCROLL_THUMBRELEASE,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleSlider->Connect( wxEVT_SCROLL_CHANGED,
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
wxScrollEventHandler( PANEL_COMMON_SETTINGS::OnScaleSlider ),
nullptr, this );
m_iconScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED,
wxCommandEventHandler( PANEL_COMMON_SETTINGS::OnIconScaleAuto ),
@@ -241,6 +241,7 @@ bool PANEL_COMMON_SETTINGS::TransferDataToWindow()
m_defaultPDFViewer->SetValue( Pgm().UseSystemPdfBrowser() );
m_otherPDFViewer->SetValue( !Pgm().UseSystemPdfBrowser() );
m_PDFViewerPath->SetValue( Pgm().GetPdfBrowserName() );
setPdfViewerPathState();
return true;
}
@@ -316,6 +317,7 @@ void PANEL_COMMON_SETTINGS::ResetPanel()
m_defaultPDFViewer->SetValue( defaultSettings.m_System.use_system_pdf_viewer );
m_otherPDFViewer->SetValue( !defaultSettings.m_System.use_system_pdf_viewer );
m_PDFViewerPath->SetValue( defaultSettings.m_System.pdf_viewer_name );
setPdfViewerPathState();
}
@@ -464,8 +466,14 @@ void PANEL_COMMON_SETTINGS::OnPDFViewerClick( wxCommandEvent& event )
}
void PANEL_COMMON_SETTINGS::onUpdateUIPdfPath( wxUpdateUIEvent& event )
void PANEL_COMMON_SETTINGS::OnRadioButtonPdfViewer( wxCommandEvent& aEvent )
{
// Used by both the m_pdfViewerBtn and m_PDFViewerPath
event.Enable( m_otherPDFViewer->GetValue() );
setPdfViewerPathState();
}
void PANEL_COMMON_SETTINGS::setPdfViewerPathState()
{
m_PDFViewerPath->Enable( m_otherPDFViewer->GetValue() );
m_pdfViewerBtn->Enable( m_otherPDFViewer->GetValue() );
}
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -326,9 +326,9 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
// Connect Events
m_textEditorBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
m_PDFViewerPath->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
m_defaultPDFViewer->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
m_otherPDFViewer->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
m_pdfViewerBtn->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
m_pdfViewerBtn->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
m_canvasScaleAuto->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
}
@@ -336,9 +336,9 @@ PANEL_COMMON_SETTINGS_BASE::~PANEL_COMMON_SETTINGS_BASE()
{
// Disconnect Events
m_textEditorBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnTextEditorClick ), NULL, this );
m_PDFViewerPath->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
m_defaultPDFViewer->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
m_otherPDFViewer->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnRadioButtonPdfViewer ), NULL, this );
m_pdfViewerBtn->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnPDFViewerClick ), NULL, this );
m_pdfViewerBtn->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_COMMON_SETTINGS_BASE::onUpdateUIPdfPath ), NULL, this );
m_canvasScaleAuto->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_COMMON_SETTINGS_BASE::OnCanvasScaleAuto ), NULL, this );
}
@@ -662,6 +662,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnRadioButton">OnRadioButtonPdfViewer</event>
</object>
</object>
</object>
@@ -737,6 +738,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnRadioButton">OnRadioButtonPdfViewer</event>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -801,7 +803,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
</object>
</object>
<object class="sizeritem" expanded="1">
@@ -876,7 +877,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnPDFViewerClick</event>
<event name="OnUpdateUI">onUpdateUIPdfPath</event>
</object>
</object>
</object>
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -88,7 +88,7 @@ class PANEL_COMMON_SETTINGS_BASE : public RESETTABLE_PANEL
// Virtual event handlers, override them in your derived class
virtual void OnTextEditorClick( wxCommandEvent& event ) { event.Skip(); }
virtual void onUpdateUIPdfPath( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnRadioButtonPdfViewer( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPDFViewerClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCanvasScaleAuto( wxCommandEvent& event ) { event.Skip(); }
+1 -1
View File
@@ -231,7 +231,7 @@ void PANEL_HOTKEYS_EDITOR::dumpHotkeys()
wxFileName fn( filename );
wxFFileOutputStream fileStream( fn.GetFullPath(), "w" );
wxFFileOutputStream fileStream( fn.GetFullPath(), wxT( "w" ) );
wxTextOutputStream stream( fileStream );
if( !fn.IsDirWritable() || ( fn.Exists() && !fn.IsFileWritable() ) )
+32 -9
View File
@@ -27,6 +27,7 @@
#include <pgm_base.h>
#include <base_units.h>
#include <eda_draw_frame.h>
#include <bitmaps.h>
#include <netclass.h>
#include <confirm.h>
@@ -69,11 +70,13 @@ std::vector<BITMAPS> g_lineStyleIcons;
wxArrayString g_lineStyleNames;
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, NETCLASSES* aNetclasses,
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_FRAME* aFrame,
NETCLASSES* aNetclasses,
const std::vector<wxString>& aNetNames,
bool aIsEEschema ) :
PANEL_SETUP_NETCLASSES_BASE( aParent->GetTreebook() ),
m_Parent( aParent ),
m_frame( aFrame ),
m_parent( aParent ),
m_netclasses( aNetclasses ),
m_netNames( aNetNames ),
m_hoveredCol( -1 )
@@ -185,6 +188,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, NETCLASSE
&PANEL_SETUP_NETCLASSES::OnNetclassGridMouseEvent,
this );
m_frame->Bind( UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this );
m_netclassGrid->EndBatch();
m_membershipGrid->EndBatch();
Thaw();
@@ -205,6 +210,24 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
m_netclassGrid->Disconnect( wxEVT_GRID_CELL_CHANGING,
wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ),
nullptr, this );
m_frame->Unbind( UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this );
}
void PANEL_SETUP_NETCLASSES::onUnitsChanged( wxCommandEvent& aEvent )
{
NETCLASSES tempNetClasses;
NETCLASSES* saveNetClasses = m_netclasses;
m_netclasses = &tempNetClasses; // No, address of stack var does not escape function
TransferDataFromWindow();
TransferDataToWindow();
m_netclasses = saveNetClasses;
aEvent.Skip();
}
@@ -251,7 +274,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataToWindow()
m_netclassGrid->AppendRows((int) m_netclasses->GetCount() + 1 ); // + 1 for default netclass
// enter the Default NETCLASS.
netclassToGridRow( m_Parent->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
netclassToGridRow( m_frame->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
// make the Default NETCLASS name read-only
wxGridCellAttr* cellAttr = m_netclassGrid->GetOrCreateCellAttr( 0, GRID_NAME );
@@ -265,7 +288,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataToWindow()
{
NETCLASSPTR netclass = i->second;
netclassToGridRow( m_Parent->GetUserUnits(), m_netclassGrid, row, netclass );
netclassToGridRow( m_frame->GetUserUnits(), m_netclassGrid, row, netclass );
for( const wxString& net : *netclass )
{
@@ -361,7 +384,7 @@ static void gridRowToNetclass( EDA_UNITS aUnits, wxGrid* grid, int row, const NE
nc->SetSchematicColor( wxColour( grid->GetCellValue( row, GRID_SCHEMATIC_COLOR ) ) );
nc->SetLineStyle( g_lineStyleNames.Index( grid->GetCellValue( row, GRID_LINESTYLE ) ) );
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
wxASSERT_MSG( nc->GetLineStyle() >= 0, wxT( "Line style name not found." ) );
}
@@ -373,7 +396,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
m_netclasses->Clear();
// Copy the default NetClass:
gridRowToNetclass( m_Parent->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
gridRowToNetclass( m_frame->GetUserUnits(), m_netclassGrid, 0, m_netclasses->GetDefault() );
// Copy other NetClasses:
for( int row = 1; row < m_netclassGrid->GetNumberRows(); ++row )
@@ -382,7 +405,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
GRID_NAME ) );
if( m_netclasses->Add( nc ) )
gridRowToNetclass( m_Parent->GetUserUnits(), m_netclassGrid, row, nc );
gridRowToNetclass( m_frame->GetUserUnits(), m_netclassGrid, row, nc );
}
// Now read all nets and push them in the corresponding netclass net buffer
@@ -415,7 +438,7 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
if( tmp.IsEmpty() )
{
wxString msg = _( "Netclass must have a name." );
m_Parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
m_parent->SetError( msg, this, m_netclassGrid, aRow, GRID_NAME );
return false;
}
@@ -424,7 +447,7 @@ bool PANEL_SETUP_NETCLASSES::validateNetclassName( int aRow, const wxString& aNa
if( ii != aRow && m_netclassGrid->GetCellValue( ii, GRID_NAME ).CmpNoCase( tmp ) == 0 )
{
wxString msg = _( "Netclass name already in use." );
m_Parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
m_parent->SetError( msg, this, m_netclassGrid, focusFirst ? aRow : ii, GRID_NAME );
return false;
}
}
+3 -3
View File
@@ -111,7 +111,7 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
if( m_pinMapSpecialCase )
{
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxT( "" ), _( "Ignore" ) };
wxString pinMapSeverities[] = { _( "From Pin Conflicts Map" ), wxEmptyString, _( "Ignore" ) };
int errorCode = m_pinMapSpecialCase->GetErrorCode();
wxString msg = m_pinMapSpecialCase->GetErrorText();
@@ -123,9 +123,9 @@ PANEL_SETUP_SEVERITIES::PANEL_SETUP_SEVERITIES( PAGED_DIALOG* aParent,
for( size_t i = 0; i < 3; ++i )
{
if( pinMapSeverities[i] == wxT( "" ) )
if( pinMapSeverities[i] == wxEmptyString )
{
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxT( "" ) );
wxStaticText* spacer = new wxStaticText( radioPanel, wxID_ANY, wxEmptyString );
radioSizer->Add( spacer, 0, wxRIGHT | wxEXPAND, 17 );
}
else
+25 -16
View File
@@ -34,6 +34,8 @@
#include <wx/menu.h>
#include <wx/textctrl.h>
#include <kiplatform/ui.h>
#include <kiway_holder.h>
#include <project.h>
WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL( wxWindow* parent, wxWindowID id, const wxPoint& pos,
const wxSize& size, long style ) :
@@ -187,20 +189,20 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
switch( aLine.severity )
{
case RPT_SEVERITY_ERROR:
retv = "<font color=#F04040 size=3>" + _( "Error:" ) + " </font>"
"<font size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#F04040 size=3>" ) + _( "Error:" ) + " </font>"
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
case RPT_SEVERITY_WARNING:
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
break;
case RPT_SEVERITY_INFO:
retv = "<font color=#909090 size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#909090 size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
case RPT_SEVERITY_ACTION:
retv = "<font color=#60D060 size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#60D060 size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
default:
retv = "<font size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
}
}
else
@@ -208,26 +210,26 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
switch( aLine.severity )
{
case RPT_SEVERITY_ERROR:
retv = "<font color=#D00000 size=3>" + _( "Error:" ) + " </font>"
"<font size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#D00000 size=3>" ) + _( "Error:" ) + " </font>"
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
case RPT_SEVERITY_WARNING:
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
break;
case RPT_SEVERITY_INFO:
retv = "<font color=#808080 size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#808080 size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
case RPT_SEVERITY_ACTION:
retv = "<font color=#008000 size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font color=#008000 size=3>" ) + aLine.message + wxT( "</font><br>" );
break;
default:
retv = "<font size=3>" + aLine.message + "</font><br>";
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
}
}
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
// Roman cells. This keeps the line in a single cell.
retv.Replace( " ", "&nbsp;" );
retv.Replace( wxT( " " ), wxT( "&nbsp;" ) );
return retv;
}
@@ -248,7 +250,7 @@ wxString WX_HTML_REPORT_PANEL::generatePlainText( const REPORT_LINE& aLine )
void WX_HTML_REPORT_PANEL::onRightClick( wxMouseEvent& event )
{
wxMenu popup;
popup.Append( wxID_COPY, "Copy" );
popup.Append( wxID_COPY, wxT( "Copy" ) );
PopupMenu( &popup );
}
@@ -352,7 +354,14 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
wxFileName fn;
if( m_reportFileName.empty() )
fn = wxT( "./report.txt" );
{
fn = wxT( "report.txt" );
KIWAY_HOLDER* parent = dynamic_cast<KIWAY_HOLDER*>( m_parent );
if( parent )
fn.SetPath( parent->Prj().GetProjectPath() );
}
else
fn = m_reportFileName;
@@ -367,7 +376,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
if( fn.GetExt().IsEmpty() )
fn.SetExt( "txt" );
wxFFile f( fn.GetFullPath(), "wb" );
wxFFile f( fn.GetFullPath(), wxT( "wb" ) );
if( !f.IsOpened() )
{
+23 -9
View File
@@ -94,6 +94,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS );
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
KIPLATFORM::UI::SetOverlayScrolling( this, false ); // Prevent excessive repaint on GTK
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), nullptr, this );
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), nullptr,
@@ -212,13 +213,24 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
try
{
cntUpd.Start();
m_view->UpdateItems();
try
{
m_view->UpdateItems();
}
catch( std::out_of_range& err )
{
// Don't do anything here but don't fail
// This can happen when we don't catch `at()` calls
wxString msg;
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
wxLogDebug( msg );
}
cntUpd.Stop();
cntCtx.Start();
int cookie = rand();
m_gal->LockContext( cookie );
m_gal->BeginDrawing();
KIGFX::GAL_DRAWING_CONTEXT ctx( m_gal );
cntCtx.Stop();
if( m_view->IsTargetDirty( KIGFX::TARGET_OVERLAY )
@@ -239,9 +251,11 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
if( m_view->IsDirty() )
{
if( m_backend != GAL_TYPE_OPENGL && // Already called in opengl
m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
{
m_gal->ClearScreen();
}
m_view->ClearTargets();
@@ -258,9 +272,6 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
m_gal->DrawCursor( m_viewControls->GetCursorPosition() );
cntCtxDestroy.Start();
m_gal->EndDrawing();
m_gal->UnlockContext( cookie );
cntCtxDestroy.Stop();
}
catch( std::exception& err )
{
@@ -279,6 +290,9 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
}
}
// ctx goes out of scope here so destructor would be called
cntCtxDestroy.Stop();
if( isDirty )
{
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 Jean-Pierre Charras <jp.charras at wanadoo.fr>.
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
*
* This program is free software; you can redistribute it and/or
@@ -494,6 +494,12 @@ void DRAWING_SHEET_PARSER::parseBitmap( DS_DATA_ITEM_BITMAP * aItem )
NeedRIGHT();
break;
case T_comment:
NeedSYMBOLorNUMBER();
aItem->m_Info = FromUTF8();
NeedRIGHT();
break;
case T_pngdata:
readPngdata( aItem );
break;
@@ -893,7 +899,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
}
}
wxFFile wksFile( fullFileName, "rb" );
wxFFile wksFile( fullFileName, wxT( "rb" ) );
if( ! wksFile.IsOpened() )
{
@@ -933,7 +939,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
}
catch( const std::bad_alloc& )
{
wxLogMessage( "Memory exhaustion reading drawing sheet" );
wxLogMessage( wxT( "Memory exhaustion reading drawing sheet" ) );
return false;
}
}
+3 -4
View File
@@ -142,19 +142,18 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
}
else if( token->IsSameAs( wxT( "PAPER" ) ) )
{
*token = m_paperFormat ? *m_paperFormat : wxString( "" );
*token = m_paperFormat ? *m_paperFormat : wxString( wxEmptyString );
tokenUpdated = true;
}
else if( token->IsSameAs( wxT( "LAYER" ) ) )
{
*token = m_sheetLayer ? *m_sheetLayer : wxString( "" );
*token = m_sheetLayer ? *m_sheetLayer : wxString( wxEmptyString );
tokenUpdated = true;
}
else if( m_titleBlock )
{
m_titleBlock->TextVarResolver( token, m_project );
// no need for tokenUpdated; TextVarResolver() did a full resolve
return true;
return m_titleBlock->TextVarResolver( token, m_project );
}
if( tokenUpdated )
+23 -23
View File
@@ -183,7 +183,7 @@ wxWindow* EDA_BASE_FRAME::findQuasiModalDialog()
// so we have to look for it separately.
if( m_ident == FRAME_SCH )
{
wxWindow* cvpcb = wxWindow::FindWindowByName( "CvpcbFrame" );
wxWindow* cvpcb = wxWindow::FindWindowByName( wxT( "CvpcbFrame" ) );
if( cvpcb )
return cvpcb;
@@ -332,7 +332,7 @@ bool EDA_BASE_FRAME::doAutoSave()
void EDA_BASE_FRAME::OnCharHook( wxKeyEvent& aKeyEvent )
{
wxLogTrace( kicadTraceKeyEvent, "EDA_BASE_FRAME::OnCharHook %s", dump( aKeyEvent ) );
wxLogTrace( kicadTraceKeyEvent, wxT( "EDA_BASE_FRAME::OnCharHook %s" ), dump( aKeyEvent ) );
// Key events can be filtered here.
// Currently no filtering is made.
@@ -535,7 +535,7 @@ void EDA_BASE_FRAME::OnSize( wxSizeEvent& aEvent )
if( m_displayIndex >= 0 && currentDisplay >= 0 && currentDisplay != m_displayIndex )
{
wxLogTrace( traceDisplayLocation, "OnSize: current display changed %d to %d",
wxLogTrace( traceDisplayLocation, wxT( "OnSize: current display changed %d to %d" ),
m_displayIndex, currentDisplay );
m_displayIndex = currentDisplay;
ensureWindowIsOnScreen();
@@ -569,7 +569,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
m_frameSize.x = aState.size_x;
m_frameSize.y = aState.size_y;
wxLogTrace( traceDisplayLocation, "Config position (%d, %d) with size (%d, %d)",
wxLogTrace( traceDisplayLocation, wxT( "Config position (%d, %d) with size (%d, %d)" ),
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
// Ensure minimum size is set if the stored config was zero-initialized
@@ -578,15 +578,15 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
m_frameSize = defaultSize( m_ident );
wasDefault = true;
wxLogTrace( traceDisplayLocation, "Using minimum size (%d, %d)",
wxLogTrace( traceDisplayLocation, wxT( "Using minimum size (%d, %d)" ),
m_frameSize.x, m_frameSize.y );
}
wxLogTrace( traceDisplayLocation, "Number of displays: %d", wxDisplay::GetCount() );
wxLogTrace( traceDisplayLocation, wxT( "Number of displays: %d" ), wxDisplay::GetCount() );
if( aState.display >= wxDisplay::GetCount() )
{
wxLogTrace( traceDisplayLocation, "Previous display not found" );
wxLogTrace( traceDisplayLocation, wxT( "Previous display not found" ) );
// If it isn't attached, use the first display
// Warning wxDisplay has 2 ctor variants. the parameter needs a type:
@@ -622,11 +622,11 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
upperLeft.y > yLimBottom )
{
m_framePos = wxDefaultPosition;
wxLogTrace( traceDisplayLocation, "Resetting to default position" );
wxLogTrace( traceDisplayLocation, wxT( "Resetting to default position" ) );
}
}
wxLogTrace( traceDisplayLocation, "Final window position (%d, %d) with size (%d, %d)",
wxLogTrace( traceDisplayLocation, wxT( "Final window position (%d, %d) with size (%d, %d)" ),
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
@@ -634,7 +634,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
// Center the window if we reset to default
if( m_framePos.x == -1 )
{
wxLogTrace( traceDisplayLocation, "Centering window" );
wxLogTrace( traceDisplayLocation, wxT( "Centering window" ) );
Center();
m_framePos = GetPosition();
}
@@ -646,7 +646,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
// Maximize if we were maximized before
if( aState.maximized || ( wasDefault && m_maximizeByDefault ) )
{
wxLogTrace( traceDisplayLocation, "Maximizing window" );
wxLogTrace( traceDisplayLocation, wxT( "Maximizing window" ) );
Maximize();
}
@@ -662,13 +662,13 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
wxSize size = GetWindowSize();
wxLogTrace( traceDisplayLocation,
"ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d", clientSize.x, clientSize.y,
wxT( "ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d" ), clientSize.x, clientSize.y,
clientSize.width, clientSize.height );
if( pos.y < clientSize.y )
{
wxLogTrace( traceDisplayLocation,
"ensureWindowIsOnScreen: y pos %d below minimum, setting to %d", pos.y,
wxT( "ensureWindowIsOnScreen: y pos %d below minimum, setting to %d" ), pos.y,
clientSize.y );
pos.y = clientSize.y;
}
@@ -676,7 +676,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
if( pos.x < clientSize.x )
{
wxLogTrace( traceDisplayLocation,
"ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d", pos.x,
wxT( "ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d" ), pos.x,
clientSize.x );
pos.x = clientSize.x;
}
@@ -685,7 +685,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
{
int newWidth = clientSize.width - ( pos.x - clientSize.x );
wxLogTrace( traceDisplayLocation,
"ensureWindowIsOnScreen: effective width %d above available %d, setting to %d",
wxT( "ensureWindowIsOnScreen: effective width %d above available %d, setting to %d" ),
pos.x + size.x, clientSize.width, newWidth );
size.x = newWidth;
}
@@ -694,12 +694,12 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
{
int newHeight = clientSize.height - ( pos.y - clientSize.y );
wxLogTrace( traceDisplayLocation,
"ensureWindowIsOnScreen: effective height %d above available %d, setting to %d",
wxT( "ensureWindowIsOnScreen: effective height %d above available %d, setting to %d" ),
pos.y + size.y, clientSize.height, newHeight );
size.y = newHeight;
}
wxLogTrace( traceDisplayLocation, "Updating window position (%d, %d) with size (%d, %d)",
wxLogTrace( traceDisplayLocation, wxT( "Updating window position (%d, %d) with size (%d, %d)" ),
pos.x, pos.y, size.x, size.y );
SetSize( pos.x, pos.y, size.x, size.y );
@@ -748,9 +748,9 @@ void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg )
aCfg->state.maximized = IsMaximized();
aCfg->state.display = wxDisplay::GetFromWindow( this );
wxLogTrace( traceDisplayLocation, "Saving window maximized: %s",
IsMaximized() ? "true" : "false" );
wxLogTrace( traceDisplayLocation, "Saving config position (%d, %d) with size (%d, %d)",
wxLogTrace( traceDisplayLocation, wxT( "Saving window maximized: %s" ),
IsMaximized() ? wxT( "true" ) : wxT( "false" ) );
wxLogTrace( traceDisplayLocation, wxT( "Saving config position (%d, %d) with size (%d, %d)" ),
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
// TODO(JE) should auto-save in common settings be overwritten by every app?
@@ -845,7 +845,7 @@ void EDA_BASE_FRAME::CreateInfoBar()
#else
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxT( "InfoBar" ) ).Top().Layer(1) );
#endif
}
@@ -860,7 +860,7 @@ void EDA_BASE_FRAME::FinishAUIInitialization()
m_auimgr.Update();
// We don't want the infobar displayed right away
m_auimgr.GetPane( "InfoBar" ).Hide();
m_auimgr.GetPane( wxT( "InfoBar" ) ).Hide();
m_auimgr.Update();
#endif
}
@@ -1224,7 +1224,7 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
m_normalFrameSize = GetWindowSize();
m_normalFramePos = GetPosition();
wxLogTrace( traceDisplayLocation,
"Maximizing window - Saving position (%d, %d) with size (%d, %d)",
wxT( "Maximizing window - Saving position (%d, %d) with size (%d, %d)" ),
m_normalFramePos.x, m_normalFramePos.y,
m_normalFrameSize.x, m_normalFrameSize.y );
}
+1 -6
View File
@@ -71,19 +71,14 @@ static const wxFileTypeInfo EDAfallbacks[] =
};
bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT* aProject )
bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT* aProject, SEARCH_STACK* aPaths )
{
SEARCH_STACK* aPaths = nullptr;
wxString docname;
wxString fullfilename;
wxString msg;
wxString command;
bool success = false;
#if defined( EESCHEMA )
SEARCH_STACK* aPaths = aProject ? aProject->SchSearchS() : nullptr;
#endif
// Is an internet url
static const std::vector<wxString> url_header =
{
+36 -40
View File
@@ -72,7 +72,6 @@
BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
EVT_UPDATE_UI( ID_ON_GRID_SELECT, EDA_DRAW_FRAME::OnUpdateSelectGrid )
EVT_UPDATE_UI( ID_ON_ZOOM_SELECT, EDA_DRAW_FRAME::OnUpdateSelectZoom )
EVT_ACTIVATE( EDA_DRAW_FRAME::onActivate )
END_EVENT_TABLE()
@@ -267,11 +266,20 @@ void EDA_DRAW_FRAME::unitsChangeRefresh()
void EDA_DRAW_FRAME::ToggleUserUnits()
{
SetUserUnits( m_userUnits == EDA_UNITS::INCHES ? EDA_UNITS::MILLIMETRES : EDA_UNITS::INCHES );
unitsChangeRefresh();
if( m_toolManager->GetTool<COMMON_TOOLS>() )
{
TOOL_EVENT dummy;
m_toolManager->GetTool<COMMON_TOOLS>()->ToggleUnits( dummy );
}
else
{
SetUserUnits( m_userUnits == EDA_UNITS::INCHES ? EDA_UNITS::MILLIMETRES
: EDA_UNITS::INCHES );
unitsChangeRefresh();
wxCommandEvent e( UNITS_CHANGED );
ProcessEventLocally( e );
wxCommandEvent e( UNITS_CHANGED );
ProcessEventLocally( e );
}
}
@@ -348,7 +356,7 @@ void EDA_DRAW_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
{
wxCHECK_RET( m_gridSelectBox, "m_gridSelectBox uninitialized" );
wxCHECK_RET( m_gridSelectBox, wxT( "m_gridSelectBox uninitialized" ) );
int idx = m_gridSelectBox->GetCurrentSelection();
@@ -379,6 +387,9 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
UpdateStatusBar();
m_canvas->Refresh();
// Needed on Windows because clicking on m_gridSelectBox remove the focus from m_canvas
// (Windows specific
m_canvas->SetFocus();
}
@@ -443,33 +454,9 @@ void EDA_DRAW_FRAME::UpdateZoomSelectBox()
}
void EDA_DRAW_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
{
if( m_zoomSelectBox == nullptr || m_zoomSelectBox->GetParent() == nullptr )
return;
int current = 0; // display Auto if no match found
// check for a match within 1%
double zoom = GetCanvas()->GetGAL()->GetZoomFactor();
for( unsigned i = 0; i < config()->m_Window.zoom_factors.size(); i++ )
{
if( std::fabs( zoom - config()->m_Window.zoom_factors[i] ) < ( zoom / 100.0 ) )
{
current = i + 1;
break;
}
}
if( current != m_zoomSelectBox->GetSelection() )
m_zoomSelectBox->SetSelection( current );
}
void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
{
wxCHECK_RET( m_zoomSelectBox, "m_zoomSelectBox uninitialized" );
wxCHECK_RET( m_zoomSelectBox, wxT( "m_zoomSelectBox uninitialized" ) );
int id = m_zoomSelectBox->GetCurrentSelection();
@@ -479,6 +466,9 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
m_toolManager->RunAction( ACTIONS::zoomPreset, true, static_cast<intptr_t>( id ) );
UpdateStatusBar();
m_canvas->Refresh();
// Needed on Windows because clicking on m_zoomSelectBox remove the focus from m_canvas
// (Windows specific
m_canvas->SetFocus();
}
@@ -514,7 +504,7 @@ void EDA_DRAW_FRAME::AddStandardSubMenus( TOOL_MENU& aToolMenu )
gridMenu->SetTool( commonTools );
aToolMenu.AddSubMenu( gridMenu );
aMenu.AddMenu( zoomMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
aMenu.AddMenu( zoomMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
aMenu.AddMenu( gridMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
}
@@ -535,7 +525,7 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
{
wxString line;
line.Printf( "grid %s",
line.Printf( wxT( "grid %s" ),
MessageTextFromValue( GetUserUnits(), GetCanvas()->GetGAL()->GetGridSize().x,
false ) );
@@ -710,7 +700,7 @@ void EDA_DRAW_FRAME::SetMsgPanel( EDA_ITEM* aItem )
void EDA_DRAW_FRAME::UpdateMsgPanel()
{
GetToolManager()->PostEvent( EVENTS::SelectedItemsModified );
GetToolManager()->ProcessEvent( EVENTS::SelectedItemsModified );
}
@@ -979,18 +969,22 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
wxString prompt = doOpen ? _( "Select Library" ) : _( "New Library" );
aFilename.SetExt( ext );
wxString dir = aGlobalPath;
wxString dir;
if( GetMruPath().IsEmpty() )
dir = aGlobalPath;
else
dir = GetMruPath();
if( isDirectory && doOpen )
{
if( !aIsGlobal )
if( !aIsGlobal && GetMruPath().IsEmpty() )
{
dir = Prj().GetProjectPath();
}
wxDirDialog dlg( this, prompt, dir,
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
wxDirDialog dlg( this, prompt, dir, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
if( dlg.ShowModal() == wxID_CANCEL )
return false;
@@ -1002,9 +996,9 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
{
// Ensure the file has a dummy name, otherwise GTK will display the regex from the filter
if( aFilename.GetName().empty() )
aFilename.SetName( "Library" );
aFilename.SetName( wxT( "Library" ) );
if( !aIsGlobal )
if( !aIsGlobal && GetMruPath().IsEmpty() )
{
dir = Prj().IsNullProject() ? aFilename.GetFullPath() : Prj().GetProjectPath();
}
@@ -1020,6 +1014,8 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
aFilename.SetExt( ext );
}
SetMruPath( aFilename.GetPath() );
return true;
}
+1
View File
@@ -320,6 +320,7 @@ static struct EDA_ITEM_DESC
.Map( PCB_FP_SHAPE_T, _HKI( "Graphic" ) )
.Map( PCB_FP_ZONE_T, _HKI( "Zone" ) )
.Map( PCB_TRACE_T, _HKI( "Track" ) )
.Map( PCB_ARC_T, _HKI( "Track" ) )
.Map( PCB_VIA_T, _HKI( "Via" ) )
.Map( PCB_MARKER_T, _HKI( "Marker" ) )
.Map( PCB_DIM_ALIGNED_T, _HKI( "Dimension" ) )
+21 -21
View File
@@ -143,7 +143,7 @@ bool EDA_PATTERN_MATCH_WILDCARD::SetPattern( const wxString& aPattern )
}
else if( to_replace.Find( c ) != wxNOT_FOUND )
{
regex += "\\";
regex += wxT( "\\" );
regex += c;
}
else
@@ -192,7 +192,7 @@ bool EDA_PATTERN_MATCH_WILDCARD_EXPLICIT::SetPattern( const wxString& aPattern )
}
else if( to_replace.Find( c ) != wxNOT_FOUND )
{
regex += "\\";
regex += wxT( "\\" );
regex += c;
}
else
@@ -221,20 +221,20 @@ bool EDA_PATTERN_MATCH_RELATIONAL::SetPattern( const wxString& aPattern )
m_key = key.Lower();
if( rel == "<" )
if( rel == wxT( "<" ) )
m_relation = LT;
else if( rel == "<=" )
else if( rel == wxT( "<=" ) )
m_relation = LE;
else if( rel == "=" )
else if( rel == wxT( "=" ) )
m_relation = EQ;
else if( rel == ">=" )
else if( rel == wxT( ">=" ) )
m_relation = GE;
else if( rel == ">" )
else if( rel == wxT( ">" ) )
m_relation = GT;
else
return false;
if( val == "" )
if( val == wxEmptyString )
{
// Matching on empty values keeps the match list from going empty when
// the user types the relational operator character, which helps prevent
@@ -333,19 +333,19 @@ wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_description(
wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_search(
R"(^(\w+)(<|<=|=|>=|>)([-+]?[\d.]*)(\w*)$)", wxRE_ADVANCED );
const std::map<wxString, double> EDA_PATTERN_MATCH_RELATIONAL::m_units = {
{ "p", 1e-12 },
{ "n", 1e-9 },
{ "u", 1e-6 },
{ "m", 1e-3 },
{ "", 1. },
{ "k", 1e3 },
{ "meg",1e6 },
{ "g", 1e9 },
{ "t", 1e12 },
{ "ki", 1024. },
{ "mi", 1048576. },
{ "gi", 1073741824. },
{ "ti", 1099511627776. } };
{ wxT( "p" ), 1e-12 },
{ wxT( "n" ), 1e-9 },
{ wxT( "u" ), 1e-6 },
{ wxT( "m" ), 1e-3 },
{ wxEmptyString, 1. },
{ wxT( "k" ), 1e3 },
{ wxT( "meg" ),1e6 },
{ wxT( "g" ), 1e9 },
{ wxT( "t" ), 1e12 },
{ wxT( "ki" ), 1024. },
{ wxT( "mi" ), 1048576. },
{ wxT( "gi" ), 1073741824. },
{ wxT( "ti" ), 1099511627776. } };
EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern )
+40 -15
View File
@@ -72,13 +72,13 @@ wxString EDA_SHAPE::SHAPE_T_asString() const
{
switch( m_shape )
{
case SHAPE_T::SEGMENT: return "S_SEGMENT";
case SHAPE_T::RECT: return "S_RECT";
case SHAPE_T::ARC: return "S_ARC";
case SHAPE_T::CIRCLE: return "S_CIRCLE";
case SHAPE_T::POLY: return "S_POLYGON";
case SHAPE_T::BEZIER: return "S_CURVE";
case SHAPE_T::LAST: return "!S_LAST!"; // Synthetic value, but if we come across it then
case SHAPE_T::SEGMENT: return wxT( "S_SEGMENT" );
case SHAPE_T::RECT: return wxT( "S_RECT" );
case SHAPE_T::ARC: return wxT( "S_ARC" );
case SHAPE_T::CIRCLE: return wxT( "S_CIRCLE" );
case SHAPE_T::POLY: return wxT( "S_POLYGON" );
case SHAPE_T::BEZIER: return wxT( "S_CURVE" );
case SHAPE_T::LAST: return wxT( "!S_LAST!" ); // Synthetic value, but if we come across it then
// we're going to want to know.
}
@@ -436,6 +436,12 @@ void EDA_SHAPE::SetCenter( const wxPoint& aCenter )
wxPoint EDA_SHAPE::GetArcMid() const
{
// If none of the input data have changed since we loaded the arc,
// keep the original mid point data to minimize churn
if( m_arcMidData.start == m_start && m_arcMidData.end == m_end
&& m_arcMidData.center == m_arcCenter )
return m_arcMidData.mid;
wxPoint mid = m_start;
RotatePoint( &mid, m_arcCenter, -GetArcAngle() / 2.0 );
return mid;
@@ -486,19 +492,35 @@ int EDA_SHAPE::GetRadius() const
}
void EDA_SHAPE::SetCachedArcData( const wxPoint& aStart, const wxPoint& aMid, const wxPoint& aEnd, const wxPoint& aCenter )
{
m_arcMidData.start = aStart;
m_arcMidData.end = aEnd;
m_arcMidData.center = aCenter;
m_arcMidData.mid = aMid;
}
void EDA_SHAPE::SetArcGeometry( const wxPoint& aStart, const wxPoint& aMid, const wxPoint& aEnd )
{
m_arcMidData = {};
m_start = aStart;
m_end = aEnd;
m_arcCenter = CalcArcCenter( aStart, aMid, aEnd );
wxPoint new_mid = GetArcMid();
m_endsSwapped = false;
/**
* If the input winding doesn't match our internal winding, the calculated midpoint will end up
* on the other side of the arc. In this case, we need to flip the start/end points and flag this
* change for the system
// Watch the ordering here. GetArcMid above needs to be called prior to initializing the
// m_arcMidData structure in order to ensure we get the calculated variant, not the cached
SetCachedArcData( aStart, aMid, aEnd, m_arcCenter );
/*
* If the input winding doesn't match our internal winding, the calculated midpoint will end
* up on the other side of the arc. In this case, we need to flip the start/end points and
* flag this change for the system.
*/
wxPoint new_mid = GetArcMid();
VECTOR2D dist( new_mid - aMid );
VECTOR2D dist2( new_mid - m_arcCenter );
@@ -572,7 +594,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
case SHAPE_T::POLY:
aList.emplace_back( shape, _( "Polygon" ) );
msg.Printf( "%d", GetPolyShape().Outline(0).PointCount() );
msg.Printf( wxT( "%d" ), GetPolyShape().Outline(0).PointCount() );
aList.emplace_back( _( "Points" ), msg );
break;
@@ -1140,6 +1162,9 @@ std::vector<SHAPE*> EDA_SHAPE::MakeEffectiveShapes() const
case SHAPE_T::POLY:
{
if( GetPolyShape().OutlineCount() == 0 ) // malformed/empty polygon
break;
SHAPE_LINE_CHAIN l = GetPolyShape().COutline( 0 );
l.Rotate( -DECIDEG2RAD( getParentOrientation() ) );
@@ -1388,7 +1413,7 @@ void EDA_SHAPE::calcEdit( const wxPoint& aPosition )
}
void EDA_SHAPE::endEdit()
void EDA_SHAPE::endEdit( bool aClosed )
{
switch( GetShape() )
{
@@ -1407,7 +1432,7 @@ void EDA_SHAPE::endEdit()
{
if( poly.CPoint( poly.GetPointCount() - 2 ) == poly.CLastPoint() )
{
poly.SetClosed( true );
poly.SetClosed( aClosed );
poly.Remove( poly.GetPointCount() - 1 );
}
}
+20 -31
View File
@@ -188,7 +188,7 @@ bool EDA_TEXT::Replace( const wxFindReplaceData& aSearchData )
void EDA_TEXT::cacheShownText()
{
if( m_text.IsEmpty() || m_text == wxT( "~" ) ) // ~ is legacy empty-string token
if( m_text.IsEmpty() )
{
m_shown_text = wxEmptyString;
m_shown_text_has_text_var_refs = false;
@@ -275,18 +275,16 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
const auto& font = basic_gal.GetStrokeFont();
VECTOR2D fontSize( GetTextSize() );
double penWidth( thickness );
int dx = KiROUND( font.ComputeStringBoundaryLimits( text, fontSize, penWidth ).x );
int dy = GetInterline();
VECTOR2D extents = font.ComputeStringBoundaryLimits( text, fontSize, penWidth );
double interline = KIGFX::STROKE_FONT::GetInterline( fontSize.y );
// Creates bounding box (rectangle) for horizontal, left and top justified text. The
// bounding box will be moved later according to the actual text options
wxSize textsize = wxSize( dx, dy );
wxSize textsize = wxSize( KiROUND( extents.x ), KiROUND( extents.y ) );
wxPoint pos = GetTextPos();
if( IsMultilineAllowed() && aLine > 0 && ( aLine < static_cast<int>( strings.GetCount() ) ) )
{
pos.y -= aLine * GetInterline();
}
pos.y -= KiROUND( aLine * interline );
if( aInvertY )
pos.y = -pos.y;
@@ -312,10 +310,15 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
for( unsigned ii = 1; ii < strings.GetCount(); ii++ )
{
text = strings.Item( ii );
dx = KiROUND( font.ComputeStringBoundaryLimits( text, fontSize, penWidth ).x );
textsize.x = std::max( textsize.x, dx );
textsize.y += dy;
extents = font.ComputeStringBoundaryLimits( text, fontSize, penWidth );
textsize.x = std::max( textsize.x, KiROUND( extents.x ) );
}
// interline spacing is only *between* lines, so total height is the height of the first
// line plus the interline distance (with interline spacing) for all subsequent lines
// Don't add interline spacing to empty textboxes
if( strings.GetCount() )
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline );
}
rect.SetSize( textsize );
@@ -334,7 +337,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
break;
case GR_TEXT_HJUSTIFY_CENTER:
rect.SetX( rect.GetX() - (rect.GetWidth() / 2) );
rect.SetX( rect.GetX() - ( rect.GetWidth() / 2 ) );
break;
case GR_TEXT_HJUSTIFY_RIGHT:
@@ -349,11 +352,11 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
break;
case GR_TEXT_VJUSTIFY_CENTER:
rect.SetY( rect.GetY() - ( dy / 2) );
rect.SetY( rect.GetY() - KiROUND( interline / 2.0 ) );
break;
case GR_TEXT_VJUSTIFY_BOTTOM:
rect.SetY( rect.GetY() - dy );
rect.SetY( rect.GetY() - KiROUND( interline ) );
break;
}
@@ -368,12 +371,12 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
break;
case GR_TEXT_VJUSTIFY_CENTER:
yoffset = linecount * GetInterline() / 2;
yoffset = KiROUND( linecount * interline / 2.0 );
rect.SetY( rect.GetY() - yoffset );
break;
case GR_TEXT_VJUSTIFY_BOTTOM:
yoffset = linecount * GetInterline();
yoffset = KiROUND( linecount * interline );
rect.SetY( rect.GetY() - yoffset );
break;
}
@@ -381,7 +384,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
// Many fonts draw diacriticals, descenders, etc. outside the X-height of the font. This
// will cacth most (but probably not all) of them.
rect.Inflate( 0, thickness * 1.5 );
rect.Inflate( 0, KiROUND( thickness * 0.75 ) );
rect.Normalize(); // Make h and v sizes always >= 0
@@ -685,21 +688,7 @@ void EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon( SHAPE_POLY_SET* aCorn
EDA_RECT rect = GetTextBox();
// This ugly hack is because this code used to be defined in the board polygon code
// file rather than in the EDA_TEXT source file where it belonged. Using the board
// default text width was dubious so this recreates the same code with the exception
// if for some reason a different default text width is require for some other object.
#if !defined( DEFAULT_TEXT_WIDTH )
#define LOCAL_DEFAULT_TEXT_WIDTH
#define DEFAULT_TEXT_WIDTH 0.15
#endif
rect.Inflate( aClearanceValue + Millimeter2iu( DEFAULT_TEXT_WIDTH ) );
#if defined( LOCAL_DEFAULT_TEXT_WIDTH )
#undef DEFAULT_TEXT_WIDTH
#undef LOCAL_DEFAULT_TEXT_WIDTH
#endif
rect.Inflate( aClearanceValue );
corners[0].x = rect.GetOrigin().x;
corners[0].y = rect.GetOrigin().y;
+12 -6
View File
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2017-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -27,17 +27,19 @@
static bool normalizeAbsolutePaths( const wxFileName& aPathA, const wxFileName& aPathB,
wxString* aResultPath )
{
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + " is not an absolute path." );
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + " is not an absolute path." );
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + wxT( " is not an absolute path." ) );
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + wxT( " is not an absolute path." ) );
if( aPathA.GetPath() == aPathB.GetPath() )
return true;
// Not sure all of volume checks are necessary since wxFileName::GetVolume() returns
// an empty string if the path has no volume.
if( ( aPathA.GetDirCount() > aPathB.GetDirCount() )
|| ( aPathA.HasVolume() && !aPathB.HasVolume() )
|| ( !aPathA.HasVolume() && aPathB.HasVolume() )
|| ( ( aPathA.HasVolume() && aPathB.HasVolume() )
&& ( aPathA.GetVolume() != aPathB.GetVolume() ) ) )
&& ( aPathA.GetVolume().CmpNoCase( aPathB.GetVolume() ) != 0 ) ) )
return false;
wxArrayString aDirs = aPathA.GetDirs();
@@ -87,6 +89,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
envPath.SetPath( entry.second.GetValue() );
wxString tmp;
if( normalizeAbsolutePaths( envPath, aFilePath, &tmp ) )
{
int newDepth = envPath.GetDirs().GetCount();
@@ -98,6 +101,9 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
varName = entry.first;
remainingPath = tmp;
}
// @fixme Shouldn't we break here if an environment variable path is found or try
// at least try to pick the best match?
}
}
}
@@ -135,7 +141,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
if( aProject )
return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() );
else
return NormalizePath( aFilePath, aEnvVars, "" );
return NormalizePath( aFilePath, aEnvVars, wxEmptyString );
}
+21 -21
View File
@@ -34,14 +34,14 @@ using STRING_MAP = std::map<wxString, wxString>;
* (where they are originally defined)
*/
static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = {
"KIPRJMOD",
"KICAD6_SYMBOL_DIR",
"KICAD6_3DMODEL_DIR",
"KICAD6_FOOTPRINT_DIR",
"KICAD6_TEMPLATE_DIR",
"KICAD_USER_TEMPLATE_DIR",
"KICAD_PTEMPLATES",
"KICAD6_3RD_PARTY",
wxT( "KIPRJMOD" ),
wxT( "KICAD6_SYMBOL_DIR" ),
wxT( "KICAD6_3DMODEL_DIR" ),
wxT( "KICAD6_FOOTPRINT_DIR" ),
wxT( "KICAD6_TEMPLATE_DIR" ),
wxT( "KICAD_USER_TEMPLATE_DIR" ),
wxT( "KICAD_PTEMPLATES" ),
wxT( "KICAD6_3RD_PARTY" ),
};
@@ -67,40 +67,40 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap )
{
// Set up dynamically, as we want to be able to use _() translations,
// which can't be done statically
aMap["KICAD6_FOOTPRINT_DIR"] =
aMap[wxT( "KICAD6_FOOTPRINT_DIR" )] =
_( "The base path of locally installed system "
"footprint libraries (.pretty folders).");
aMap["KICAD6_3DMODEL_DIR"] =
aMap[wxT( "KICAD6_3DMODEL_DIR" )] =
_( "The base path of system footprint 3D shapes (.3Dshapes folders).");
aMap["KICAD6_SYMBOL_DIR"] =
aMap[wxT( "KICAD6_SYMBOL_DIR" )] =
_( "The base path of the locally installed symbol libraries.");
aMap["KICAD6_TEMPLATE_DIR"] =
aMap[wxT( "KICAD6_TEMPLATE_DIR" )] =
_( "A directory containing project templates installed with KiCad.");
aMap["KICAD_USER_TEMPLATE_DIR"] =
aMap[wxT( "KICAD_USER_TEMPLATE_DIR" )] =
_( "Optional. Can be defined if you want to create your own project "
"templates folder.");
aMap["KICAD6_3RD_PARTY"] =
aMap[wxT( "KICAD6_3RD_PARTY" )] =
_( "A directory containing 3rd party plugins, libraries and other "
"downloadable content.");
aMap["KIPRJMOD"] =
aMap[wxT( "KIPRJMOD" )] =
_("Internally defined by KiCad (cannot be edited) and is set "
"to the absolute path of the currently loaded project file. This environment "
"variable can be used to define files and paths relative to the currently loaded "
"project. For instance, ${KIPRJMOD}/libs/footprints.pretty can be defined as a "
"folder containing a project specific footprint library named footprints.pretty." );
aMap["KICAD6_SCRIPTING_DIR"] =
aMap[wxT( "KICAD6_SCRIPTING_DIR" )] =
_( "A directory containing system-wide scripts installed with KiCad" );
aMap["KICAD6_USER_SCRIPTING_DIR"] =
aMap[wxT( "KICAD6_USER_SCRIPTING_DIR" )] =
_( "A directory containing user-specific scripts installed with KiCad" );
// Deprecated vars
aMap["KICAD_PTEMPLATES"] =
aMap[wxT( "KICAD_PTEMPLATES" )] =
_( "Deprecated version of KICAD_TEMPLATE_DIR.");
aMap["KISYS3DMOD"] =
aMap[wxT( "KISYS3DMOD" )] =
_( "Deprecated version of KICAD6_3DMODEL_DIR." );
aMap["KISYSMOD"] =
aMap[wxT( "KISYSMOD" )] =
_( "Deprecated version of KICAD6_FOOTPRINT_DIR." );
aMap["KICAD_SYMBOL_DIR"] =
aMap[wxT( "KICAD_SYMBOL_DIR" )] =
_( "Deprecated version of KICAD_SYMBOL_DIR.");
}
+1 -1
View File
@@ -30,7 +30,7 @@
const wxString IO_ERROR::What() const
{
#ifdef DEBUG
return wxString( "IO_ERROR: " ) + Problem() + "\n\n" + Where();
return wxString( wxT( "IO_ERROR: " ) ) + Problem() + wxT( "\n\n" ) + Where();
#else
return Problem();
#endif
+14 -14
View File
@@ -28,19 +28,19 @@
// TODO Executable names TODO
#ifdef __WINDOWS__
const wxString CVPCB_EXE ( "cvpcb.exe" );
const wxString PCBNEW_EXE ( "pcbnew.exe" );
const wxString EESCHEMA_EXE ( "eeschema.exe" );
const wxString GERBVIEW_EXE ( "gerbview.exe" );
const wxString BITMAPCONVERTER_EXE ( "bitmap2component.exe" );
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator.exe" );
const wxString PL_EDITOR_EXE ( "pl_editor.exe" );
const wxString CVPCB_EXE ( wxT( "cvpcb.exe" ) );
const wxString PCBNEW_EXE ( wxT( "pcbnew.exe" ) );
const wxString EESCHEMA_EXE ( wxT( "eeschema.exe" ) );
const wxString GERBVIEW_EXE ( wxT( "gerbview.exe" ) );
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component.exe" ) );
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator.exe" ) );
const wxString PL_EDITOR_EXE ( wxT( "pl_editor.exe" ) );
#else
const wxString CVPCB_EXE ( "cvpcb" );
const wxString PCBNEW_EXE ( "pcbnew" );
const wxString EESCHEMA_EXE ( "eeschema" );
const wxString GERBVIEW_EXE ( "gerbview" );
const wxString BITMAPCONVERTER_EXE ( "bitmap2component" );
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator" );
const wxString PL_EDITOR_EXE ( "pl_editor" );
const wxString CVPCB_EXE ( wxT( "cvpcb" ) );
const wxString PCBNEW_EXE ( wxT( "pcbnew" ) );
const wxString EESCHEMA_EXE ( wxT( "eeschema" ) );
const wxString GERBVIEW_EXE ( wxT( "gerbview" ) );
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component" ) );
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator" ) );
const wxString PL_EDITOR_EXE ( wxT( "pl_editor" ) );
#endif
+13 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 Ian McInerney <Ian.S.McInerney@ieee.org>
* Copyright (C) 2019 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2022 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
@@ -165,6 +165,18 @@ void FILE_HISTORY::doAddClearItem( wxMenu* aMenu )
}
void FILE_HISTORY::UpdateClearText( wxMenu* aMenu, wxString aClearText )
{
size_t itemPos;
wxMenuItem* clearItem = aMenu->FindChildItem( m_clearId, &itemPos );
if( clearItem && itemPos > 1 ) // clearItem is the last menu, after a separator
{
clearItem->SetItemLabel( aClearText );
}
}
void FILE_HISTORY::ClearFileHistory()
{
while( GetCount() > 0 )
+80 -80
View File
@@ -44,7 +44,7 @@
#define ERRFLG_RELPATH (2)
#define ERRFLG_ENVPATH (4)
#define MASK_3D_RESOLVER "3D_RESOLVER"
#define MASK_3D_RESOLVER wxT( "3D_RESOLVER" )
static std::mutex mutex_resolver;
@@ -64,7 +64,7 @@ bool FILENAME_RESOLVER::Set3DConfigDir( const wxString& aConfigDir )
if( aConfigDir.empty() )
return false;
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxEmptyString );
cfgdir.Normalize();
@@ -85,7 +85,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
if( !aProject )
return false;
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), "" );
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), wxEmptyString );
projdir.Normalize();
@@ -100,8 +100,8 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
if( m_paths.empty() )
{
SEARCH_PATH al;
al.m_Alias = "${KIPRJMOD}";
al.m_Pathvar = "${KIPRJMOD}";
al.m_Alias = wxT( "${KIPRJMOD}" );
al.m_Pathvar = wxT( "${KIPRJMOD}" );
al.m_Pathexp = m_curProjDir;
m_paths.push_back( al );
@@ -129,7 +129,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
ostr << " * [INFO] changed project dir to ";
ostr << m_paths.front().m_Pathexp.ToUTF8();
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
}
#endif
@@ -168,8 +168,8 @@ bool FILENAME_RESOLVER::createPathList()
// the user may change this later with a call to SetProjectDir()
SEARCH_PATH lpath;
lpath.m_Alias = "${KIPRJMOD}";
lpath.m_Pathvar = "${KIPRJMOD}";
lpath.m_Alias = wxT( "${KIPRJMOD}" );
lpath.m_Pathvar = wxT( "${KIPRJMOD}" );
lpath.m_Pathexp = m_curProjDir;
m_paths.push_back( lpath );
wxFileName fndummy;
@@ -188,7 +188,7 @@ bool FILENAME_RESOLVER::createPathList()
}
else
{
fndummy.Assign( pathVal, "" );
fndummy.Assign( pathVal, wxEmptyString );
fndummy.Normalize();
lpath.m_Pathexp = fndummy.GetFullPath();
}
@@ -210,12 +210,12 @@ bool FILENAME_RESOLVER::createPathList()
return false;
#ifdef DEBUG
wxLogTrace( MASK_3D_RESOLVER, " * [3D model] search paths:\n" );
wxLogTrace( MASK_3D_RESOLVER, wxT( " * [3D model] search paths:\n" ) );
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
while( sPL != m_paths.end() )
{
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_Alias.GetData(),
wxLogTrace( MASK_3D_RESOLVER, wxT( " + %s : '%s'\n" ), (*sPL).m_Alias.GetData(),
(*sPL).m_Pathexp.GetData() );
++sPL;
}
@@ -274,7 +274,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
// special case: if a path begins with ${ENV_VAR} but is not in the resolver's path list
// then add it.
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
checkEnvVarPath( aFileName );
return tname;
@@ -282,15 +282,15 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
// if a path begins with ${ENV_VAR}/$(ENV_VAR) and is not resolved then the file either does
// not exist or the ENV_VAR is not defined
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
{
if( !( m_errflags & ERRFLG_ENVPATH ) )
{
m_errflags |= ERRFLG_ENVPATH;
wxString errmsg = "[3D File Resolver] No such path; ensure the environment var is defined";
errmsg.append( "\n" );
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the environment var is defined" );
errmsg.append( wxT( "\n" ) );
errmsg.append( tname );
errmsg.append( "\n" );
errmsg.append( wxT( "\n" ) );
wxLogTrace( tracePathsAndFiles, errmsg );
}
@@ -306,9 +306,9 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
// been checked. This case accounts for partial paths which do not contain ${KIPRJMOD}.
// This check is performed before checking the path relative to ${KICAD6_3DMODEL_DIR} so that
// users can potentially override a model within ${KICAD6_3DMODEL_DIR}.
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( ":" ) )
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( wxT( ":" ) ) )
{
tmpFN.Assign( m_paths.begin()->m_Pathexp, "" );
tmpFN.Assign( m_paths.begin()->m_Pathexp, wxEmptyString );
wxString fullPath = tmpFN.GetPathWithSep() + tname;
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
@@ -324,10 +324,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
}
// check the partial path relative to ${KICAD6_3DMODEL_DIR} (legacy behavior)
if( !tname.StartsWith( ":" ) )
if( !tname.StartsWith( wxT( ":" ) ) )
{
wxFileName fpath;
wxString fullPath( "${KICAD6_3DMODEL_DIR}" );
wxString fullPath( wxT( "${KICAD6_3DMODEL_DIR}" ) );
fullPath.Append( fpath.GetPathSeparator() );
fullPath.Append( tname );
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
@@ -352,10 +352,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
// this can happen if the file was intended to be relative to ${KICAD6_3DMODEL_DIR}
// but ${KICAD6_3DMODEL_DIR} is not set or is incorrect.
m_errflags |= ERRFLG_RELPATH;
wxString errmsg = "[3D File Resolver] No such path";
errmsg.append( "\n" );
wxString errmsg = wxT( "[3D File Resolver] No such path" );
errmsg.append( wxT( "\n" ) );
errmsg.append( tname );
errmsg.append( "\n" );
errmsg.append( wxT( "\n" ) );
wxLogTrace( tracePathsAndFiles, errmsg );
}
@@ -365,7 +365,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
for( const SEARCH_PATH& path : m_paths )
{
// ${ENV_VAR} paths have already been checked; skip them
if( path.m_Alias.StartsWith( "${" ) || path.m_Alias.StartsWith( "$(" ) )
if( path.m_Alias.StartsWith( wxT( "${" ) ) || path.m_Alias.StartsWith( wxT( "$(" ) ) )
continue;
if( path.m_Alias == alias && !path.m_Pathexp.empty() )
@@ -392,10 +392,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
if( !( m_errflags & ERRFLG_ALIAS ) )
{
m_errflags |= ERRFLG_ALIAS;
wxString errmsg = "[3D File Resolver] No such path; ensure the path alias is defined";
errmsg.append( "\n" );
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the path alias is defined" );
errmsg.append( wxT( "\n" ) );
errmsg.append( tname.substr( 1 ) );
errmsg.append( "\n" );
errmsg.append( wxT( "\n" ) );
wxLogTrace( tracePathsAndFiles, errmsg );
}
@@ -420,15 +420,15 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
#endif
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), "" );
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), wxEmptyString );
path.Normalize();
if( !path.DirExists() )
{
if( aPath.m_Pathvar == "${KICAD6_3DMODEL_DIR}"
|| aPath.m_Pathvar == "${KIPRJMOD}" || aPath.m_Pathvar == "$(KIPRJMOD)"
|| aPath.m_Pathvar == "${KISYS3DMOD}" || aPath.m_Pathvar == "$(KISYS3DMOD)" )
if( aPath.m_Pathvar == wxT( "${KICAD6_3DMODEL_DIR}" )
|| aPath.m_Pathvar == wxT( "${KIPRJMOD}" ) || aPath.m_Pathvar == wxT( "$(KIPRJMOD)" )
|| aPath.m_Pathvar == wxT( "${KISYS3DMOD}" ) || aPath.m_Pathvar == wxT( "$(KISYS3DMOD)" ) )
{
// suppress the message if the missing pathvar is a system variable
}
@@ -489,9 +489,9 @@ bool FILENAME_RESOLVER::readPathList()
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "3D configuration directory is unknown";
ostr << " * " << errmsg.ToUTF8();
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxString errmsg = wxT( "3D configuration directory is unknown" );
ostr << wxT( " * " ) << errmsg.ToUTF8();
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -508,10 +508,10 @@ bool FILENAME_RESOLVER::readPathList()
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "no 3D configuration file";
wxString errmsg = wxT( "no 3D configuration file" );
ostr << " * " << errmsg.ToUTF8() << " '";
ostr << cfgname.ToUTF8() << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -521,9 +521,9 @@ bool FILENAME_RESOLVER::readPathList()
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "Could not open configuration file";
wxString errmsg = wxT( "Could not open configuration file" );
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -566,9 +566,9 @@ bool FILENAME_RESOLVER::readPathList()
// Don't add KICAD6_3DMODEL_DIR, one of its legacy equivalents, or KIPRJMOD from a
// config file. They're system variables are are defined at runtime.
if( al.m_Alias == "${KICAD6_3DMODEL_DIR}"
|| al.m_Alias == "${KIPRJMOD}" || al.m_Alias == "$(KIPRJMOD)"
|| al.m_Alias == "${KISYS3DMOD}" || al.m_Alias == "$(KISYS3DMOD)" )
if( al.m_Alias == wxT( "${KICAD6_3DMODEL_DIR}" )
|| al.m_Alias == wxT( "${KIPRJMOD}" ) || al.m_Alias == wxT( "$(KIPRJMOD)" )
|| al.m_Alias == wxT( "${KISYS3DMOD}" ) || al.m_Alias == wxT( "$(KISYS3DMOD)" ) )
{
continue;
}
@@ -600,7 +600,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = _( "3D configuration directory is unknown" );
ostr << " * " << errmsg.ToUTF8();
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
return false;
@@ -613,7 +613,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
// skip all ${ENV_VAR} alias names
while( sPL != m_paths.end()
&& ( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) )
&& ( sPL->m_Alias.StartsWith( wxT( "${" ) ) || sPL->m_Alias.StartsWith( wxT( "$(" ) ) ) )
{
++sPL;
}
@@ -631,7 +631,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = _( "Could not open configuration file" );
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
return false;
@@ -677,17 +677,17 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
{
bool useParen = false;
if( aPath.StartsWith( "$(" ) )
if( aPath.StartsWith( wxT( "$(" ) ) )
useParen = true;
else if( !aPath.StartsWith( "${" ) )
else if( !aPath.StartsWith( wxT( "${" ) ) )
return;
size_t pEnd;
if( useParen )
pEnd = aPath.find( ")" );
pEnd = aPath.find( wxT( ")" ) );
else
pEnd = aPath.find( "}" );
pEnd = aPath.find( wxT( "}" ) );
if( pEnd == wxString::npos )
return;
@@ -704,7 +704,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
if( sPL->m_Alias == envar )
return;
if( !sPL->m_Alias.StartsWith( "${" ) )
if( !sPL->m_Alias.StartsWith( wxT( "${" ) ) )
break;
++sPL;
@@ -713,7 +713,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
SEARCH_PATH lpath;
lpath.m_Alias = envar;
lpath.m_Pathvar = lpath.m_Alias;
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), "" );
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), wxEmptyString );
wxUniChar psep = tmpFN.GetPathSeparator();
tmpFN.Normalize();
@@ -758,7 +758,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
wxFileName fpath;
// in the case of aliases, ensure that we use the most recent definition
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
{
wxString tpath = ExpandEnvVarSubstitutions( sL->m_Alias, m_project );
@@ -768,11 +768,11 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
continue;
}
fpath.Assign( tpath, wxT( "" ) );
fpath.Assign( tpath, wxEmptyString );
}
else
{
fpath.Assign( sL->m_Pathexp, wxT( "" ) );
fpath.Assign( sL->m_Pathexp, wxEmptyString );
}
wxString fps = fpath.GetPathWithSep();
@@ -789,19 +789,19 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
fname.Replace( wxT( "\\" ), wxT( "/" ) );
#endif
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
{
// old style ENV_VAR
tname = sL->m_Alias;
tname.Append( "/" );
tname.Append( wxT( "/" ) );
tname.append( fname );
}
else
{
// new style alias
tname = ":";
tname = wxT( ":" );
tname.append( sL->m_Alias );
tname.append( ":" );
tname.append( wxT( ":" ) );
tname.append( fname );
}
@@ -864,9 +864,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "bad Hollerith string on line";
wxString errmsg = wxT( "bad Hollerith string on line" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -877,9 +877,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "missing opening quote mark in config file";
wxString errmsg = wxT( "missing opening quote mark in config file" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -890,9 +890,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "invalid entry (unexpected end of line)";
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -906,9 +906,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "bad Hollerith string on line";
wxString errmsg = wxT( "bad Hollerith string on line" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -922,9 +922,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "invalid entry (unexpected end of line)";
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -939,9 +939,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
{
std::ostringstream ostr;
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
wxString errmsg = "missing closing quote mark in config file";
wxString errmsg = wxT( "missing closing quote mark in config file" );
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
return false;
}
@@ -1015,9 +1015,9 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
// environment string before testing
aliasEnd = wxString::npos;
if( aFileName.StartsWith( "${" ) )
if( aFileName.StartsWith( wxT( "${" ) ) )
aliasEnd = aFileName.find( '}' );
else if( aFileName.StartsWith( "$(" ) )
else if( aFileName.StartsWith( wxT( "$(" ) ) )
aliasEnd = aFileName.find( ')' );
if( aliasEnd != wxString::npos )
@@ -1031,8 +1031,8 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
// So remove separators
wxString lpath_no_sep = lpath;
#ifdef __WINDOWS__
lpath_no_sep.Replace( "/", " " );
lpath_no_sep.Replace( "\\", " " );
lpath_no_sep.Replace( wxT( "/" ), wxT( " " ) );
lpath_no_sep.Replace( wxT( "\\" ), wxT( " " ) );
// A disk identifier is allowed, and therefore remove its separator
if( lpath_no_sep.Length() > 1 && lpath_no_sep[1] == ':' )
@@ -1064,32 +1064,32 @@ bool FILENAME_RESOLVER::GetKicadPaths( std::list< wxString >& paths ) const
while( mS != mE )
{
// filter out URLs, template directories, and known system paths
if( mS->first == wxString( "KICAD_PTEMPLATES" )
|| mS->first == wxString( "KICAD6_FOOTPRINT_DIR" ) )
if( mS->first == wxString( wxT( "KICAD_PTEMPLATES" ) )
|| mS->first == wxString( wxT( "KICAD6_FOOTPRINT_DIR" ) ) )
{
++mS;
continue;
}
if( wxString::npos != mS->second.GetValue().find( wxString( "://" ) ) )
if( wxString::npos != mS->second.GetValue().find( wxString( wxT( "://" ) ) ) )
{
++mS;
continue;
}
wxString tmp( "${" );
wxString tmp( wxT( "${" ) );
tmp.Append( mS->first );
tmp.Append( "}" );
tmp.Append( wxT( "}" ) );
paths.push_back( tmp );
if( tmp == "${KICAD6_3DMODEL_DIR}" )
if( tmp == wxT( "${KICAD6_3DMODEL_DIR}" ) )
hasKisys3D = true;
++mS;
}
if( !hasKisys3D )
paths.emplace_back("${KICAD6_3DMODEL_DIR}" );
paths.emplace_back(wxT( "${KICAD6_3DMODEL_DIR}" ) );
return true;
}

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