Compare commits

..

687 Commits

Author SHA1 Message Date
Wayne Stambaugh f9a2dced07 Tag release version 6.0.7. 2022-07-25 18:57:34 -04:00
qu1ck 52157acbfe PCM: fix kicad version restriction logic
The json schema for packages implies that kicad min/max version
restriction takes major.minor.patch string but actual logic
only checks major and minor.

This fixes the logic to work with full major.minor.patch tuple.
Additionally the version max logic will substitute missing portions
with 999 for a reasonable default so that say 7.1 is still considered
as >= 7.1.5 when checking for max version.

Reported here
https://forum.kicad.info/t/updating-already-installed-plugins-using-content-manager/35532/5?u=qu1ck

(cherry picked from commit 06028d5015)
2022-07-18 10:26:27 -07:00
dsa-t 17f220590b OpenGL: Use glGetProgramiv instead of the extension function.
(cherry picked from commit 3a76435eda)
2022-07-18 10:20:04 -07:00
Alex 33027b8f66 OpenGL: Fix SetSwapInterval logic.
- Don't use GLX extension functions unless they are supported on the
connection. GLEW only checks for client library support.

- Don't try to set swap interval using glXSwapIntervalSGI when vsync is
not requested.

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

(cherry picked from commit 0e2d3236b5)
2022-07-18 10:19:36 -07:00
Seth Hillbrand 064a9688c0 Make annotation case-insensitive
U1 and u1 are allowed but if they both exist in the same schematic, they
will throw an ERC and annotation error.  Reannotating will make them U1
and u2.

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

(cherry picked from commit 00c7b64b13)
2022-07-18 09:49:28 -07:00
Seth Hillbrand c1ec63d4f9 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

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

(cherry picked from commit 93fb00d815)
2022-07-18 09:48:50 -07:00
Seth Hillbrand 995b2c517d Catch some crashes on shutdown
These can happen when a tool is active that sends signals when exiting
(e.g. deselectEvent).  These may be caught by the active loop in another
tool which might try to update the UI after it has been freed.  By
marking all tools as "shutdown", the only event returned to them should
be null.  As an extra precaution, we flag the shutdown globally within
the tool manager and check this flag before launching either events or
new tools

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

(cherry picked from commit db4f2d9dd8)
2022-07-18 09:48:16 -07:00
Seth Hillbrand a8c0bc0430 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

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

(cherry picked from commit b5bf1da251)
2022-07-18 09:47:32 -07:00
Seth Hillbrand 902629c139 Fix name escaping in symbol editor
When renaming a symbol, be sure to handle name escaping in all of the
various places that we do renaming (!)

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

(cherry picked from commit 0dab566270)
2022-07-18 09:46:57 -07:00
Seth Hillbrand 63e638cfab Enforce group selection to abide by L/R behavior
When selecting greedy (right to left), selecting any part of the group
will get the whole group.  When selecting left to right, we must select
all items in the group to get the grouped items unless we are in the
group itself

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

(cherry picked from commit e87ba10a5a)
2022-07-18 09:45:10 -07:00
Seth Hillbrand 48b520a098 Update Translations 2022-07-18 09:39:03 -07:00
Tokita, Hiroshi b55352da7e Translated using Weblate (Japanese)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-07-18 18:31:51 +02:00
dsa-t cd41a42775 Translated using Weblate (Russian)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-07-18 18:31:51 +02:00
김랑기 6f82cec3a4 Translated using Weblate (Korean)
Currently translated at 99.9% (7154 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-18 18:31:51 +02:00
jeongsuAn 2f9cd25850 Translated using Weblate (Korean)
Currently translated at 99.9% (7150 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-18 18:31:51 +02:00
Seth Hillbrand 865bb54591 Flag ERC error on non-stacked pins
Pins that are explicitly connected in the schematic should not have an
"unconnected pin" ERC error.  But stacked pins do not count as
explicitly connected because the schematic designer has not connected
them
2022-07-17 20:16:55 -07:00
Alex 6d26e8e3e8 math: Use intrinsic functions for 64-bit rescale on MSVC.
(cherry picked from commit c107abe247)
2022-07-16 18:05:35 +00:00
jean-pierre charras 9c50a9fa4a FP_SHAPE in pads: always specify fill mode for shapes that can be filled or not.
From Master branch
2022-07-15 17:42:31 +02:00
이기형 406dd58002 Translated using Weblate (Korean)
Currently translated at 99.9% (7150 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-13 15:29:26 +02:00
이상수 bd7ba5f6b1 Translated using Weblate (Korean)
Currently translated at 99.9% (7149 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-13 15:29:26 +02:00
박세훈 d174cff9ae Translated using Weblate (Korean)
Currently translated at 99.8% (7147 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-13 15:29:26 +02:00
gurqja3810 bbce24ab32 Translated using Weblate (Korean)
Currently translated at 99.8% (7147 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-13 15:29:26 +02:00
박세훈 ad2c5b40ff Translated using Weblate (Korean)
Currently translated at 99.8% (7146 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-13 15:29:25 +02:00
Tokita, Hiroshi 8e0784d4fa Translated using Weblate (Japanese)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-07-13 15:29:25 +02:00
jean-pierre charras 926818097b Fix compatibility issues with wxWidgets 3.2 and gcc 12.1:
hastable.h: remove deprecated binary/unary base class not actually needed.
Fix  compil warnings.
From master branch.
2022-07-12 18:24:12 +02:00
jean-pierre charras fd65bd8e6e Rework on bitmap_info.cpp cmake build process.
on gcc 12.1 / msys2 the large initialized list in bitmap_info.cpp breaks the
compiler (perhaps a bug in the compiler).
So, as workaround, the initialization sequence is modified.
Form master branch
2022-07-12 17:34:25 +02:00
jean-pierre charras d53c6f8abe Eeschema, DIALOG_SCH_FIND: ensure the search flags actually used are up to date.
Flags are encoded using internal wx values, that can change with wxWidgets versions.
They need to be always rebuilt from the displayed options in dialog.
From master branch.
2022-07-12 08:36:15 +02:00
Jon Evans 2512375988 PNS: Fix IsLineCorner logic
Handle segment width test in the case of locked segs
Fix logic failure where vias on path cause crash

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11990
2022-07-11 22:47:28 -04:00
Wayne Stambaugh 4b4d082fa4 Pcbnew: fix minor white space issue in board file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11669

(cherry picked from commit 6a74ecbffd)
2022-07-11 11:25:02 -04:00
Seth Hillbrand 374dfdbe16 Update Translations 2022-07-08 08:59:32 -07:00
co8 j 3c476157c1 Translated using Weblate (Japanese)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-07-08 17:57:36 +02:00
Marcel Hecko 3af058a281 Translated using Weblate (Slovak)
Currently translated at 77.0% (5513 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sk/
2022-07-08 17:57:36 +02:00
leonardokr 8a1e400d81 Translated using Weblate (Portuguese)
Currently translated at 99.5% (7122 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt/
2022-07-08 17:57:36 +02:00
Eric fb4fa9ae41 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-07-08 17:57:35 +02:00
Mustafa Selçuk ÇAVDAR ede0ab5b79 Translated using Weblate (Turkish)
Currently translated at 43.9% (3147 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/tr/
2022-07-08 17:57:35 +02:00
Henrik Kauhanen 2723898ff4 Translated using Weblate (Swedish)
Currently translated at 99.8% (7142 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/sv/
2022-07-08 17:57:35 +02:00
dsa-t b470d9ed8a Translated using Weblate (Russian)
Currently translated at 99.9% (7151 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ru/
2022-07-08 17:57:35 +02:00
Wellington Terumi Uemura f0446aab90 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-07-08 17:57:35 +02:00
ZbeeGin be3ee24826 Translated using Weblate (Polish)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pl/
2022-07-08 17:57:35 +02:00
김랑기 68a1f9e512 Translated using Weblate (Korean)
Currently translated at 99.8% (7145 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ko/
2022-07-08 17:57:35 +02:00
co8 j bf90966901 Translated using Weblate (Japanese)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-07-08 17:57:35 +02:00
Toni Laiho 7a5e9cce6d Translated using Weblate (Finnish)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/fi/
2022-07-08 17:57:35 +02:00
Ulices 3f7da644eb Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-07-08 17:57:35 +02:00
Jonathan Haas e424dbea2d Translated using Weblate (German)
Currently translated at 100.0% (7155 of 7155 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-07-08 17:57:34 +02:00
Seth Hillbrand 4d1fcff732 Fix compile error in v6 2022-07-07 12:19:38 -07:00
Seth Hillbrand dac08643c3 Update Altium SCH QA with rounding factors 2022-07-07 12:03:18 -07:00
Seth Hillbrand 95fcf53353 Handle basic rounding error in schematic import
The fractional part of Altium schematic units is an integer number of
1/10000 mil segments, which is 2.54 nm.  The internal unit of eeschema
is 10 nm, so each fractional unit in Altium is 0.254 base eeschema
units.  To be consistent with
https://gitlab.com/kicad/code/kicad/-/commit/cf33cfcad1ce01d866548c4ef87a1125141d427b
we round to the nearest 10nm for each element

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

(cherry picked from commit 6fef054c51)
2022-07-07 11:14:25 -07:00
Marek Roszko 7dc6abd533 Add 3.2 as search candidates for wxwidgets
(cherry picked from commit c12a723d41)
2022-07-07 11:45:44 +00:00
Jeff Young 042b49ee7b Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11961

(cherry picked from commit 4f62960334)
2022-07-06 19:48:09 -07:00
Seth Hillbrand 6a1dfd6e32 Overplot schematic symbol fields and pins
In the absence of z-ordering, we need to ensure that pin text and symbol
fields are always visible in plots as they are in the schematic window.
We do this by overplotting the fields/pins when symbols overlap each
other.

This can be removed if/when we implement https://gitlab.com/kicad/code/kicad/-/issues/2211

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

(cherry picked from commit ff54b8c718)
2022-07-05 16:47:07 -07:00
Wayne Stambaugh b2855e6288 Fix KiCad2Step virtual keyword handling.
The "virtual" keyword has been deprecated from the board file format so
use "exclude_from_bom" as the flag for the old virtual behavior.  This
is only a partial fix.  Full support for the "exclude_from_bom" will be
added later for V7.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10563
(cherry picked from commit 497061de35)
2022-07-05 09:30:59 -04:00
jean-pierre charras 86f9f169cd Pcbnew, printing in B&W: never draw the background color.
Otherwise a black background is printed.
Fixes #11625
https://gitlab.com/kicad/code/kicad/issues/11625
2022-07-04 12:03:17 +02:00
Seth Hillbrand 9052b063de Remove duplicate strid 2022-06-30 13:24:48 -07:00
Seth Hillbrand 1a6be90c4f Update Translations 2022-06-30 11:25:11 -07:00
Seth Hillbrand 55de16e874 Remove extraneous files added in 69858ab4c0
Files were master-only
2022-06-30 11:09:03 -07:00
Seth Hillbrand ef2bb0b621 Avoid documentation in dialogs
If the nomenclature is unclear, we should rework the dialog rather than
adding documentation strings to a crowded dialog.

This also prevents new strings from appearing in v6

(cherry picked from commit 0c796697b4)
2022-06-30 10:58:13 -07:00
Mark Hämmerling 09d4543071 Translated using Weblate (German)
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-30 19:44:04 +02:00
Allan Nordhøy 7ef63f0159 Translated using Weblate (Norwegian Bokmål)
Currently translated at 73.1% (5235 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/nb_NO/
2022-06-30 19:44:04 +02:00
Toni Laiho d0e34bf013 Translated using Weblate (Finnish)
Currently translated at 100.0% (7156 of 7156 strings)

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

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-30 19:44:04 +02:00
Eric 51cc4b8811 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/zh_Hans/
2022-06-30 19:44:04 +02:00
Wellington Terumi Uemura 5634dfa6ed Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/pt_BR/
2022-06-30 19:44:04 +02:00
co8 j 5a8d56f3db Translated using Weblate (Japanese)
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/ja/
2022-06-30 19:44:04 +02:00
Ulices 0c5ea8565d Translated using Weblate (Spanish (Mexico))
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/es_MX/
2022-06-30 19:44:04 +02:00
Mark Hämmerling 1431bd1143 Translated using Weblate (German)
Currently translated at 100.0% (7156 of 7156 strings)

Translation: KiCad EDA/v6
Translate-URL: https://hosted.weblate.org/projects/kicad/v6/de/
2022-06-30 19:44:03 +02:00
Seth Hillbrand 7a3a7d1af6 Python add param to change UUIDs on fp load
By default, we load all footprints with a new UUID set to allow them to
be added to the board as unique objects.  But when editing footprints,
we want to maintain the same UUID.

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

(cherry picked from commit 802745398a)
2022-06-29 12:10:51 -07:00
Mike Williams 761ddcad21 Schematic: Add shift-space hotkey for consistency with PCB editor
Already in 7.0/master.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10858
2022-06-29 12:54:18 +00:00
Seth Hillbrand 8aabdcff9c Refresh draw objects when common settings change
Common settings may change colors so make sure that we refresh the draw
objects when the settings change to draw them in the proper colors.
Failing to do this may also cause left over lines on the screen
depending on OpenGL drivers

Fixes https://gitlab.com/kicad/code/kicad/issues/11921
2022-06-28 16:45:55 -07:00
Adam Wahab 29d58ae063 Corrected syntax in kicad2step's help message regarding user-specified origin.
(cherry picked from commit 8456d6cea9)
2022-06-28 16:24:44 -07:00
Seth Hillbrand 90ef84b958 Fix ERC error missing on stacked pins
Stacked pins are not connected, so they should be flagged as such.  This
checks for stacked pins that are not part of different symbols

Fixes https://gitlab.com/kicad/code/kicad/issues/11926
2022-06-28 15:03:52 -07:00
Seth Hillbrand 9cebea5f11 Correct SWIG call for board design settings
Use the backend call rather than rely on the naming of internal
variables

Fixes https://gitlab.com/kicad/code/kicad/issues/11924
2022-06-28 14:02:56 -07:00
Wayne Stambaugh b7b955e37b Eeschema: fix project rescue bug.
When a rescue library already existed, the disabled writing of legacy
symbol library table entries prevented the rescue library from being
updated.

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

(cherry picked from commit 4e7b5b9784)
2022-06-28 16:14:47 -04:00
Mark Roszko 87d4249d9f Match vcpkg baseline of master 2022-06-25 13:22:44 +00:00
Mark Roszko 8bf5240d60 Fix windows build 2022-06-25 13:21:54 +00:00
jean-pierre charras 20bebeb543 Gen Drill map: Re-add Gerber option but only using X2 format.
Only the X2 format allows the TF.FileFunction option, mandatory to
avoid mistakes about this file that is not a standard Gerber file.
2022-06-23 14:20:32 +02:00
jean-pierre charras 1f4b288664 gen drill maps: remove unusable format (HPGL and GERBER) for map files.
Especially, on a regular basis, map files in gerber format create problems
for board house.
From Master branch.
2022-06-22 11:29:27 +02:00
Seth Hillbrand 5cf346c233 Unify symbol browser/editor unit display
Fixes https://gitlab.com/kicad/code/kicad/issues/11881

(cherry picked from commit aeef5b00a8)
2022-06-21 16:23:27 -07:00
Seth Hillbrand 617755f991 Treat all units equally when converting to string
Excessive trucation in mils can lead to data loss when round-tripping
values.  Better to keep decimal count consistent between units

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

(cherry picked from commit 67d9729311)
2022-06-21 15:30:24 -07:00
Seth Hillbrand 45329ceafa Push wxString allocation to smaller context
Prevents creation of new wxString on stack for each clearance check

(cherry picked from commit 4043dca613)
2022-06-21 10:30:42 -07:00
Seth Hillbrand 69858ab4c0 Remove shared wxString instance in DRC
Threaded DRC access will write to this string, re-allocating the memory
without any synchronization between threads using the string.  Comment
adding this listed performance as a reason for using shared strings.
Measured performance does not seem noticeably different in either case,
even with high-error count boards.  If there is a case where the
performance is limiting, we can replace these wxStrings with
std::wstring and utilize fmt

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

(cherry picked from commit 5327b10064)
2022-06-21 10:27:21 -07:00
Seth Hillbrand c53a1e00f6 Fix one missing commit for MSVC
(cherry picked from commit 8f1b2acdc6)
2022-06-21 10:08:02 -07:00
Seth Hillbrand 178a36fc66 Patch pybind11 for MSVC
Re-comit of earlier ef38642bf1 after updating pybind11 to 2.9.2

(cherry picked from commit c483c58276)
2022-06-21 10:08:02 -07:00
Seth Hillbrand 8ce38d3820 Update pybind11 to 2.9.2
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10729

(cherry picked from commit 8d003804e0)
2022-06-21 10:08:02 -07:00
Mark Roszko e0802dcd26 Walk vcpkg config forwards for wx 3.1.7 2022-06-20 03:21:18 +00:00
Wayne Stambaugh c8a1c5c707 Begin version 6.0.7 development. 2022-06-17 21:13:23 -04:00
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
686 changed files with 141478 additions and 125243 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'
+85 -14
View File
@@ -1,10 +1,11 @@
##########################################################################
# Build KiCad on Fedora and save the results
##########################################################################
fedora_build_linux:
.fedora_build_linux_base:
stage: build
tags:
- kicad-fedora
# 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
@@ -22,7 +23,7 @@ fedora_build_linux:
- cd build/linux
- cmake
-G Ninja
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_USE_OCC=ON
-DKICAD_SPICE=ON
@@ -42,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
@@ -61,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
@@ -76,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
@@ -88,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 -3
View File
@@ -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
@@ -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();
+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,
+31 -9
View File
@@ -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 );
@@ -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;
+3 -1
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
+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 )
@@ -36,9 +36,9 @@ string( REGEX MATCH
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_MINOR_PATCH_TUPLE "{ ${CMAKE_MATCH_1}, ${CMAKE_MATCH_2}, ${CMAKE_MATCH_3} }" )
set( KICAD_MAJOR_VERSION "${CMAKE_MATCH_1}" )
set( KICAD_MINOR_VERSION "${CMAKE_MATCH_2}" )
@@ -46,7 +46,7 @@ if( CMAKE_MATCH_COUNT EQUAL 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}\\0" )
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, minor and patch version string" )
@@ -67,7 +67,7 @@ set( _wvh_new_version_text
#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_MAJOR_MINOR_PATCH_TUPLE ${KICAD_MAJOR_MINOR_PATCH_TUPLE}
#define KICAD_WIN32_RC_PRODVER ${KICAD_WIN32_RC_PRODVER}
#define KICAD_WIN32_RC_PRODVER_STR \"${KICAD_WIN32_RC_PRODVER_STR}\"
#define KICAD_WIN32_RC_FILEVER ${KICAD_WIN32_RC_FILEVER}
+8 -6
View File
@@ -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
@@ -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()
+30 -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
)
@@ -296,6 +293,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Find wxWidgets multilib base libraries.
find_library(WX_base${_DBG}
NAMES
wxbase32${_UCD}${_DBG}
wxbase31${_UCD}${_DBG}
wxbase30${_UCD}${_DBG}
wxbase29${_UCD}${_DBG}
@@ -310,6 +308,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
foreach(LIB net odbc xml)
find_library(WX_${LIB}${_DBG}
NAMES
wxbase32${_UCD}${_DBG}_${LIB}
wxbase31${_UCD}${_DBG}_${LIB}
wxbase30${_UCD}${_DBG}_${LIB}
wxbase29${_UCD}${_DBG}_${LIB}
@@ -326,13 +325,14 @@ 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}32${_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 +340,17 @@ 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}32${_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 +516,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 +550,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 +607,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 +627,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.2" )
set( KICAD_SEMANTIC_VERSION "6.0.7" )
# 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)
+3 -3
View File
@@ -619,8 +619,8 @@ set( TMP_DIR "${CMAKE_CURRENT_BINARY_DIR}/tmp" )
# generate logs is useful only if you have problems
set( CREATE_LOG_FILES true )
set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h" )
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.h.in" )
set( BITMAP_INFO_FILE "${CMAKE_SOURCE_DIR}/common/bitmap_info.cpp" )
set( BITMAP_INFO_TEMPLATE "${CMAKE_SOURCE_DIR}/include/bitmaps/bitmap_info.cpp.in" )
set( BITMAP_INFO_LIST "" )
set( ALL_PNGS "" )
@@ -739,7 +739,7 @@ function( bitmap_dir pngWidth pngHeight bmapList )
png2png( ${tmpFile} ${pngPath} )
set( bitmapInfo
" { BITMAPS::${bmn}, wxT( \"${pngFile}\" ), ${pngHeight}, wxT( \"${theme}\" ) },\n"
" aBitmapInfoCache[BITMAPS::${bmn}].emplace_back( BITMAPS::${bmn}, wxT( \"${pngFile}\" ), ${pngHeight}, wxT( \"${theme}\" ) );\n"
)
set( BITMAP_INFO_LIST "${BITMAP_INFO_LIST}${bitmapInfo}" )
+1
View File
@@ -315,6 +315,7 @@ set( COMMON_SRCS
bin_mod.cpp
bitmap.cpp
bitmap_base.cpp
bitmap_info.cpp
bitmap_store.cpp
board_printout.cpp
build_version.cpp
+28 -28
View File
@@ -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
@@ -334,83 +334,83 @@ 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
+3 -8
View File
@@ -226,22 +226,17 @@ wxString StringFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol,
if( value_to_print != 0.0 && fabs( value_to_print ) <= 0.0001 )
{
len = sprintf( buf, "%.10f", value_to_print );
len = snprintf( buf, sizeof( buf ) - 1, "%.10f", value_to_print );
while( --len > 0 && buf[len] == '0' )
buf[len] = '\0';
if( buf[len]=='.' || buf[len]==',' )
if( len >= 0 && ( buf[len]=='.' || buf[len]==',' ) )
buf[len] = '\0';
else
++len;
}
else
{
if( aUnits == EDA_UNITS::MILS )
len = sprintf( buf, "%.7g", value_to_print );
else
len = sprintf( buf, "%.10g", value_to_print );
snprintf( buf, sizeof( buf ) - 1, "%.10g", value_to_print );
}
wxString stringValue( buf, wxConvUTF8 );
File diff suppressed because it is too large Load Diff
+6 -8
View File
@@ -101,7 +101,7 @@ BITMAP_STORE::BITMAP_STORE()
{
wxFileName path( PATHS::GetStockDataPath() + wxT( "/resources" ), IMAGE_ARCHIVE );
wxLogTrace( traceBitmaps, wxT( "Loading bitmaps from " ) + path.GetFullPath() );
wxLogTrace( traceBitmaps, "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, wxT( "Bitmap for %d, %d, %s has an info tag with file %s," )
wxT( "but that file could not be found in the archive!" ),
wxLogTrace( traceBitmaps, "Bitmap for %d, %d, %s has an info tag with file %s,"
"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, wxT( "No bitmap info available for %d" ), aBitmapId );
wxLogTrace( traceBitmaps, "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, wxT( "No bitmap found matching ID %d, height %d, theme %s" ),
wxLogTrace( traceBitmaps, "No bitmap found matching ID %d, height %d, theme %s",
aBitmapId, aHeight, m_theme );
return m_bitmapInfoCache.at( aBitmapId ).begin()->filename;
}
@@ -236,6 +235,5 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
void BITMAP_STORE::buildBitmapInfoCache()
{
for( const BITMAP_INFO& entry : g_BitmapInfo )
m_bitmapInfoCache[entry.id].emplace_back( entry );
BuildBitmapInfo( m_bitmapInfoCache );
}
+17 -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
@@ -115,6 +116,10 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
{
for( int i = 0; i < LAYER_ID_COUNT; ++i )
dstSettings->SetLayerColor( i, COLOR4D::BLACK );
// In B&W mode, draw the background only in wxhite, because any other color
// will be replaced by a black background
dstSettings->SetBackgroundColor( COLOR4D::WHITE );
}
else // color enabled
{
@@ -175,6 +180,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();
+2 -2
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,7 +64,7 @@ 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;
+1 -1
View File
@@ -419,7 +419,7 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString&
wxStaticText* DIALOG_ABOUT::wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference )
{
wxStaticText* text = new wxStaticText( aParent, wxID_ANY,
wxT( "(wxT( " ) + aReference + wxT( " ))" ) );
wxT( "(" ) + aReference + wxT( ")" ) );
return text;
}
+7
View File
@@ -25,6 +25,7 @@
#include <dialog_shim.h>
#include <ignore.h>
#include <kiway_player.h>
#include <kiway.h>
#include <pgm_base.h>
#include <tool/tool_manager.h>
#include <kiplatform/ui.h>
@@ -122,6 +123,9 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
if( kiwayHolder )
SetKiway( this, &kiwayHolder->Kiway() );
if( HasKiway() )
Kiway().SetBlockingDialog( this );
Bind( wxEVT_CLOSE_WINDOW, &DIALOG_SHIM::OnCloseWindow, this );
Bind( wxEVT_BUTTON, &DIALOG_SHIM::OnButton, this );
@@ -143,6 +147,9 @@ DIALOG_SHIM::~DIALOG_SHIM()
if( IsQuasiModal() )
EndQuasiModal( wxID_CANCEL );
if( HasKiway() )
Kiway().SetBlockingDialog( nullptr );
if( m_qmodal_parent_disabler )
delete m_qmodal_parent_disabler; // usually NULL by now
}
+5 -6
View File
@@ -213,6 +213,7 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
try
{
cntUpd.Start();
try
{
m_view->UpdateItems();
@@ -229,9 +230,7 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
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 )
@@ -273,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 )
{
@@ -294,6 +290,9 @@ void EDA_DRAW_PANEL_GAL::DoRePaint()
}
}
// ctx goes out of scope here so destructor would be called
cntCtxDestroy.Stop();
if( isDirty )
{
+1 -2
View File
@@ -152,9 +152,8 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
}
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 )
+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 =
{
+7 -1
View File
@@ -387,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();
}
@@ -463,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();
}
@@ -694,7 +700,7 @@ void EDA_DRAW_FRAME::SetMsgPanel( EDA_ITEM* aItem )
void EDA_DRAW_FRAME::UpdateMsgPanel()
{
GetToolManager()->PostEvent( EVENTS::SelectedItemsModified );
GetToolManager()->ProcessEvent( EVENTS::SelectedItemsModified );
}
+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" ) )
+27 -5
View File
@@ -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 );
+4 -2
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;
@@ -316,7 +316,9 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, bool aInvertY ) const
// interline spacing is only *between* lines, so total height is the height of the first
// line plus the interline distance (with interline spacing) for all subsequent lines
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline );
// Don't add interline spacing to empty textboxes
if( strings.GetCount() )
textsize.y += KiROUND( ( strings.GetCount() - 1 ) * interline );
}
rect.SetSize( textsize );
+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 )
+2 -2
View File
@@ -465,10 +465,10 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
wxString msg = _( "Alias: " );
msg.append( tpath.m_Alias );
msg.append( wxT( "\n" ) );
msg.append( _( "This path:wxT( " ) + wxS( " ) " ) );
msg.append( _( "This path:" ) + wxS( " " ) );
msg.append( tpath.m_Pathvar );
msg.append( wxT( "\n" ) );
msg.append( _( "Existing path:wxT( " ) + wxS( " ) " ) );
msg.append( _( "Existing path:" ) + wxS( " " ) );
msg.append( sPL->m_Pathvar );
wxMessageBox( msg, _( "Bad alias (duplicate name)" ) );
+1 -1
View File
@@ -106,7 +106,7 @@ bool SHADER::Link()
// Check the Link state
GLint tmp;
glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, &tmp );
glGetProgramiv( programNumber, GL_LINK_STATUS, &tmp );
isShaderLinked = !!tmp;
#ifdef DEBUG
+8 -6
View File
@@ -642,9 +642,8 @@ void GRID_TRICKS::paste_text( const wxString& cb_text )
for( int row = start_row; row < end_row; ++row )
{
// If number of selected rows bigger than count of rows in
// the clipboard, paste from the clipboard again and again
// while end of the selection is reached.
// If number of selected rows is larger than the count of rows on the clipboard, paste
// again and again until the end of the selection is reached.
if( !rows.HasMoreTokens() )
rows.SetString( cb_text, ROW_SEP, wxTOKEN_RET_EMPTY );
@@ -662,9 +661,12 @@ void GRID_TRICKS::paste_text( const wxString& cb_text )
for( int col = start_col; col < end_col; ++col )
{
// If number of selected columns bigger than count of columns in
// the clipboard, paste from the clipboard again and again while
// end of the selection is reached.
// Skip hidden columns
if( !m_grid->IsColShown( col ) )
continue;
// If number of selected cols is larger than the count of cols on the clipboard,
// paste again and again until the end of the selection is reached.
if( !cols.HasMoreTokens() )
cols.SetString( rowTxt, COL_SEP, wxTOKEN_RET_EMPTY );
+8 -2
View File
@@ -40,8 +40,14 @@
// boost:mt19937 is not thread-safe
static std::mutex rng_mutex;
// Create only once, as seeding is *very* expensive
static boost::mt19937 rng;
// Static rng and generators are used because the overhead of constant seeding is expensive
// We break out the rng separately from the generator because we want to control seeding in cases like unit tests
#if BOOST_VERSION >= 106700
static boost::uuids::detail::random_provider seeder; // required to ensure the rng has a random initial seed
#else
static boost::uuids::detail::seed_rng seeder; // required to ensure the rng has a random initial seed
#endif
static boost::mt19937 rng( seeder );
static boost::uuids::basic_random_generator<boost::mt19937> randomGenerator( rng );
// These don't have the same performance penalty, but we might as well be consistent
+24 -1
View File
@@ -34,6 +34,7 @@
#include <core/arraydim.h>
#include <id.h>
#include <kiplatform/app.h>
#include <kiplatform/environment.h>
#include <settings/settings_manager.h>
#include <logging.h>
@@ -49,7 +50,7 @@ int KIWAY::m_kiface_version[KIWAY_FACE_COUNT];
KIWAY::KIWAY( PGM_BASE* aProgram, int aCtlBits, wxFrame* aTop ):
m_program( aProgram ), m_ctl( aCtlBits ), m_top( nullptr )
m_program( aProgram ), m_ctl( aCtlBits ), m_top( nullptr ), m_blockingDialog( wxID_NONE )
{
SetTop( aTop ); // hook player_destroy_handler() into aTop.
@@ -230,6 +231,15 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad )
}
}
#ifdef KICAD_WIN32_VERIFY_CODESIGN
bool codeSignOk = KIPLATFORM::ENV::VerifyFileSignature( dname );
if( !codeSignOk )
{
msg.Printf( _( "Failed to verify kiface library '%s' signature." ), dname );
THROW_IO_ERROR( msg );
}
#endif
wxDynamicLibrary dso;
void* addr = nullptr;
@@ -596,6 +606,19 @@ void KIWAY::ProjectChanged()
}
}
wxWindow* KIWAY::GetBlockingDialog()
{
return wxWindow::FindWindowById( m_blockingDialog );
}
void KIWAY::SetBlockingDialog( wxWindow* aWin )
{
if( !aWin )
m_blockingDialog = wxID_NONE;
else
m_blockingDialog = aWin->GetId();
}
bool KIWAY::ProcessEvent( wxEvent& aEvent )
{
+63 -60
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 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 as published by the
@@ -23,79 +23,82 @@
/**
* Returns the default display name for a given layer. These are not the same as the canonical
* name in LSET::Name(), which is used in board files and cannot be translated or changed.
* WARNING: do not translate board physical layers names (F.Cu to User.9): because canonical names
* are used in files (boards and fab files), using translated names in UI create mistakes for users.
* Board physical layers names must be seen as proper nouns.
*/
wxString LayerName( int aLayer )
{
switch( aLayer )
{
// PCB_LAYER_ID
case F_Cu: return _( "F.Cu" );
case In1_Cu: return _( "In1.Cu" );
case In2_Cu: return _( "In2.Cu" );
case In3_Cu: return _( "In3.Cu" );
case In4_Cu: return _( "In4.Cu" );
case In5_Cu: return _( "In5.Cu" );
case In6_Cu: return _( "In6.Cu" );
case In7_Cu: return _( "In7.Cu" );
case In8_Cu: return _( "In8.Cu" );
case In9_Cu: return _( "In9.Cu" );
case In10_Cu: return _( "In10.Cu" );
case In11_Cu: return _( "In11.Cu" );
case In12_Cu: return _( "In12.Cu" );
case In13_Cu: return _( "In13.Cu" );
case In14_Cu: return _( "In14.Cu" );
case In15_Cu: return _( "In15.Cu" );
case In16_Cu: return _( "In16.Cu" );
case In17_Cu: return _( "In17.Cu" );
case In18_Cu: return _( "In18.Cu" );
case In19_Cu: return _( "In19.Cu" );
case In20_Cu: return _( "In20.Cu" );
case In21_Cu: return _( "In21.Cu" );
case In22_Cu: return _( "In22.Cu" );
case In23_Cu: return _( "In23.Cu" );
case In24_Cu: return _( "In24.Cu" );
case In25_Cu: return _( "In25.Cu" );
case In26_Cu: return _( "In26.Cu" );
case In27_Cu: return _( "In27.Cu" );
case In28_Cu: return _( "In28.Cu" );
case In29_Cu: return _( "In29.Cu" );
case In30_Cu: return _( "In30.Cu" );
case B_Cu: return _( "B.Cu" );
case F_Cu: return wxT( "F.Cu" );
case In1_Cu: return wxT( "In1.Cu" );
case In2_Cu: return wxT( "In2.Cu" );
case In3_Cu: return wxT( "In3.Cu" );
case In4_Cu: return wxT( "In4.Cu" );
case In5_Cu: return wxT( "In5.Cu" );
case In6_Cu: return wxT( "In6.Cu" );
case In7_Cu: return wxT( "In7.Cu" );
case In8_Cu: return wxT( "In8.Cu" );
case In9_Cu: return wxT( "In9.Cu" );
case In10_Cu: return wxT( "In10.Cu" );
case In11_Cu: return wxT( "In11.Cu" );
case In12_Cu: return wxT( "In12.Cu" );
case In13_Cu: return wxT( "In13.Cu" );
case In14_Cu: return wxT( "In14.Cu" );
case In15_Cu: return wxT( "In15.Cu" );
case In16_Cu: return wxT( "In16.Cu" );
case In17_Cu: return wxT( "In17.Cu" );
case In18_Cu: return wxT( "In18.Cu" );
case In19_Cu: return wxT( "In19.Cu" );
case In20_Cu: return wxT( "In20.Cu" );
case In21_Cu: return wxT( "In21.Cu" );
case In22_Cu: return wxT( "In22.Cu" );
case In23_Cu: return wxT( "In23.Cu" );
case In24_Cu: return wxT( "In24.Cu" );
case In25_Cu: return wxT( "In25.Cu" );
case In26_Cu: return wxT( "In26.Cu" );
case In27_Cu: return wxT( "In27.Cu" );
case In28_Cu: return wxT( "In28.Cu" );
case In29_Cu: return wxT( "In29.Cu" );
case In30_Cu: return wxT( "In30.Cu" );
case B_Cu: return wxT( "B.Cu" );
// Technicals
case B_Adhes: return _( "B.Adhesive" );
case F_Adhes: return _( "F.Adhesive" );
case B_Paste: return _( "B.Paste" );
case F_Paste: return _( "F.Paste" );
case B_SilkS: return _( "B.Silkscreen" );
case F_SilkS: return _( "F.Silkscreen" );
case B_Mask: return _( "B.Mask" );
case F_Mask: return _( "F.Mask" );
case B_Adhes: return wxT( "B.Adhesive" );
case F_Adhes: return wxT( "F.Adhesive" );
case B_Paste: return wxT( "B.Paste" );
case F_Paste: return wxT( "F.Paste" );
case B_SilkS: return wxT( "B.Silkscreen" );
case F_SilkS: return wxT( "F.Silkscreen" );
case B_Mask: return wxT( "B.Mask" );
case F_Mask: return wxT( "F.Mask" );
// Users
case Dwgs_User: return _( "User.Drawings" );
case Cmts_User: return _( "User.Comments" );
case Eco1_User: return _( "User.Eco1" );
case Eco2_User: return _( "User.Eco2" );
case Edge_Cuts: return _( "Edge.Cuts" );
case Margin: return _( "Margin" );
case Dwgs_User: return wxT( "User.Drawings" );
case Cmts_User: return wxT( "User.Comments" );
case Eco1_User: return wxT( "User.Eco1" );
case Eco2_User: return wxT( "User.Eco2" );
case Edge_Cuts: return wxT( "Edge.Cuts" );
case Margin: return wxT( "Margin" );
// Footprint
case F_CrtYd: return _( "F.Courtyard" );
case B_CrtYd: return _( "B.Courtyard" );
case F_Fab: return _( "F.Fab" );
case B_Fab: return _( "B.Fab" );
case F_CrtYd: return wxT( "F.Courtyard" );
case B_CrtYd: return wxT( "B.Courtyard" );
case F_Fab: return wxT( "F.Fab" );
case B_Fab: return wxT( "B.Fab" );
// User definable layers.
case User_1: return _( "User.1" );
case User_2: return _( "User.2" );
case User_3: return _( "User.3" );
case User_4: return _( "User.4" );
case User_5: return _( "User.5" );
case User_6: return _( "User.6" );
case User_7: return _( "User.7" );
case User_8: return _( "User.8" );
case User_9: return _( "User.9" );
case User_1: return wxT( "User.1" );
case User_2: return wxT( "User.2" );
case User_3: return wxT( "User.3" );
case User_4: return wxT( "User.4" );
case User_5: return wxT( "User.5" );
case User_6: return wxT( "User.6" );
case User_7: return wxT( "User.7" );
case User_8: return wxT( "User.8" );
case User_9: return wxT( "User.9" );
// Rescue
case Rescue: return _( "Rescue" );
+23 -3
View File
@@ -203,7 +203,7 @@ wxString PATHS::GetStockSymbolsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/symbols" );
path = GetStockEDALibraryPath() + wxT( "/symbols" );
return path;
}
@@ -213,7 +213,7 @@ wxString PATHS::GetStockFootprintsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/footprints" );
path = GetStockEDALibraryPath() + wxT( "/footprints" );
return path;
}
@@ -223,7 +223,7 @@ wxString PATHS::GetStock3dmodelsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/3dmodels" );
path = GetStockEDALibraryPath() + wxT( "/3dmodels" );
return path;
}
@@ -239,6 +239,26 @@ wxString PATHS::GetStockScriptingPath()
}
wxString PATHS::GetStockTemplatesPath()
{
wxString path;
path = GetStockEDALibraryPath() + wxT( "/template" );
return path;
}
wxString PATHS::GetLocaleDataPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/internat" );
return path;
}
wxString PATHS::GetStockPluginsPath()
{
wxFileName fn;
+3 -43
View File
@@ -56,6 +56,7 @@
#include <settings/settings_manager.h>
#include <systemdirsappend.h>
#include <trace_helpers.h>
#include <paths.h>
/**
@@ -383,7 +384,7 @@ void PGM_BASE::SaveCommonSettings()
COMMON_SETTINGS* PGM_BASE::GetCommonSettings() const
{
return m_settings_manager ? GetSettingsManager().GetCommonSettings() : nullptr;
return m_settings_manager ? m_settings_manager->GetCommonSettings() : nullptr;
}
@@ -540,48 +541,7 @@ void PGM_BASE::SetLanguageIdentifier( int menu_id )
void PGM_BASE::SetLanguagePath()
{
SEARCH_STACK guesses;
SystemDirsAppend( &guesses );
// Add our internat dir to the wxLocale catalog of paths
for( unsigned i = 0; i < guesses.GetCount(); i++ )
{
wxFileName fn( guesses[i], wxEmptyString );
// Append path for Windows and unix KiCad package install
fn.AppendDir( wxT( "share" ) );
fn.AppendDir( wxT( "internat" ) );
if( fn.IsDirReadable() )
{
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
}
// Append path for unix standard install
fn.RemoveLastDir();
fn.AppendDir( wxT( "kicad" ) );
fn.AppendDir( wxT( "internat" ) );
if( fn.IsDirReadable() )
{
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
}
// Append path for macOS install
fn.RemoveLastDir();
fn.RemoveLastDir();
fn.RemoveLastDir();
fn.AppendDir( wxT( "internat" ) );
if( fn.IsDirReadable() )
{
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
}
}
wxLocale::AddCatalogLookupPathPrefix( PATHS::GetLocaleDataPath() );
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
+24 -15
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2021 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 as published by the
@@ -842,8 +842,6 @@ void GERBER_PLOTTER::plotArc( const SHAPE_ARC& aArc, bool aPlotInRegion )
wxPoint start( aArc.GetP0() );
wxPoint end( aArc.GetP1() );
wxPoint center( aArc.GetCenter() );
double start_angle = aArc.GetStartAngle();
double end_angle = aArc.GetEndAngle();
if( !aPlotInRegion )
MoveTo( start);
@@ -851,14 +849,20 @@ void GERBER_PLOTTER::plotArc( const SHAPE_ARC& aArc, bool aPlotInRegion )
LineTo( start );
DPOINT devEnd = userToDeviceCoordinates( end );
DPOINT devCenter = userToDeviceCoordinates( center ) - userToDeviceCoordinates( start );
DPOINT devCenter = userToDeviceCoordinates( center - start );
VECTOR2I arcMidPoint = aArc.GetArcMid();
// We need to know if the arc is CW or CCW in device coordinates, so build this arc.
SHAPE_ARC deviceArc( userToDeviceCoordinates( start ),
userToDeviceCoordinates( wxPoint( arcMidPoint.x, arcMidPoint.y ) ),
devEnd, 0 );
fprintf( m_outputFile, "G75*\n" ); // Multiquadrant (360 degrees) mode
if( start_angle < end_angle )
fprintf( m_outputFile, "G03*\n" ); // Active circular interpolation, CCW
else
if( deviceArc.IsClockwise() )
fprintf( m_outputFile, "G02*\n" ); // Active circular interpolation, CW
else
fprintf( m_outputFile, "G03*\n" ); // Active circular interpolation, CCW
fprintf( m_outputFile, "X%dY%dI%dJ%dD01*\n",
KiROUND( devEnd.x ), KiROUND( devEnd.y ),
@@ -1010,6 +1014,10 @@ void GERBER_PLOTTER::PlotPoly( const SHAPE_LINE_CHAIN& aPoly, FILL_T aFill, int
const SHAPE_ARC& arc = aPoly.Arc( arcindex );
plotArc( arc, ii > 0 );
// skip points on arcs, since we plot the arc itself
while( ii+1 < aPoly.PointCount() && arcindex == aPoly.ArcIndex( ii+1 ) )
ii++;
}
}
@@ -1040,12 +1048,17 @@ void GERBER_PLOTTER::PlotPoly( const SHAPE_LINE_CHAIN& aPoly, FILL_T aFill, int
const SHAPE_ARC& arc = aPoly.Arc( arcindex );
plotArc( arc, ii > 0 );
// skip points on arcs, since we plot the arc itself
while( ii+1 < aPoly.PointCount() && arcindex == aPoly.ArcIndex( ii+1 ) )
ii++;
}
}
// Ensure the thick outline is closed for filled polygons
// (if not filled, could be only a polyline)
if( aFill != FILL_T::NO_FILL && ( aPoly.CPoint( 0 ) != aPoly.CPoint( -1 ) ) )
if( ( aPoly.CPoint( 0 ) != aPoly.CPoint( -1 ) )
&& ( aPoly.IsClosed() || aFill != FILL_T::NO_FILL ) )
LineTo( wxPoint( aPoly.CPoint( 0 ) ) );
PenFinish();
@@ -1239,7 +1252,7 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, OUTLINE_M
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
Circle( pos, diametre - m_currentPenWidth, FILL_T::NO_FILL, DO_NOT_SET_LINE_WIDTH );
Circle( pos, diametre, FILL_T::NO_FILL, DO_NOT_SET_LINE_WIDTH );
}
else
{
@@ -1359,10 +1372,8 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
Rect( wxPoint( pos.x - (size.x - GetCurrentLineWidth()) / 2,
pos.y - (size.y - GetCurrentLineWidth()) / 2 ),
wxPoint( pos.x + (size.x - GetCurrentLineWidth()) / 2,
pos.y + (size.y - GetCurrentLineWidth()) / 2 ),
Rect( wxPoint( pos.x - ( size.x / 2 ), pos.y - ( size.y / 2 ) ),
wxPoint( pos.x + ( size.x / 2 ), pos.y + ( size.y / 2 ) ),
FILL_T::NO_FILL, GetCurrentLineWidth() );
}
else
@@ -1432,7 +1443,6 @@ void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS
0.0, 0, 0, GetPlotterArcHighDef(), ERROR_INSIDE );
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, &gbr_metadata );
outline.Inflate( -GetCurrentLineWidth()/2, 16 );
std::vector< wxPoint > cornerList;
// TransformRoundRectToPolygon creates only one convex polygon
@@ -1644,7 +1654,6 @@ void GERBER_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize
if( aTraceMode != FILLED )
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH, &gbr_metadata );
polyshape.Inflate( -GetCurrentLineWidth()/2, 16 );
}
std::vector< wxPoint > cornerList;
+5 -5
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-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
@@ -486,7 +486,7 @@ void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList, FILL_T aFi
m_current_item->content << hpgl_end_polygon_cmd; // Close, fill polygon and draw outlines
m_current_item->pen_returns = true;
}
else if( aWidth > 0 )
else if( aWidth != 0 )
{
// Plot only the polygon outline.
for( unsigned ii = 1; ii < aCornerList.size(); ii++ )
@@ -659,10 +659,10 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
// if filled mode, the pen diameter is removed from diameter
// to keep the pad size
radius -= KiROUND( penDiameter ) / 2;
}
if( radius < 0 )
radius = 0;
if( radius < 0 )
radius = 0;
}
double rsize = userToDeviceSize( radius );
+2 -39
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-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
@@ -127,13 +127,7 @@ void PSLIKE_PLOTTER::FlashPadCircle( const wxPoint& aPadPos, int aDiameter,
else // Plot a ring:
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
int linewidth = GetCurrentLineWidth();
// avoid aDiameter <= 1 )
if( linewidth > aDiameter-2 )
linewidth = aDiameter-2;
Circle( aPadPos, aDiameter - linewidth, FILL_T::NO_FILL, linewidth );
Circle( aPadPos, aDiameter, FILL_T::NO_FILL, GetCurrentLineWidth() );
}
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
@@ -152,15 +146,6 @@ void PSLIKE_PLOTTER::FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize,
else
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
size.x -= GetCurrentLineWidth();
size.y -= GetCurrentLineWidth();
if( size.x < 1 )
size.x = 1;
if( size.y < 1 )
size.y = 1;
int dx = size.x / 2;
int dy = size.y / 2;
@@ -203,9 +188,6 @@ void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS
else
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
size.x -= GetCurrentLineWidth();
size.y -= GetCurrentLineWidth();
aCornerRadius -= GetCurrentLineWidth() / 2;
}
@@ -243,8 +225,6 @@ void PSLIKE_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize
else
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
size.x -= GetCurrentLineWidth();
size.y -= GetCurrentLineWidth();
}
@@ -283,23 +263,6 @@ void PSLIKE_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCor
else
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
int w = GetCurrentLineWidth();
// offset polygon by w
// coord[0] is assumed the lower left
// coord[1] is assumed the upper left
// coord[2] is assumed the upper right
// coord[3] is assumed the lower right
/* Trace the outline. */
cornerList[0].x += w;
cornerList[0].y -= w;
cornerList[1].x += w;
cornerList[1].y += w;
cornerList[2].x -= w;
cornerList[2].y += w;
cornerList[3].x -= w;
cornerList[3].y -= w;
}
for( int ii = 0; ii < 4; ii++ )
+2 -8
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2017-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017-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
@@ -93,12 +93,6 @@ DPOINT PLOTTER::userToDeviceCoordinates( const wxPoint& aCoordinate )
{
wxPoint pos = aCoordinate - m_plotOffset;
// Don't allow overflows; they can cause rendering failures in some file viewers
// (such as Acrobat)
int clampSize = MAX_PAGE_SIZE_MILS * m_IUsPerDecimil * 10 / 2;
pos.x = std::max( -clampSize, std::min( pos.x, clampSize ) );
pos.y = std::max( -clampSize, std::min( pos.y, clampSize ) );
double x = pos.x * m_plotScale;
double y = ( m_paperSize.y - pos.y * m_plotScale );
@@ -492,7 +486,7 @@ void PLOTTER::sketchOval( const wxPoint& pos, const wxSize& aSize, double orient
}
deltaxy = size.y - size.x; /* distance between centers of the oval */
radius = ( size.x - width ) / 2;
radius = size.x / 2;
cx = -radius;
cy = -deltaxy / 2;
RotatePoint( &cx, &cy, orient );
@@ -2258,6 +2258,10 @@ void CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::Parse( XNODE* aNode, PARSER_CONTEXT* aC
attrcol.Parse( cNode, aContext );
AttributeColors.insert( { attrcol.AttributeID, attrcol } );
}
else if( cNodeName == wxT( "INVISIBLE" ) )
{
IsVisible = false;
}
else
{
THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
@@ -1253,6 +1253,8 @@ public:
DFLTSETTINGS DefaultSettings;
std::map<ATTRIBUTE_ID, ATTRCOL> AttributeColors;
bool IsVisible = true; // unclear what this represents - maybe all attributes are hidden?
void Parse( XNODE* aNode, PARSER_CONTEXT* aContext ) override;
};
+9 -7
View File
@@ -538,18 +538,20 @@ EDIMENSION::EDIMENSION( wxXmlNode* aDimension )
y2 %Coord; #REQUIRED
x3 %Coord; #REQUIRED
y3 %Coord; #REQUIRED
textsize %Coord;
layer %Layer; #REQUIRED
dtype %DimensionType; "parallel"
>
*/
x1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x1" ) );
y1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y1" ) );
x2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x2" ) );
y2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y2" ) );
x3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x3" ) );
y3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y3" ) );
layer = parseRequiredAttribute<int>( aDimension, wxT( "layer" ) );
x1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x1" ) );
y1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y1" ) );
x2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x2" ) );
y2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y2" ) );
x3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x3" ) );
y3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y3" ) );
textsize = parseOptionalAttribute<ECOORD>( aDimension, wxT( "textsize" ) );
layer = parseRequiredAttribute<int>( aDimension, wxT( "layer" ) );
dimensionType = parseOptionalAttribute<wxString>( aDimension, wxT( "dtype" ) );
}
+14 -14
View File
@@ -531,13 +531,13 @@ struct EJUNCTION
/// Eagle label
struct ELABEL
{
ECOORD x;
ECOORD y;
ECOORD size;
LAYER_NUM layer;
opt_erot rot;
ECOORD x;
ECOORD y;
ECOORD size;
LAYER_NUM layer;
opt_erot rot;
opt_wxString xref;
wxString netname;
wxString netname;
ELABEL( wxXmlNode* aLabel, const wxString& aNetName );
};
@@ -619,14 +619,14 @@ struct EATTR
/// Eagle dimension element
struct EDIMENSION
{
ECOORD x1;
ECOORD y1;
ECOORD x2;
ECOORD y2;
ECOORD x3;
ECOORD y3;
int layer;
ECOORD x1;
ECOORD y1;
ECOORD x2;
ECOORD y2;
ECOORD x3;
ECOORD y3;
opt_ecoord textsize;
int layer;
opt_wxString dimensionType;
EDIMENSION( wxXmlNode* aDimension );
@@ -83,7 +83,7 @@ void POLYGON_GEOM_MANAGER::SetLeaderMode( LEADER_MODE aMode )
bool POLYGON_GEOM_MANAGER::IsSelfIntersecting( bool aIncludeLeaderPts ) const
{
auto pts( m_lockedPoints );
SHAPE_LINE_CHAIN pts( m_lockedPoints );
if( aIncludeLeaderPts )
{
+7 -1
View File
@@ -37,6 +37,8 @@ SCINTILLA_TRICKS::SCINTILLA_TRICKS( wxStyledTextCtrl* aScintilla, const wxString
m_te( aScintilla ),
m_braces( aBraces ),
m_lastCaretPos( -1 ),
m_lastSelStart( -1 ),
m_lastSelEnd( -1 ),
m_suppressAutocomplete( false ),
m_singleLine( aSingleLine ),
m_returnCallback( aReturnCallback )
@@ -337,10 +339,14 @@ void SCINTILLA_TRICKS::onScintillaUpdateUI( wxStyledTextEvent& aEvent )
// Has the caret changed position?
int caretPos = m_te->GetCurrentPos();
int selStart = m_te->GetSelectionStart();
int selEnd = m_te->GetSelectionEnd();
if( m_lastCaretPos != caretPos )
if( m_lastCaretPos != caretPos || m_lastSelStart != selStart || m_lastSelEnd != selEnd )
{
m_lastCaretPos = caretPos;
m_lastSelStart = selStart;
m_lastSelEnd = selEnd;
int bracePos1 = -1;
int bracePos2 = -1;
+1 -38
View File
@@ -509,44 +509,7 @@ void COMMON_SETTINGS::InitializeEnvironment()
path.AppendDir( wxT( "3dmodels" ) );
addVar( wxT( "KICAD6_3DMODEL_DIR" ), path.GetFullPath() );
// We don't have just one default template path, so use this logic that originally was in
// PGM_BASE::InitPgm to determine the best default template path
{
// Attempt to find the best default template path.
SEARCH_STACK bases;
SEARCH_STACK templatePaths;
SystemDirsAppend( &bases );
for( unsigned i = 0; i < bases.GetCount(); ++i )
{
wxFileName fn( bases[i], wxEmptyString );
// Add KiCad template file path to search path list.
fn.AppendDir( "template" );
// Only add path if exists and can be read by the user.
if( fn.DirExists() && fn.IsDirReadable() )
{
wxLogTrace( tracePathsAndFiles, "Checking template path '%s' exists",
fn.GetPath() );
templatePaths.AddPaths( fn.GetPath() );
}
}
if( templatePaths.IsEmpty() )
{
path = basePath;
path.AppendDir( "template" );
}
else
{
// Take the first one. There may be more but this will likely be the best option.
path.AssignDir( templatePaths[0] );
}
addVar( wxT( "KICAD6_TEMPLATE_DIR" ), path.GetFullPath() );
}
addVar( wxT( "KICAD6_TEMPLATE_DIR" ), PATHS::GetStockTemplatesPath() );
addVar( wxT( "KICAD_USER_TEMPLATE_DIR" ), PATHS::GetUserTemplatesPath() );
+30 -18
View File
@@ -387,6 +387,7 @@ wxString SETTINGS_MANAGER::GetPathForSettingsFile( JSON_SETTINGS* aSettings )
return GetUserSettingsPath();
case SETTINGS_LOC::PROJECT:
// TODO: MDI support
return Prj().GetProjectPath();
case SETTINGS_LOC::COLORS:
@@ -954,42 +955,48 @@ std::vector<wxString> SETTINGS_MANAGER::GetOpenProjects() const
}
bool SETTINGS_MANAGER::SaveProject( const wxString& aFullPath )
bool SETTINGS_MANAGER::SaveProject( const wxString& aFullPath, PROJECT* aProject )
{
if( !aProject )
aProject = &Prj();
wxString path = aFullPath;
if( path.empty() )
path = Prj().GetProjectFullName();
path = aProject->GetProjectFullName();
// TODO: refactor for MDI
if( Prj().IsReadOnly() )
if( aProject->IsReadOnly() )
return false;
if( !m_project_files.count( path ) )
return false;
PROJECT_FILE* project = m_project_files.at( path );
wxString projectPath = GetPathForSettingsFile( project );
wxString projectPath = aProject->GetProjectPath();
project->SaveToFile( projectPath );
Prj().GetLocalSettings().SaveToFile( projectPath );
aProject->GetLocalSettings().SaveToFile( projectPath );
return true;
}
void SETTINGS_MANAGER::SaveProjectAs( const wxString& aFullPath )
void SETTINGS_MANAGER::SaveProjectAs( const wxString& aFullPath, PROJECT* aProject )
{
wxString oldName = Prj().GetProjectFullName();
if( !aProject )
aProject = &Prj();
wxString oldName = aProject->GetProjectFullName();
if( aFullPath.IsSameAs( oldName ) )
{
SaveProject( aFullPath );
SaveProject( aFullPath, aProject );
return;
}
// Changing this will cause UnloadProject to not save over the "old" project when loading below
Prj().setProjectFullName( aFullPath );
aProject->setProjectFullName( aFullPath );
wxFileName fn( aFullPath );
@@ -997,14 +1004,14 @@ void SETTINGS_MANAGER::SaveProjectAs( const wxString& aFullPath )
// Ensure read-only flags are copied; this allows doing a "Save As" on a standalong board/sch
// without creating project files if the checkbox is turned off
project->SetReadOnly( Prj().IsReadOnly() );
Prj().GetLocalSettings().SetReadOnly( Prj().IsReadOnly() );
project->SetReadOnly( aProject->IsReadOnly() );
aProject->GetLocalSettings().SetReadOnly( aProject->IsReadOnly() );
project->SetFilename( fn.GetName() );
project->SaveToFile( fn.GetPath() );
Prj().GetLocalSettings().SetFilename( fn.GetName() );
Prj().GetLocalSettings().SaveToFile( fn.GetPath() );
aProject->GetLocalSettings().SetFilename( fn.GetName() );
aProject->GetLocalSettings().SaveToFile( fn.GetPath() );
m_project_files[fn.GetFullPath()] = project;
m_project_files.erase( oldName );
@@ -1014,9 +1021,12 @@ void SETTINGS_MANAGER::SaveProjectAs( const wxString& aFullPath )
}
void SETTINGS_MANAGER::SaveProjectCopy( const wxString& aFullPath )
void SETTINGS_MANAGER::SaveProjectCopy( const wxString& aFullPath, PROJECT* aProject )
{
PROJECT_FILE* project = m_project_files.at( Prj().GetProjectFullName() );
if( !aProject )
aProject = &Prj();
PROJECT_FILE* project = m_project_files.at( aProject->GetProjectFullName() );
wxString oldName = project->GetFilename();
wxFileName fn( aFullPath );
@@ -1027,9 +1037,11 @@ void SETTINGS_MANAGER::SaveProjectCopy( const wxString& aFullPath )
project->SaveToFile( fn.GetPath() );
project->SetFilename( oldName );
Prj().GetLocalSettings().SetFilename( fn.GetName() );
Prj().GetLocalSettings().SaveToFile( fn.GetPath() );
Prj().GetLocalSettings().SetFilename( oldName );
PROJECT_LOCAL_SETTINGS& localSettings = aProject->GetLocalSettings();
localSettings.SetFilename( fn.GetName() );
localSettings.SaveToFile( fn.GetPath() );
localSettings.SetFilename( oldName );
project->SetReadOnly( readOnly );
}
+5
View File
@@ -96,7 +96,12 @@ static struct PGM_SINGLE_TOP : public PGM_BASE
KIWAY_PLAYER* frame = (KIWAY_PLAYER*) App().GetTopWindow();
#endif
if( frame )
{
if( wxWindow* blocking_win = frame->Kiway().GetBlockingDialog() )
blocking_win->Close( true );
frame->OpenProjectFiles( std::vector<wxString>( 1, aFileName ) );
}
}
}
+31 -3
View File
@@ -50,6 +50,8 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
if( aOldStr == wxT( "~" ) )
return aOldStr;
newStr.reserve( aOldStr.length() );
for( wxString::const_iterator chIt = aOldStr.begin(); chIt != aOldStr.end(); ++chIt )
{
if( *chIt == '~' )
@@ -140,7 +142,17 @@ bool ConvertSmartQuotesAndDashes( wxString* aString )
wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
{
wxString converted;
wxString converted;
std::vector<bool> braceStack; // true == formatting construct
auto hasFormattingPrefix =
[&]()
{
static wxString prefixes = wxT( "~_^" );
return !converted.IsEmpty() && prefixes.Find( converted.Last() ) >= 0;
};
converted.reserve( aSource.length() );
for( wxUniChar c: aSource )
{
@@ -155,7 +167,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
}
else if( aContext == CTX_LIBID )
{
if( c == '{' )
if( c == '{' && !hasFormattingPrefix() )
converted += wxT( "{brace}" );
else if( c == '/' )
converted += wxT( "{slash}" );
@@ -223,7 +235,9 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
converted += c;
}
else
{
converted += c;
}
}
return converted;
@@ -232,8 +246,16 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
wxString UnescapeString( const wxString& aSource )
{
size_t sourceLen = aSource.length();
// smallest escape string is three characters, shortcut everything else
if( sourceLen <= 2 )
{
return aSource;
}
wxString newbuf;
size_t sourceLen = aSource.length();
newbuf.reserve( sourceLen );
for( size_t i = 0; i < sourceLen; ++i )
{
@@ -305,6 +327,8 @@ wxString TitleCaps( const wxString& aString )
wxStringSplit( aString, words, ' ' );
result.reserve( aString.length() );
for( const wxString& word : words )
{
if( !result.IsEmpty() )
@@ -423,6 +447,8 @@ std::string EscapedUTF8( const wxString& aString )
std::string ret;
ret.reserve( utf8.length() + 2 );
ret += '"';
for( std::string::const_iterator it = utf8.begin(); it!=utf8.end(); ++it )
@@ -454,6 +480,8 @@ wxString EscapeHTML( const wxString& aString )
{
wxString converted;
converted.reserve( aString.length() );
for( wxUniChar c : aString )
{
if( c == '\"' )
+5 -6
View File
@@ -183,21 +183,20 @@ wxMenuItem* ACTION_MENU::Add( const TOOL_ACTION& aAction, bool aIsCheckmarkEntry
wxMenuItem* ACTION_MENU::Add( ACTION_MENU* aMenu )
{
ACTION_MENU* menuCopy = aMenu->Clone();
m_submenus.push_back( menuCopy );
m_submenus.push_back( aMenu );
wxASSERT_MSG( !menuCopy->m_title.IsEmpty(), wxT( "Set a title for ACTION_MENU using SetTitle()" ) );
wxASSERT_MSG( !aMenu->m_title.IsEmpty(), wxT( "Set a title for ACTION_MENU using SetTitle()" ) );
if( !!aMenu->m_icon )
{
wxMenuItem* newItem = new wxMenuItem( this, -1, menuCopy->m_title );
wxMenuItem* newItem = new wxMenuItem( this, -1, aMenu->m_title );
AddBitmapToMenuItem( newItem, KiBitmap( aMenu->m_icon ) );
newItem->SetSubMenu( menuCopy );
newItem->SetSubMenu( aMenu );
return Append( newItem );
}
else
{
return AppendSubMenu( menuCopy, menuCopy->m_title );
return AppendSubMenu( aMenu, aMenu->m_title );
}
}
+5
View File
@@ -335,7 +335,12 @@ void ACTION_TOOLBAR::doSelectAction( ACTION_GROUP* aGroup, const TOOL_ACTION& aA
// Update the item information
item->SetShortHelp( aAction.GetDescription() );
item->SetBitmap( KiScaledBitmap( aAction.GetIcon(), GetParent() ) );
#if wxCHECK_VERSION( 3, 1, 6 )
item->SetDisabledBitmap(
MakeDisabledBitmap( item->GetBitmapBundle().GetBitmapFor( GetParent() ) ) );
#else
item->SetDisabledBitmap( MakeDisabledBitmap( item->GetBitmap() ) );
#endif
// Register a new handler with the new UI conditions
if( m_toolManager )
+7
View File
@@ -177,6 +177,13 @@ int COMMON_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent )
if( wxWindow::FindFocus() != editor )
editor->SetFocus();
// If the player is currently blocked, focus the user attention on the correct window
if( wxWindow* blocking_win = editor->Kiway().GetBlockingDialog() )
{
blocking_win->Raise();
blocking_win->SetFocus();
}
return 0;
}
+6 -5
View File
@@ -144,20 +144,21 @@ void CONDITIONAL_MENU::Evaluate( SELECTION& aSelection )
switch( entry.Type() )
{
case ENTRY::ACTION:
menuItem = Add( *entry.Action(), entry.IsCheckmarkEntry() );
Add( *entry.Action(), entry.IsCheckmarkEntry() );
menu_count++;
break;
case ENTRY::MENU:
menuItem = Add( entry.Menu() );
entry.Menu()->UpdateTitle();
Add( entry.Menu()->Clone() );
menu_count++;
break;
case ENTRY::WXITEM:
menuItem = new wxMenuItem( this,
entry.wxItem()->GetId(),
entry.wxItem()->GetItemLabel(),
entry.wxItem()->GetHelp(),
wxGetTranslation( entry.wxItem()->GetItemLabel() ),
wxGetTranslation( entry.wxItem()->GetHelp() ),
entry.wxItem()->GetKind() );
if( !!entry.GetIcon() )
@@ -171,7 +172,7 @@ void CONDITIONAL_MENU::Evaluate( SELECTION& aSelection )
case ENTRY::SEPARATOR:
if( menu_count )
menuItem = AppendSeparator();
AppendSeparator();
menu_count = 0;
break;
+7 -1
View File
@@ -37,7 +37,7 @@ GRID_MENU::GRID_MENU( EDA_DRAW_FRAME* aParent ) :
ACTION_MENU( true ),
m_parent( aParent )
{
SetTitle( _( "Grid" ) );
UpdateTitle();
SetIcon( BITMAPS::grid_select );
APP_SETTINGS_BASE* settings = m_parent->config();
@@ -59,6 +59,12 @@ OPT_TOOL_EVENT GRID_MENU::eventHandler( const wxMenuEvent& aEvent )
}
void GRID_MENU::UpdateTitle()
{
SetTitle( _( "Grid" ) );
}
void GRID_MENU::update()
{
APP_SETTINGS_BASE* settings = m_parent->config();
+1 -1
View File
@@ -452,7 +452,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
{
wxWindow* holderWindow = dynamic_cast<wxWindow*>( m_toolMgr->GetToolHolder() );
#if defined( _WIN32 )
#if defined( _WIN32 ) || defined( __WXGTK__ )
// Mouse events may trigger regardless of window status (windows feature)
// However we need to avoid focus fighting (especially modals)
if( holderWindow && KIPLATFORM::UI::IsWindowActive( holderWindow ) )
+22 -1
View File
@@ -206,7 +206,8 @@ TOOL_MANAGER::TOOL_MANAGER() :
m_warpMouseAfterContextMenu( true ),
m_menuActive( false ),
m_menuOwner( -1 ),
m_activeState( nullptr )
m_activeState( nullptr ),
m_shuttingDown( false )
{
m_actionMgr = new ACTION_MANAGER( this );
}
@@ -313,6 +314,9 @@ VECTOR2D TOOL_MANAGER::GetCursorPosition() const
bool TOOL_MANAGER::RunAction( const TOOL_ACTION& aAction, bool aNow, void* aParam )
{
if( m_shuttingDown )
return true;
bool handled = false;
TOOL_EVENT event = aAction.MakeEvent();
@@ -446,10 +450,22 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool )
void TOOL_MANAGER::ShutdownAllTools()
{
m_shuttingDown = true;
// Create a temporary list of tools to iterate over since when the tools shutdown
// they remove themselves from the list automatically (invalidating the iterator)
ID_LIST tmpList = m_activeTools;
// Make sure each tool knows that it is shutting down, so that loops get shut down
// at the dispatcher
for( auto id : tmpList )
{
if( m_toolIdIndex.count( id ) == 0 )
continue;
m_toolIdIndex[id]->shutdown = true;
}
for( auto id : tmpList )
{
ShutdownTool( id );
@@ -949,6 +965,11 @@ TOOL_MANAGER::ID_LIST::iterator TOOL_MANAGER::finishTool( TOOL_STATE* aState )
bool TOOL_MANAGER::ProcessEvent( const TOOL_EVENT& aEvent )
{
// Once the tool manager is shutting down, don't start
// activating more tools
if( m_shuttingDown )
return true;
bool handled = processEvent( aEvent );
TOOL_STATE* activeTool = GetCurrentToolState();
+17 -9
View File
@@ -40,13 +40,8 @@ ZOOM_MENU::ZOOM_MENU( EDA_DRAW_FRAME* aParent ) :
ACTION_MENU( true ),
m_parent( aParent )
{
SetTitle( _( "Zoom" ) );
UpdateTitle();
SetIcon( BITMAPS::zoom_selection );
int i = ID_POPUP_ZOOM_LEVEL_START + 1; // 0 reserved for menus which support auto-zoom
for( double factor : m_parent->config()->m_Window.zoom_factors )
Append( i++, wxString::Format( _( "Zoom: %.2f" ), factor ), wxEmptyString, wxITEM_CHECK );
}
@@ -58,17 +53,30 @@ OPT_TOOL_EVENT ZOOM_MENU::eventHandler( const wxMenuEvent& aEvent )
}
void ZOOM_MENU::UpdateTitle()
{
SetTitle( _( "Zoom" ) );
}
void ZOOM_MENU::update()
{
Clear();
int ii = ID_POPUP_ZOOM_LEVEL_START + 1; // 0 reserved for menus which support auto-zoom
for( double factor : m_parent->config()->m_Window.zoom_factors )
Append( ii++, wxString::Format( _( "Zoom: %.2f" ), factor ), wxEmptyString, wxITEM_CHECK );
double zoom = m_parent->GetCanvas()->GetGAL()->GetZoomFactor();
const std::vector<double>& zoomList = m_parent->config()->m_Window.zoom_factors;
for( size_t i = 0; i < zoomList.size(); ++i )
for( size_t jj = 0; jj < zoomList.size(); ++jj )
{
// Search for a value near the current zoom setting:
double rel_error = std::fabs( zoomList[i] - zoom ) / zoom;
double rel_error = std::fabs( zoomList[jj] - zoom ) / zoom;
// IDs start with 1 (leaving 0 for auto-zoom)
Check( ID_POPUP_ZOOM_LEVEL_START + i + 1, rel_error < 0.1 );
Check( ID_POPUP_ZOOM_LEVEL_START + jj + 1, rel_error < 0.1 );
}
}
+25 -17
View File
@@ -36,6 +36,7 @@
#include <trace_helpers.h>
#include <settings/common_settings.h>
#include <math/util.h> // for KiROUND
#include <geometry/geometry_utils.h>
#include <widgets/ui_common.h>
#include <class_draw_panel_gal.h>
#include <kiplatform/ui.h>
@@ -300,7 +301,7 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent )
}
if( m_updateCursor ) // do not update the cursor position if it was explicitly set
m_cursorPos = m_view->ToWorld( mousePos );
m_cursorPos = GetClampedCoords( m_view->ToWorld( mousePos ) );
else
m_updateCursor = true;
@@ -458,8 +459,8 @@ void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent )
return;
}
#if defined( _WIN32 )
// Win32 transmits mouse move and wheel events to all controls below the mouse regardless
#if defined( _WIN32 ) || defined( __WXGTK__ )
// Win32 and some *nix WMs transmit mouse move and wheel events to all controls below the mouse regardless
// of focus. Forcing the focus here will cause the EDA FRAMES to immediately become the
// top level active window.
if( m_parentPanel->GetParent() != nullptr )
@@ -648,7 +649,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetMousePosition( bool aWorldCoordinates ) const
wxPoint msp = getMouseScreenPosition();
VECTOR2D screenPos( msp.x, msp.y );
return aWorldCoordinates ? m_view->ToWorld( screenPos ) : screenPos;
return aWorldCoordinates ? GetClampedCoords( m_view->ToWorld( screenPos ) ) : screenPos;
}
@@ -675,7 +676,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition( bool aEnableSnapping ) const
}
else
{
return GetRawCursorPosition( aEnableSnapping );
return GetClampedCoords( GetRawCursorPosition( aEnableSnapping ) );
}
}
@@ -685,10 +686,12 @@ void WX_VIEW_CONTROLS::SetCursorPosition( const VECTOR2D& aPosition, bool aWarpV
{
m_updateCursor = false;
VECTOR2D clampedPosition = GetClampedCoords( aPosition );
if( aTriggeredByArrows )
{
m_settings.m_lastKeyboardCursorPositionValid = true;
m_settings.m_lastKeyboardCursorPosition = aPosition;
m_settings.m_lastKeyboardCursorPosition = clampedPosition;
m_settings.m_lastKeyboardCursorCommand = aArrowCommand;
m_cursorWarped = false;
}
@@ -700,8 +703,8 @@ void WX_VIEW_CONTROLS::SetCursorPosition( const VECTOR2D& aPosition, bool aWarpV
m_cursorWarped = true;
}
WarpCursor( aPosition, true, aWarpView );
m_cursorPos = aPosition;
WarpCursor( clampedPosition, true, aWarpView );
m_cursorPos = clampedPosition;
}
@@ -710,14 +713,16 @@ void WX_VIEW_CONTROLS::SetCrossHairCursorPosition( const VECTOR2D& aPosition,
{
m_updateCursor = false;
VECTOR2D clampedPosition = GetClampedCoords( aPosition );
const VECTOR2I& screenSize = m_view->GetGAL()->GetScreenPixelSize();
BOX2I screen( VECTOR2I( 0, 0 ), screenSize );
VECTOR2D screenPos = m_view->ToScreen( aPosition );
BOX2I screen( VECTOR2I( 0, 0 ), screenSize );
VECTOR2D screenPos = m_view->ToScreen( clampedPosition );
if( aWarpView && !screen.Contains( screenPos ) )
m_view->SetCenter( aPosition );
m_view->SetCenter( clampedPosition );
m_cursorPos = aPosition;
m_cursorPos = clampedPosition;
}
@@ -727,14 +732,15 @@ void WX_VIEW_CONTROLS::WarpCursor( const VECTOR2D& aPosition, bool aWorldCoordin
if( aWorldCoordinates )
{
const VECTOR2I& screenSize = m_view->GetGAL()->GetScreenPixelSize();
BOX2I screen( VECTOR2I( 0, 0 ), screenSize );
VECTOR2D screenPos = m_view->ToScreen( aPosition );
BOX2I screen( VECTOR2I( 0, 0 ), screenSize );
VECTOR2D clampedPosition = GetClampedCoords( aPosition );
VECTOR2D screenPos = m_view->ToScreen( clampedPosition );
if( !screen.Contains( screenPos ) )
{
if( aWarpView )
{
m_view->SetCenter( aPosition );
m_view->SetCenter( clampedPosition );
m_parentPanel->WarpPointer( screenSize.x / 2, screenSize.y / 2 );
}
}
@@ -889,7 +895,7 @@ void WX_VIEW_CONTROLS::refreshMouse()
moveEvent.SetShiftDown( wxGetKeyState( WXK_SHIFT ) );
moveEvent.SetAltDown( wxGetKeyState( WXK_ALT ) );
m_cursorPos = m_view->ToWorld( VECTOR2D( msp.x, msp.y ) );
m_cursorPos = GetClampedCoords( m_view->ToWorld( VECTOR2D( msp.x, msp.y ) ) );
wxPostEvent( m_parentPanel, moveEvent );
}
@@ -943,6 +949,8 @@ void WX_VIEW_CONTROLS::UpdateScrollbars()
void WX_VIEW_CONTROLS::ForceCursorPosition( bool aEnabled, const VECTOR2D& aPosition )
{
VECTOR2D clampedPosition = GetClampedCoords( aPosition );
m_settings.m_forceCursorPosition = aEnabled;
m_settings.m_forcedPosition = aPosition;
m_settings.m_forcedPosition = clampedPosition;
}
+17 -7
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
* @author Jon Evans <jon@craftyjon.com>
*
* This program is free software; you can redistribute it and/or
@@ -26,6 +26,7 @@
#include <wx/sizer.h>
#include <wx/statbmp.h>
#include <wx/timer.h>
wxDEFINE_EVENT( TOGGLE_CHANGED, wxCommandEvent );
@@ -35,7 +36,8 @@ BITMAP_TOGGLE::BITMAP_TOGGLE( wxWindow *aParent, wxWindowID aId, const wxBitmap&
wxPanel( aParent, aId ),
m_checked( aChecked ),
m_unchecked_bitmap( aUncheckedBitmap ),
m_checked_bitmap( aCheckedBitmap )
m_checked_bitmap( aCheckedBitmap ),
m_debounce( 0 )
{
wxBoxSizer* sizer = new wxBoxSizer( wxHORIZONTAL );
SetSizer( sizer );
@@ -47,13 +49,21 @@ BITMAP_TOGGLE::BITMAP_TOGGLE( wxWindow *aParent, wxWindowID aId, const wxBitmap&
sizer->Add( m_bitmap, 0, 0 );
m_bitmap->Bind( wxEVT_LEFT_UP,
[&]( wxMouseEvent& )
[&]( wxMouseEvent& event )
{
wxLongLong now = wxGetLocalTimeMillis();
if( now - m_debounce < 50 )
return;
else
m_debounce = now;
SetValue( !GetValue() );
wxCommandEvent event( TOGGLE_CHANGED );
event.SetInt( m_checked );
event.SetEventObject( this );
wxPostEvent( this, event );
wxCommandEvent command( TOGGLE_CHANGED );
command.SetInt( m_checked );
command.SetEventObject( this );
wxPostEvent( this, command );
} );
auto passOnEvent =
+15 -6
View File
@@ -59,10 +59,17 @@ wxString GRID_CELL_TEXT_BUTTON::GetValue() const
void GRID_CELL_TEXT_BUTTON::SetSize( const wxRect& aRect )
{
wxRect rect( aRect );
rect.Inflate( -1 );
#if defined( __WXMAC__ )
rect.Inflate( 3 ); // no FOCUS_RING, even on Mac
rect.Inflate( 2 ); // ignore FOCUS_RING
#elif defined( __WXGTK__ )
rect.Inflate( -3 ); // The -3 is a very sad hack here. Some GTK themes overrun the
// default -1, preventing display. Unfortunately, we don't appear to
// have a good method of finding the current margin needed.
// Some GTK resize events seem to update the cell size but not all and
// not consistently.
#else
rect.Inflate( -1 );
#endif
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
@@ -291,10 +298,11 @@ void GRID_CELL_FOOTPRINT_ID_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
class TEXT_BUTTON_URL : public wxComboCtrl
{
public:
TEXT_BUTTON_URL( wxWindow* aParent, DIALOG_SHIM* aParentDlg ) :
TEXT_BUTTON_URL( wxWindow* aParent, DIALOG_SHIM* aParentDlg, SEARCH_STACK* aSearchStack ) :
wxComboCtrl( aParent, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER ),
m_dlg( aParentDlg )
m_dlg( aParentDlg ),
m_searchStack( aSearchStack )
{
SetButtonBitmaps( KiBitmap( BITMAPS::www ) );
@@ -313,17 +321,18 @@ protected:
wxString filename = GetValue();
if( !filename.IsEmpty() && filename != wxT( "~" ) )
GetAssociatedDocument( m_dlg, GetValue(), &m_dlg->Prj() );
GetAssociatedDocument( m_dlg, GetValue(), &m_dlg->Prj(), m_searchStack );
}
DIALOG_SHIM* m_dlg;
SEARCH_STACK* m_searchStack;
};
void GRID_CELL_URL_EDITOR::Create( wxWindow* aParent, wxWindowID aId,
wxEvtHandler* aEventHandler )
{
m_control = new TEXT_BUTTON_URL( aParent, m_dlg );
m_control = new TEXT_BUTTON_URL( aParent, m_dlg, m_searchStack );
#if wxUSE_VALIDATORS
// validate text in textctrl, if validator is set
+1 -1
View File
@@ -63,7 +63,7 @@ EDA_MSG_PANEL::~EDA_MSG_PANEL()
int EDA_MSG_PANEL::GetRequiredHeight( wxWindow* aWindow )
{
wxSize fontSizeInPixels;
wxScreenDC dc;
wxWindowDC dc( aWindow );
dc.SetFont( KIUI::GetControlFont( aWindow ) );
dc.GetTextExtent( wxT( "W" ), &fontSizeInPixels.x, &fontSizeInPixels.y );
+6 -1
View File
@@ -335,7 +335,12 @@ protected:
}
}
std::sort( netNames.begin(), netNames.end() );
std::sort( netNames.begin(), netNames.end(),
[]( const wxString& lhs, const wxString& rhs )
{
return StrNumCmp( lhs, rhs, true /* ignore case */ ) < 0;
} );
// Special handling for <no net>
if( filter.IsEmpty() || wxString( NO_NET ).MakeLower().Matches( filter ) )
+2 -2
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 CERN
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
*
@@ -121,7 +121,7 @@ bool PROGRESS_REPORTER_BASE::KeepRefreshing( bool aWait )
return false;
}
wxMilliSleep( 20 );
wxMilliSleep( 33 /* 30 FPS refresh rate */ );
}
return true;
+1 -1
View File
@@ -250,7 +250,7 @@ bool UNIT_BINDER::Validate( double aMin, double aMax, EDA_UNITS aUnits )
}
void UNIT_BINDER::SetValue( int aValue )
void UNIT_BINDER::SetValue( long long int aValue )
{
double value = aValue;
double displayValue = m_originTransforms.ToDisplay( value, m_coordType );
+21
View File
@@ -40,6 +40,11 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS
// Make sure the GUI font scales properly on GTK
SetDefaultCellFont( KIUI::GetControlFont( this ) );
#if wxCHECK_VERSION( 3, 1, 0 )
Connect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
#endif
}
@@ -47,9 +52,25 @@ WX_GRID::~WX_GRID()
{
if( m_weOwnTable )
DestroyTable( GetTable() );
#if wxCHECK_VERSION( 3, 1, 0 )
Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
#endif
}
#if wxCHECK_VERSION( 3, 1, 0 )
void WX_GRID::onDPIChanged(wxDPIChangedEvent& aEvt)
{
/// This terrible hack is a way to avoid the incredibly disruptive resizing of grids that happens on Macs
/// when moving a window between monitors of different DPIs.
#ifndef __WXMAC__
aEvt.Skip();
#endif
}
#endif
void WX_GRID::SetColLabelSize( int aHeight )
{
if( aHeight == 0 )
+6 -4
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* 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
@@ -94,7 +94,10 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList,
{
fn = wxExpandEnvVars( equfile );
tmp = search.FindValidPath( fn.GetFullPath() );
if( fn.IsAbsolute() || fn.FileExists() )
tmp = fn.GetFullPath();
else
tmp = search.FindValidPath( fn.GetFullPath() );
if( !tmp )
{
@@ -102,8 +105,7 @@ int CVPCB_MAINFRAME::buildEquivalenceList( FOOTPRINT_EQUIVALENCE_LIST& aList,
if( aErrorMessages )
{
error_msg.Printf( _( "Equivalence file '%s' could not be found in the "
"default search paths." ),
error_msg.Printf( _( "Equivalence file '%s' could not be found." ),
fn.GetFullName() );
if( ! aErrorMessages->IsEmpty() )
+6 -5
View File
@@ -276,9 +276,10 @@ void CVPCB_MAINFRAME::setupUIConditions()
#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
#define CHECK( x ) ACTION_CONDITIONS().Check( x )
mgr->SetConditions( CVPCB_ACTIONS::saveAssociations, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
mgr->SetConditions( CVPCB_ACTIONS::saveAssociationsToSchematic, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( CVPCB_ACTIONS::saveAssociationsToFile, ENABLE( cond.ContentModified() ) );
mgr->SetConditions( ACTIONS::undo, ENABLE( cond.UndoAvailable() ) );
mgr->SetConditions( ACTIONS::redo, ENABLE( cond.RedoAvailable() ) );
auto compFilter =
[this] ( const SELECTION& )
@@ -327,7 +328,7 @@ void CVPCB_MAINFRAME::setupEventHandlers()
[this]( wxCommandEvent& )
{
// saveAssociations must be run immediately
GetToolManager()->RunAction( CVPCB_ACTIONS::saveAssociations, true );
GetToolManager()->RunAction( CVPCB_ACTIONS::saveAssociationsToFile, true );
} );
// Connect the handlers for the ok/cancel buttons
@@ -335,7 +336,7 @@ void CVPCB_MAINFRAME::setupEventHandlers()
[this]( wxCommandEvent& )
{
// saveAssociations must be run immediately, before running Close( true )
GetToolManager()->RunAction( CVPCB_ACTIONS::saveAssociations, true );
GetToolManager()->RunAction( CVPCB_ACTIONS::saveAssociationsToSchematic, true );
Close( true );
}, wxID_OK );
Bind( wxEVT_BUTTON,
+1 -1
View File
@@ -46,7 +46,7 @@ void CVPCB_MAINFRAME::ReCreateMenuBar()
//
ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
fileMenu->Add( CVPCB_ACTIONS::saveAssociations );
fileMenu->Add( CVPCB_ACTIONS::saveAssociationsToSchematic );
fileMenu->AppendSeparator();
fileMenu->AddClose( _( "Assign Footprints" ) );
+1 -1
View File
@@ -46,7 +46,7 @@ void CVPCB_MAINFRAME::ReCreateHToolbar()
m_mainToolBar->SetAuiManager( &m_auimgr );
}
m_mainToolBar->Add( CVPCB_ACTIONS::saveAssociations );
m_mainToolBar->Add( CVPCB_ACTIONS::saveAssociationsToSchematic );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( ACTIONS::showFootprintLibTable );
+8 -1
View File
@@ -61,13 +61,20 @@ TOOL_ACTION CVPCB_ACTIONS::showEquFileTable( "cvpcb.Control.ShowEquFileTable",
_( "Configure footprint association file (.equ) list. These files are "
"used to automatically assign footprint names from symbol values." ) );
TOOL_ACTION CVPCB_ACTIONS::saveAssociations( "cvpcb.Control.SaveAssociations",
TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToSchematic( "cvpcb.Control.SaveAssociationsToSchematic",
AS_GLOBAL,
MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
_( "Save to Schematic" ),
_( "Save footprint associations in schematic symbol footprint fields" ),
BITMAPS::save );
TOOL_ACTION CVPCB_ACTIONS::saveAssociationsToFile( "cvpcb.Control.SaveAssociationsToFile",
AS_GLOBAL,
MD_CTRL + 'S', LEGACY_HK_NAME( "Save" ),
_( "Save to Schematic and File" ),
_( "Save footprint associations in schematic symbol footprint fields and schematic files" ),
BITMAPS::save );
// Actions to navigate the display
TOOL_ACTION CVPCB_ACTIONS::changeFocusRight( "cvpcb.Control.changeFocusRight",
AS_GLOBAL,
+2 -1
View File
@@ -53,7 +53,8 @@ public:
static TOOL_ACTION gotoNextNA;
/// Management actions
static TOOL_ACTION saveAssociations;
static TOOL_ACTION saveAssociationsToSchematic;
static TOOL_ACTION saveAssociationsToFile;
static TOOL_ACTION showEquFileTable;
/// Footprint Association actions
+36 -20
View File
@@ -167,6 +167,9 @@ int CVPCB_CONTROL::ShowFootprintViewer( const TOOL_EVENT& aEvent )
}
else
{
if( wxWindow* blocking_win = fpframe->Kiway().GetBlockingDialog() )
blocking_win->Close( true );
if( fpframe->IsIconized() )
fpframe->Iconize( false );
@@ -210,13 +213,20 @@ int CVPCB_CONTROL::ShowEquFileTable( const TOOL_EVENT& aEvent )
}
int CVPCB_CONTROL::SaveAssociations( const TOOL_EVENT& aEvent )
int CVPCB_CONTROL::SaveAssociationsToFile( const TOOL_EVENT& aEvent )
{
m_frame->SaveFootprintAssociation( true );
return 0;
}
int CVPCB_CONTROL::SaveAssociationsToSchematic( const TOOL_EVENT& aEvent )
{
m_frame->SaveFootprintAssociation( false );
return 0;
}
int CVPCB_CONTROL::ToNA( const TOOL_EVENT& aEvent )
{
int tmp = aEvent.Parameter<intptr_t>();
@@ -231,8 +241,9 @@ int CVPCB_CONTROL::ToNA( const TOOL_EVENT& aEvent )
return 0;
// Extract the current selection
unsigned int curSel = -1;
unsigned int newSel = -1;
bool changeSel = false;
unsigned int newSel = UINT_MAX;
switch( dir )
{
case CVPCB_MAINFRAME::ITEM_NEXT:
@@ -240,11 +251,12 @@ int CVPCB_CONTROL::ToNA( const TOOL_EVENT& aEvent )
newSel = tempSel.front();
// Find the next index in the component list
for( unsigned int i : naComp )
for( unsigned int idx : naComp )
{
if( i > newSel )
if( idx > newSel )
{
newSel = i;
changeSel = true;
newSel = idx;
break;
}
}
@@ -255,7 +267,19 @@ int CVPCB_CONTROL::ToNA( const TOOL_EVENT& aEvent )
if( !tempSel.empty() )
{
newSel = tempSel.front();
curSel = newSel - 1; // Break one before the current selection
// Find the previous index in the component list
for( int jj = naComp.size()-1; jj >= 0; jj-- )
{
unsigned idx = naComp[jj];
if( idx < newSel )
{
changeSel = true;
newSel = idx;
break;
}
}
}
break;
@@ -264,18 +288,9 @@ int CVPCB_CONTROL::ToNA( const TOOL_EVENT& aEvent )
wxASSERT_MSG( false, wxT( "Invalid direction" ) );
}
// Find the next index in the component list
for( unsigned int i : naComp )
{
if( i >= curSel )
{
newSel = i;
break;
}
}
// Set the component selection
m_frame->SetSelectedComponent( newSel );
// Set the new component selection
if( changeSel )
m_frame->SetSelectedComponent( newSel );
return 0;
}
@@ -310,7 +325,8 @@ void CVPCB_CONTROL::setTransitions()
// Management actions
Go( &CVPCB_CONTROL::ShowEquFileTable, CVPCB_ACTIONS::showEquFileTable.MakeEvent() );
Go( &CVPCB_CONTROL::SaveAssociations, CVPCB_ACTIONS::saveAssociations.MakeEvent() );
Go( &CVPCB_CONTROL::SaveAssociationsToSchematic, CVPCB_ACTIONS::saveAssociationsToSchematic.MakeEvent() );
Go( &CVPCB_CONTROL::SaveAssociationsToFile,CVPCB_ACTIONS::saveAssociationsToFile.MakeEvent() );
// Navigation actions
Go( &CVPCB_CONTROL::ToNA, CVPCB_ACTIONS::gotoNextNA.MakeEvent() );
+8 -1
View File
@@ -75,7 +75,14 @@ public:
*
* @param aEvent is the event generated by the tool framework
*/
int SaveAssociations( const TOOL_EVENT& aEvent );
int SaveAssociationsToSchematic( const TOOL_EVENT& aEvent );
/**
* Save the associations to the schematic and save schematic to file.
*
* @param aEvent is the event generated by the tool framework
*/
int SaveAssociationsToFile( const TOOL_EVENT& aEvent );
/**
* Create or Update the frame showing the current highlighted footprint
+1 -1
View File
@@ -175,7 +175,7 @@ set( EESCHEMA_SRCS
fields_grid_table.cpp
files-io.cpp
generate_alias_info.cpp
getpart.cpp
picksymbol.cpp
hierarch.cpp
lib_shape.cpp
lib_item.cpp
+1 -4
View File
@@ -49,10 +49,7 @@ void SCH_EDIT_FRAME::mapExistingAnnotation( std::map<wxString, wxString>& aMap )
curr_full_uuid.push_back( symbol->m_Uuid );
wxString ref = symbol->GetRef( curr_sheetpath );
if( symbol->GetUnitCount() > 1 )
ref << LIB_SYMBOL::SubReference( symbol->GetUnitSelection( curr_sheetpath ) );
wxString ref = symbol->GetRef( curr_sheetpath, true );
if( symbol->IsAnnotated( curr_sheetpath ) )
aMap[ curr_full_uuid.AsString() ] = ref;
+23 -11
View File
@@ -144,14 +144,14 @@ public:
*/
void DoAutoplace( bool aManual )
{
bool force_wire_spacing = false;
bool forceWireSpacing = false;
SIDE_AND_NPINS sideandpins = chooseSideForFields( aManual );
SIDE field_side = sideandpins.side;
wxPoint fbox_pos = fieldBoxPlacement( sideandpins );
EDA_RECT field_box( fbox_pos, m_fbox_size );
if( aManual )
force_wire_spacing = fitFieldsBetweenWires( &field_box, field_side );
forceWireSpacing = fitFieldsBetweenWires( &field_box, field_side );
// Move the fields
int last_y_coord = field_box.GetTop();
@@ -160,6 +160,9 @@ public:
{
SCH_FIELD* field = m_fields[field_idx];
if( !field->IsVisible() )
continue;
if( m_allow_rejustify )
{
if( sideandpins.pins > 0 )
@@ -175,8 +178,8 @@ public:
}
}
wxPoint pos( fieldHorizPlacement( field, field_box ),
fieldVertPlacement( field, field_box, &last_y_coord, !force_wire_spacing ) );
wxPoint pos( fieldHPlacement( field, field_box ),
fieldVPlacement( field, field_box, &last_y_coord, !forceWireSpacing ) );
if( m_align_to_grid )
{
@@ -201,7 +204,15 @@ protected:
int max_field_width = 0;
int total_height = 0;
std::vector<SCH_FIELD*> visibleFields;
for( SCH_FIELD* field : m_fields )
{
if( field->IsVisible() )
visibleFields.push_back( field );
}
for( SCH_FIELD* field : visibleFields )
{
if( m_symbol->GetTransform().y1 )
field->SetTextAngle( TEXT_ANGLE_VERT );
@@ -215,7 +226,7 @@ protected:
max_field_width = std::max( max_field_width, field_width );
// Remove interline spacing from field_height for last line.
if( field == m_fields[ m_fields.size() - 1 ] )
if( field == visibleFields.back() )
field_height *= 0.62;
if( !aDynamic )
@@ -322,6 +333,7 @@ protected:
if( item_box.Intersects( aRect ) )
filtered.push_back( item );
}
return filtered;
}
@@ -642,7 +654,7 @@ protected:
*
* @return Correct field horizontal position
*/
int fieldHorizPlacement( SCH_FIELD *aField, const EDA_RECT &aFieldBox )
int fieldHPlacement( SCH_FIELD *aField, const EDA_RECT &aFieldBox )
{
int field_hjust;
int field_xcoord;
@@ -677,13 +689,13 @@ protected:
*
* @param aField - the field to place.
* @param aFieldBox - box in which fields will be placed.
* @param aPosAccum - pointer to a position accumulator
* @param aAccumulatedPosition - pointer to a position accumulator
* @param aDynamic - use dynamic spacing
*
* @return Correct field vertical position
*/
int fieldVertPlacement( SCH_FIELD *aField, const EDA_RECT &aFieldBox, int *aPosAccum,
bool aDynamic )
int fieldVPlacement( SCH_FIELD *aField, const EDA_RECT &aFieldBox, int *aAccumulatedPosition,
bool aDynamic )
{
int field_height;
int padding;
@@ -704,9 +716,9 @@ protected:
padding = FIELD_PADDING;
}
int placement = *aPosAccum + padding / 2 + field_height / 2;
int placement = *aAccumulatedPosition + padding / 2 + field_height / 2;
*aPosAccum += padding + field_height;
*aAccumulatedPosition += padding + field_height;
return placement;
}
+257 -152
View File
@@ -366,6 +366,9 @@ void CONNECTION_SUBGRAPH::UpdateItemConnections()
{
SCH_CONNECTION* item_conn = item->GetOrInitConnection( m_sheet, m_graph );
if( !item_conn )
continue;
if( ( m_driver_connection->IsBus() && item_conn->IsNet() ) ||
( m_driver_connection->IsNet() && item_conn->IsBus() ) )
{
@@ -585,142 +588,147 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet,
// Pre-scan to see if we have a bus at this location
SCH_LINE* busLine = aSheet.LastScreen()->GetBus( it.first );
for( auto primary_it = connection_vec.begin(); primary_it != connection_vec.end(); primary_it++ )
// We don't want to spin up a new thread for fewer than 4 items (overhead costs)
size_t parallelThreadCount = std::min<size_t>( std::thread::hardware_concurrency(),
( connection_vec.size() + 3 ) / 4 );
std::atomic<size_t> nextItem( 0 );
std::mutex update_mutex;
std::vector<std::future<size_t>> returns( parallelThreadCount );
auto update_lambda = [&]() -> size_t
{
SCH_ITEM* connected_item = *primary_it;
// Bus entries are special: they can have connection points in the
// middle of a wire segment, because the junction algo doesn't split
// the segment in two where you place a bus entry. This means that
// bus entries that don't land on the end of a line segment need to
// have "virtual" connection points to the segments they graphically
// touch.
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
for( size_t ii = nextItem++; ii < connection_vec.size(); ii = nextItem++ )
{
// If this location only has the connection point of the bus
// entry itself, this means that either the bus entry is not
// connected to anything graphically, or that it is connected to
// a segment at some point other than at one of the endpoints.
if( connection_vec.size() == 1 )
{
if( busLine )
{
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
bus_entry->m_connected_bus_item = busLine;
}
}
}
// Bus-to-bus entries are treated just like bus wires
else if( connected_item->Type() == SCH_BUS_BUS_ENTRY_T )
{
if( connection_vec.size() < 2 )
{
if( busLine )
{
auto bus_entry = static_cast<SCH_BUS_BUS_ENTRY*>( connected_item );
if( it.first == bus_entry->GetPosition() )
bus_entry->m_connected_bus_items[0] = busLine;
else
bus_entry->m_connected_bus_items[1] = busLine;
bus_entry->ConnectedItems( aSheet ).insert( busLine );
busLine->ConnectedItems( aSheet ).insert( bus_entry );
}
}
}
// Change junctions to be on bus junction layer if they are touching a bus
else if( connected_item->Type() == SCH_JUNCTION_T )
{
connected_item->SetLayer( busLine ? LAYER_BUS_JUNCTION : LAYER_JUNCTION );
}
for( auto test_it = primary_it + 1; test_it != connection_vec.end(); test_it++ )
{
bool bus_connection_ok = true;
SCH_ITEM* test_item = *test_it;
wxASSERT( test_item != connected_item );
// Set up the link between the bus entry net and the bus
SCH_ITEM* connected_item = connection_vec[ii];
// Bus entries are special: they can have connection points in the
// middle of a wire segment, because the junction algo doesn't split
// the segment in two where you place a bus entry. This means that
// bus entries that don't land on the end of a line segment need to
// have "virtual" connection points to the segments they graphically
// touch.
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
if( test_item->GetLayer() == LAYER_BUS )
// If this location only has the connection point of the bus
// entry itself, this means that either the bus entry is not
// connected to anything graphically, or that it is connected to
// a segment at some point other than at one of the endpoints.
if( connection_vec.size() == 1 )
{
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
bus_entry->m_connected_bus_item = test_item;
if( busLine )
{
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
bus_entry->m_connected_bus_item = busLine;
}
}
}
// Bus entries only connect to bus lines on the end that is touching a bus line.
// If the user has overlapped another net line with the endpoint of the bus entry
// where the entry connects to a bus, we don't want to short-circuit it.
// Bus-to-bus entries are treated just like bus wires
else if( connected_item->Type() == SCH_BUS_BUS_ENTRY_T )
{
if( connection_vec.size() < 2 )
{
if( busLine )
{
auto bus_entry = static_cast<SCH_BUS_BUS_ENTRY*>( connected_item );
if( it.first == bus_entry->GetPosition() )
bus_entry->m_connected_bus_items[0] = busLine;
else
bus_entry->m_connected_bus_items[1] = busLine;
std::lock_guard<std::mutex> lock( update_mutex );
bus_entry->AddConnectionTo( aSheet, busLine );
busLine->AddConnectionTo( aSheet, bus_entry );
}
}
}
// Change junctions to be on bus junction layer if they are touching a bus
else if( connected_item->Type() == SCH_JUNCTION_T )
{
connected_item->SetLayer( busLine ? LAYER_BUS_JUNCTION : LAYER_JUNCTION );
}
SCH_ITEM_SET& connected_set = connected_item->ConnectedItems( aSheet );
connected_set.reserve( connection_vec.size() );
for( SCH_ITEM* test_item : connection_vec )
{
bool bus_connection_ok = true;
if( test_item == connected_item )
continue;
// Set up the link between the bus entry net and the bus
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
if( test_item->GetLayer() == LAYER_BUS )
{
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
bus_entry->m_connected_bus_item = test_item;
}
}
// Bus entries only connect to bus lines on the end that is touching a bus line.
// If the user has overlapped another net line with the endpoint of the bus entry
// where the entry connects to a bus, we don't want to short-circuit it.
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
bus_connection_ok = !busLine || test_item->GetLayer() == LAYER_BUS;
}
else if( test_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
bus_connection_ok = !busLine || connected_item->GetLayer() == LAYER_BUS;
}
if( connected_item->ConnectionPropagatesTo( test_item ) &&
test_item->ConnectionPropagatesTo( connected_item ) &&
bus_connection_ok )
{
connected_set.push_back( test_item );
}
}
// If we got this far and did not find a connected bus item for a bus entry,
// we should do a manual scan in case there is a bus item on this connection
// point but we didn't pick it up earlier because there is *also* a net item here.
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
bus_connection_ok = !busLine || test_item->GetLayer() == LAYER_BUS;
}
else if( test_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
bus_connection_ok = !busLine || connected_item->GetLayer() == LAYER_BUS;
}
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
if( connected_item->ConnectionPropagatesTo( test_item ) &&
test_item->ConnectionPropagatesTo( connected_item ) &&
bus_connection_ok )
{
connected_item->ConnectedItems( aSheet ).insert( test_item );
test_item->ConnectedItems( aSheet ).insert( connected_item );
if( !bus_entry->m_connected_bus_item )
{
SCH_SCREEN* screen = aSheet.LastScreen();
SCH_LINE* bus = screen->GetBus( it.first );
if( bus )
bus_entry->m_connected_bus_item = bus;
}
}
}
// If we got this far and did not find a connected bus item for a bus entry,
// we should do a manual scan in case there is a bus item on this connection
// point but we didn't pick it up earlier because there is *also* a net item here.
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
{
auto bus_entry = static_cast<SCH_BUS_WIRE_ENTRY*>( connected_item );
return 1;
};
if( !bus_entry->m_connected_bus_item )
{
SCH_SCREEN* screen = aSheet.LastScreen();
SCH_LINE* bus = screen->GetBus( it.first );
if( bus )
bus_entry->m_connected_bus_item = bus;
}
}
if( parallelThreadCount == 1 )
update_lambda();
else
{
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
returns[ii] = std::async( std::launch::async, update_lambda );
// Finalize the threads
for( size_t ii = 0; ii < parallelThreadCount; ++ii )
returns[ii].wait();
}
}
}
// TODO(JE) This won't give the same subgraph IDs (and eventually net/graph codes)
// to the same subgraph necessarily if it runs over and over again on the same
// sheet. We need:
//
// a) a cache of net/bus codes, like used before
// b) to persist the CONNECTION_GRAPH globally so the cache is persistent,
// c) some way of trying to avoid changing net names. so we should keep track
// of the previous driver of a net, and if it comes down to choosing between
// equally-prioritized drivers, choose the one that already exists as a driver
// on some portion of the items.
void CONNECTION_GRAPH::buildConnectionGraph()
void CONNECTION_GRAPH::buildItemSubGraphs()
{
// Recache all bus aliases for later use
wxCHECK_RET( m_schematic, wxT( "Connection graph cannot be built without schematic pointer" ) );
SCH_SHEET_LIST all_sheets = m_schematic->GetSheets();
for( unsigned i = 0; i < all_sheets.size(); i++ )
{
for( const auto& alias : all_sheets[i].LastScreen()->GetBusAliases() )
m_bus_alias_cache[ alias->GetName() ] = alias;
}
// Build subgraphs from items (on a per-sheet basis)
for( SCH_ITEM* item : m_items )
@@ -742,21 +750,25 @@ void CONNECTION_GRAPH::buildConnectionGraph()
connection->SetSubgraphCode( subgraph->m_code );
m_item_to_subgraph_map[item] = subgraph;
std::list<SCH_ITEM*> members;
std::list<SCH_ITEM*> memberlist;
auto get_items =
[&]( SCH_ITEM* aItem ) -> bool
{
SCH_CONNECTION* conn = aItem->GetOrInitConnection( sheet, this );
bool unique = !( aItem->GetFlags() & CANDIDATE );
return ( conn->SubgraphCode() == 0 );
if( conn && !conn->SubgraphCode() )
aItem->SetFlags( CANDIDATE );
return ( unique && conn && ( conn->SubgraphCode() == 0 ) );
};
std::copy_if( item->ConnectedItems( sheet ).begin(),
item->ConnectedItems( sheet ).end(),
std::back_inserter( members ), get_items );
std::back_inserter( memberlist ), get_items );
for( SCH_ITEM* connected_item : members )
for( SCH_ITEM* connected_item : memberlist )
{
if( connected_item->Type() == SCH_NO_CONNECT_T )
subgraph->m_no_connect = connected_item;
@@ -770,24 +782,32 @@ void CONNECTION_GRAPH::buildConnectionGraph()
connected_conn->SetSubgraphCode( subgraph->m_code );
m_item_to_subgraph_map[connected_item] = subgraph;
subgraph->AddItem( connected_item );
SCH_ITEM_SET& citemset = connected_item->ConnectedItems( sheet );
std::copy_if( connected_item->ConnectedItems( sheet ).begin(),
connected_item->ConnectedItems( sheet ).end(),
std::back_inserter( members ), get_items );
for( SCH_ITEM* citem : citemset )
{
if( citem->HasFlag( CANDIDATE ) )
continue;
if( get_items( citem ) )
memberlist.push_back( citem );
}
}
}
for( SCH_ITEM* connected_item : memberlist )
connected_item->ClearFlags( CANDIDATE );
subgraph->m_dirty = true;
m_subgraphs.push_back( subgraph );
}
}
}
/**
* TODO(JE): Net codes are non-deterministic. Fortunately, they are also not really used for
* anything. We should consider removing them entirely and just using net names everywhere.
*/
}
void CONNECTION_GRAPH::resolveAllDrivers()
{
// Resolve drivers for subgraphs and propagate connectivity info
// We don't want to spin up a new thread for fewer than 8 nets (overhead costs)
@@ -867,7 +887,11 @@ void CONNECTION_GRAPH::buildConnectionGraph()
{
return candidate->m_driver;
} );
}
void CONNECTION_GRAPH::collectAllDriverValues()
{
// Check for subgraphs with the same net name but only weak drivers.
// For example, two wires that are both connected to hierarchical
// sheet pins that happen to have the same name, but are not the same.
@@ -922,7 +946,11 @@ void CONNECTION_GRAPH::buildConnectionGraph()
}
}
}
}
void CONNECTION_GRAPH::generateInvisiblePinSubGraphs()
{
// Generate subgraphs for invisible power pins. These will be merged with other subgraphs
// on the same sheet in the next loop.
@@ -942,7 +970,7 @@ void CONNECTION_GRAPH::buildConnectionGraph()
SCH_CONNECTION* connection = pin->GetOrInitConnection( sheet, this );
// If this pin already has a subgraph, don't need to process
if( connection->SubgraphCode() > 0 )
if( !connection || connection->SubgraphCode() > 0 )
continue;
connection->SetName( pin->GetShownName() );
@@ -979,7 +1007,11 @@ void CONNECTION_GRAPH::buildConnectionGraph()
connection->SetSubgraphCode( subgraph->m_code );
}
}
void CONNECTION_GRAPH::processSubGraphs()
{
// Here we do all the local (sheet) processing of each subgraph, including assigning net
// codes, merging subgraphs together that use label connections, etc.
@@ -1306,6 +1338,58 @@ void CONNECTION_GRAPH::buildConnectionGraph()
subgraph->m_driver_connection->Name() );
}
}
// TODO(JE) This won't give the same subgraph IDs (and eventually net/graph codes)
// to the same subgraph necessarily if it runs over and over again on the same
// sheet. We need:
//
// a) a cache of net/bus codes, like used before
// b) to persist the CONNECTION_GRAPH globally so the cache is persistent,
// c) some way of trying to avoid changing net names. so we should keep track
// of the previous driver of a net, and if it comes down to choosing between
// equally-prioritized drivers, choose the one that already exists as a driver
// on some portion of the items.
void CONNECTION_GRAPH::buildConnectionGraph()
{
// Recache all bus aliases for later use
wxCHECK_RET( m_schematic, wxT( "Connection graph cannot be built without schematic pointer" ) );
SCH_SHEET_LIST all_sheets = m_schematic->GetSheets();
for( unsigned i = 0; i < all_sheets.size(); i++ )
{
for( const auto& alias : all_sheets[i].LastScreen()->GetBusAliases() )
m_bus_alias_cache[ alias->GetName() ] = alias;
}
PROF_TIMER sub_graph( "buildItemSubGraphs" );
buildItemSubGraphs();
if( wxLog::IsAllowedTraceMask( ConnProfileMask ) )
sub_graph.Show();
/**
* TODO(JE): Net codes are non-deterministic. Fortunately, they are also not really used for
* anything. We should consider removing them entirely and just using net names everywhere.
*/
resolveAllDrivers();
collectAllDriverValues();
generateInvisiblePinSubGraphs();
PROF_TIMER proc_sub_graph( "ProcessSubGraphs" );
processSubGraphs();
if( wxLog::IsAllowedTraceMask( ConnProfileMask ) )
proc_sub_graph.Show();
// Absorbed subgraphs should no longer be considered
alg::delete_if( m_driver_subgraphs, [&]( const CONNECTION_SUBGRAPH* candidate ) -> bool
{
@@ -1328,7 +1412,13 @@ void CONNECTION_GRAPH::buildConnectionGraph()
m_sheet_to_subgraphs_map[ subgraph->m_sheet ].emplace_back( subgraph );
// Update item connections at this point so that neighbor propagation works
nextSubgraph.store( 0 );
std::atomic<size_t> nextSubgraph( 0 );
// We don't want to spin up a new thread for fewer than 8 nets (overhead costs)
size_t parallelThreadCount = std::min<size_t>( std::thread::hardware_concurrency(),
( m_subgraphs.size() + 3 ) / 4 );
std::vector<std::future<size_t>> returns( parallelThreadCount );
auto preliminaryUpdateTask =
[&]() -> size_t
@@ -1901,7 +1991,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
// member to have the correct connection info
if( conn->IsBus() && !stale_bus_members.empty() )
{
for( auto stale_member : stale_bus_members )
for( SCH_CONNECTION* stale_member : stale_bus_members )
{
for( CONNECTION_SUBGRAPH* subgraph : visited )
{
@@ -1933,13 +2023,13 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph )
std::shared_ptr<SCH_CONNECTION> CONNECTION_GRAPH::getDefaultConnection( SCH_ITEM* aItem,
CONNECTION_SUBGRAPH* aSubgraph )
{
auto c = std::shared_ptr<SCH_CONNECTION>( nullptr );
std::shared_ptr<SCH_CONNECTION> c = std::shared_ptr<SCH_CONNECTION>( nullptr );
switch( aItem->Type() )
{
case SCH_PIN_T:
{
auto pin = static_cast<SCH_PIN*>( aItem );
SCH_PIN* pin = static_cast<SCH_PIN*>( aItem );
if( pin->IsPowerConnection() )
c = std::make_shared<SCH_CONNECTION>( aItem, aSubgraph->m_sheet );
@@ -1981,7 +2071,7 @@ SCH_CONNECTION* CONNECTION_GRAPH::matchBusMember( SCH_CONNECTION* aBusConnection
// Vector bus: compare against index, because we allow the name
// to be different
for( const auto& bus_member : aBusConnection->Members() )
for( const std::shared_ptr<SCH_CONNECTION>& bus_member : aBusConnection->Members() )
{
if( bus_member->VectorIndex() == aSearch->VectorIndex() )
{
@@ -1993,14 +2083,14 @@ SCH_CONNECTION* CONNECTION_GRAPH::matchBusMember( SCH_CONNECTION* aBusConnection
else
{
// Group bus
for( const auto& c : aBusConnection->Members() )
for( const std::shared_ptr<SCH_CONNECTION>& c : aBusConnection->Members() )
{
// Vector inside group: compare names, because for bus groups
// we expect the naming to be consistent across all usages
// TODO(JE) explain this in the docs
if( c->Type() == CONNECTION_TYPE::BUS )
{
for( const auto& bus_member : c->Members() )
for( const std::shared_ptr<SCH_CONNECTION>& bus_member : c->Members() )
{
if( bus_member->LocalName() == aSearch->LocalName() )
{
@@ -2051,7 +2141,7 @@ std::vector<const CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigrati
{
std::vector<const CONNECTION_SUBGRAPH*> ret;
for( auto&& subgraph : m_subgraphs )
for( CONNECTION_SUBGRAPH* subgraph : m_subgraphs )
{
// Graph is supposed to be up-to-date before calling this
wxASSERT( !subgraph->m_dirty );
@@ -2313,8 +2403,8 @@ bool CONNECTION_GRAPH::ercCheckMultipleDrivers( const CONNECTION_SUBGRAPH* aSubg
bool CONNECTION_GRAPH::ercCheckBusToNetConflicts( const CONNECTION_SUBGRAPH* aSubgraph )
{
auto sheet = aSubgraph->m_sheet;
auto screen = sheet.LastScreen();
const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet;
SCH_SCREEN* screen = sheet.LastScreen();
SCH_ITEM* net_item = nullptr;
SCH_ITEM* bus_item = nullptr;
@@ -2371,8 +2461,8 @@ bool CONNECTION_GRAPH::ercCheckBusToNetConflicts( const CONNECTION_SUBGRAPH* aSu
bool CONNECTION_GRAPH::ercCheckBusToBusConflicts( const CONNECTION_SUBGRAPH* aSubgraph )
{
wxString msg;
auto sheet = aSubgraph->m_sheet;
auto screen = sheet.LastScreen();
const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet;
SCH_SCREEN* screen = sheet.LastScreen();
SCH_ITEM* label = nullptr;
SCH_ITEM* port = nullptr;
@@ -2440,8 +2530,8 @@ bool CONNECTION_GRAPH::ercCheckBusToBusConflicts( const CONNECTION_SUBGRAPH* aSu
bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH* aSubgraph )
{
bool conflict = false;
auto sheet = aSubgraph->m_sheet;
auto screen = sheet.LastScreen();
const SCH_SHEET_PATH& sheet = aSubgraph->m_sheet;
SCH_SCREEN* screen = sheet.LastScreen();
SCH_BUS_WIRE_ENTRY* bus_entry = nullptr;
SCH_ITEM* bus_wire = nullptr;
@@ -2453,7 +2543,7 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH
return true;
}
for( auto item : aSubgraph->m_items )
for( SCH_ITEM* item : aSubgraph->m_items )
{
switch( item->Type() )
{
@@ -2509,7 +2599,9 @@ bool CONNECTION_GRAPH::ercCheckBusToBusEntryConflicts( const CONNECTION_SUBGRAPH
// or global label
if( conflict && CONNECTION_SUBGRAPH::GetDriverPriority( aSubgraph->m_driver )
>= CONNECTION_SUBGRAPH::PRIORITY::POWER_PIN )
{
conflict = false;
}
if( conflict )
{
@@ -2622,8 +2714,21 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
{
case SCH_PIN_T:
{
if( !pins.empty() )
has_other_connections = true;
// Stacked pins do not count as other connections but non-stacked pins do
if( !has_other_connections && !pins.empty() )
{
SCH_PIN* pin = static_cast<SCH_PIN*>( item );
for( SCH_PIN* other_pin : pins )
{
if( other_pin->GetParent() != pin->GetParent()
|| other_pin->GetPosition() != pin->GetPosition() )
{
has_other_connections = true;
break;
}
}
}
pins.emplace_back( static_cast<SCH_PIN*>( item ) );
@@ -2653,8 +2758,8 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
wxString name = pin->Connection( &sheet )->Name();
wxString local_name = pin->Connection( &sheet )->Name( true );
if( m_global_label_cache.count( name ) ||
( m_local_label_cache.count( std::make_pair( sheet, local_name ) ) ) )
if( m_global_label_cache.count( name )
|| m_local_label_cache.count( std::make_pair( sheet, local_name ) ) )
{
has_other_connections = true;
}
@@ -2787,7 +2892,7 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph )
return false;
};
for( auto item : aSubgraph->m_items )
for( SCH_ITEM* item : aSubgraph->m_items )
{
switch( item->Type() )
{
@@ -2837,9 +2942,9 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph )
if( isGlobal )
{
// This will be set to true if the global is connected to a pin above, but we
// want to reset this to false so that globals get flagged if they only have a
// single instance connected to a single pin
// This will be set to true if the global is connected to a pin above, but we want to
// reset this to false so that globals get flagged if they only have a single instance
// connected to a single pin
hasOtherConnections = ( pinCount > 1 );
auto it = m_net_name_to_subgraphs_map.find( name );
@@ -2853,9 +2958,9 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph )
else if( text->Type() == SCH_HIER_LABEL_T )
{
// For a hier label, check if the parent pin is connected
if( aSubgraph->m_hier_parent &&
( aSubgraph->m_hier_parent->m_strong_driver ||
aSubgraph->m_hier_parent->m_drivers.size() > 1) )
if( aSubgraph->m_hier_parent
&& ( aSubgraph->m_hier_parent->m_strong_driver
|| aSubgraph->m_hier_parent->m_drivers.size() > 1) )
{
// For now, a simple check: if there is more than one driver, the parent is probably
// connected elsewhere (because at least one driver will be the hier pin itself)
+27
View File
@@ -370,6 +370,33 @@ private:
*/
void buildConnectionGraph();
/**
* Generates individual item subgraphs on a per-sheet basis
*/
void buildItemSubGraphs();
/**
* Finds all subgraphs in the connection graph and calls ResolveDrivers() in
* parallel
*/
void resolveAllDrivers();
/**
* Maps the driver values for each subgraph
*/
void collectAllDriverValues();
/**
* Iterate through the invisible power pins to collect the global labels
* as drivers
*/
void generateInvisiblePinSubGraphs();
/**
* Process all subgraphs to assign netcodes and merge subgraphs based on labels
*/
void processSubGraphs();
/**
* Helper to assign a new net code to a connection
*
+4 -15
View File
@@ -379,7 +379,8 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
}
std::string FormatProbeItem( EDA_ITEM* aItem, SCH_SYMBOL* aSymbol )
std::string FormatProbeItem( const SCH_SHEET_PATH& aCurrentSheet, EDA_ITEM* aItem,
SCH_SYMBOL* aSymbol )
{
// This is a keyword followed by a quoted string.
@@ -403,20 +404,8 @@ std::string FormatProbeItem( EDA_ITEM* aItem, SCH_SYMBOL* aSymbol )
{
// For cross probing, we need the full path of the sheet, because
// in complex hierarchies the sheet uuid of not unique
SCH_SHEET* sheet = (SCH_SHEET*)aItem;
wxString full_path;
SCH_SHEET* parent = sheet;
while( (parent = dynamic_cast<SCH_SHEET*>( parent->GetParent() ) ) )
{
if( parent->GetParent() ) // The root sheet has no parent and path is just "/"
{
full_path.Prepend( parent->m_Uuid.AsString() );
full_path.Prepend( "/" );
}
}
full_path += "/" + sheet->m_Uuid.AsString();
wxString full_path = aCurrentSheet.PathAsString() + aItem->m_Uuid.AsString();
return StrPrintf( "$SHEET: \"%s\"", TO_UTF8( full_path ) );
}
@@ -454,7 +443,7 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_SYMBOL* a
if( !aObjectToSync )
return;
std::string packet = FormatProbeItem( aObjectToSync, aLibItem );
std::string packet = FormatProbeItem( GetCurrentSheet(), aObjectToSync, aLibItem );
if( !packet.empty() )
{
+1 -1
View File
@@ -396,7 +396,7 @@ void DIALOG_ERC::testErc()
|| settings.IsTestEnabled( ERCE_POWERPIN_NOT_DRIVEN )
|| settings.IsTestEnabled( ERCE_PIN_NOT_DRIVEN ) )
{
tester.TestPinToPin();
tester.TestPinToPin();
}
// Test similar labels (i;e. labels which are identical when
@@ -30,6 +30,7 @@
#include <sch_line.h>
#include <sch_junction.h>
#include <sch_sheet.h>
#include <sch_sheet_pin.h>
#include <schematic.h>
#include <advanced_config.h>
#include <tool/tool_manager.h>
@@ -412,6 +413,12 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe
if( m_setBgColor->GetValue() )
sheet->SetBackgroundColor( m_bgColorSwatch->GetSwatchColor() );
}
if( m_sheetPins->GetValue() )
{
for( SCH_SHEET_PIN* pin : sheet->GetPins() )
processItem( aSheetPath, pin );
}
}
else if( aItem->Type() == SCH_JUNCTION_T )
{
@@ -439,8 +446,6 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::visitItem( const SCH_SHEET_PATH& aShe
processItem( aSheetPath, aItem );
else if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
processItem( aSheetPath, aItem );
else if( m_sheetPins->GetValue() && aItem->Type() == SCH_SHEET_PIN_T )
processItem( aSheetPath, aItem );
else if( m_schTextAndGraphics->GetValue() && aItem->IsType( schTextAndGraphics ) )
processItem( aSheetPath, aItem );
}
@@ -283,7 +283,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_
fgSizer1->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 7 );
m_staticline4 = new wxStaticLine( m_specifiedValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizer1->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 7 );
fgSizer1->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxBOTTOM, 7 );
m_staticline5 = new wxStaticLine( m_specifiedValues, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
fgSizer1->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 7 );
@@ -2956,7 +2956,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">7</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property>
@@ -621,6 +621,7 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnAddRow( wxCommandEvent& event )
newPin->SetOrientation( last->GetOrientation() );
newPin->SetType( last->GetType() );
newPin->SetShape( last->GetShape() );
newPin->SetParent( last->GetParent() );
wxPoint pos = last->GetPosition();
@@ -75,10 +75,10 @@ bool DIALOG_LIB_SHAPE_PROPERTIES::TransferDataToWindow()
bool enblConvOptStyle = symbol && symbol->HasConversion();
// if a symbol contains no graphic items, symbol->HasConversion() returns false.
// but when creating a new symbol, with DeMorgan option set, the ApplyToAllConversions
// must be enabled even if symbol->HasConversion() returns false in order to be able
// to create graphic items shared by all body styles
// If a symbol contains no conversion-specific pins or graphic items, symbol->HasConversion()
// will return false.
// But when creating a new symbol, with DeMorgan option set, the ApplyToAllConversions
// must be enabled in order to be able to create graphic items shared by all body styles.
if( m_frame->GetShowDeMorgan() )
enblConvOptStyle = true;
@@ -72,7 +72,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a
m_grid->ShowHideColumns( cfg->m_EditSymbolVisibleColumns );
wxGridCellAttr* attr = new wxGridCellAttr;
attr->SetEditor( new GRID_CELL_URL_EDITOR( this ) );
attr->SetEditor( new GRID_CELL_URL_EDITOR( this, Prj().SchSearchS() ) );
m_grid->SetAttr( DATASHEET_FIELD, FDC_VALUE, attr );
m_SymbolNameCtrl->SetValidator( SCH_FIELD_VALIDATOR( true, VALUE_FIELD ) );
@@ -174,7 +174,13 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow()
m_SelNumberOfUnits->SetValue( m_libEntry->GetUnitCount() );
m_OptionPartsInterchangeable->SetValue( !m_libEntry->UnitsLocked() ||
m_libEntry->GetUnitCount() == 1 );
m_AsConvertButt->SetValue( m_libEntry->HasConversion() );
// If a symbol contains no conversion-specific pins or graphic items, symbol->HasConversion()
// will return false. But when editing a symbol with DeMorgan option set, we don't want to
// keep turning it off just because there aren't any conversion-specific items yet, so we force
// it to on if the parent frame has it enabled.
m_AsConvertButt->SetValue( m_Parent->GetShowDeMorgan() );
m_OptionPower->SetValue( m_libEntry->IsPower() );
m_excludeFromBomCheckBox->SetValue( !m_libEntry->GetIncludeInBom() );
m_excludeFromBoardCheckBox->SetValue( !m_libEntry->GetIncludeOnBoard() );
@@ -302,7 +308,7 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow()
return false;
// We need to keep the name and the value the same at the moment!
wxString newName = m_fields->at( VALUE_FIELD ).GetText();
wxString newName = EscapeString( m_fields->at( VALUE_FIELD ).GetText(), CTX_LIBID );
wxString oldName = m_libEntry->GetName();
if( oldName != newName )
@@ -367,6 +373,7 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow()
m_libEntry->LockUnits( m_libEntry->GetUnitCount() > 1 &&
!m_OptionPartsInterchangeable->GetValue() );
m_libEntry->SetConversion( m_AsConvertButt->GetValue() );
m_Parent->SetShowDeMorgan( m_AsConvertButt->GetValue() );
if( m_OptionPower->GetValue() )
m_libEntry->SetPower();
@@ -448,17 +455,26 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging( wxGridEvent& event )
void DIALOG_LIB_SYMBOL_PROPERTIES::OnSymbolNameText( wxCommandEvent& event )
{
if( !m_Parent->IsSymbolFromSchematic() )
if( !m_Parent->IsSymbolFromSchematic() || m_OptionPower->IsChecked() )
m_grid->SetCellValue( VALUE_FIELD, FDC_VALUE, m_SymbolNameCtrl->GetValue() );
}
void DIALOG_LIB_SYMBOL_PROPERTIES::OnSymbolNameKillFocus( wxFocusEvent& event )
{
if( !m_delayedFocusCtrl && !m_SymbolNameCtrl->GetValidator()->Validate( m_SymbolNameCtrl ) )
if( !m_delayedFocusCtrl )
{
// If the validation fails and we throw up a dialog then GTK will give us another
// KillFocus event and we end up in infinite recursion. So we use m_delayedFocusCtrl
// as a re-entrancy block and then clear it again if validation passes.
m_delayedFocusCtrl = m_SymbolNameCtrl;
m_delayedFocusPage = 0;
if( m_SymbolNameCtrl->GetValidator()->Validate( m_SymbolNameCtrl ) )
{
m_delayedFocusCtrl = nullptr;
m_delayedFocusPage = -1;
}
}
event.Skip();
@@ -593,7 +609,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnEditSpiceModel( wxCommandEvent& event )
{
#ifdef KICAD_SPICE
int diff = m_fields->size();
auto symbol = SCH_SYMBOL( *m_libEntry, m_libEntry->GetLibId(), nullptr );
auto symbol = SCH_SYMBOL( *m_libEntry, m_libEntry->GetLibId(), nullptr, 0 );
DIALOG_SPICE_MODEL dialog( this, symbol, m_fields );
+12 -23
View File
@@ -168,7 +168,6 @@ private:
public:
SCH_EDIT_FRAME* m_Parent;
wxString m_DefaultNetFmtName;
NETLIST_PAGE_DIALOG* m_PanelNetType[4 + CUSTOMPANEL_COUNTMAX];
};
@@ -217,11 +216,7 @@ NETLIST_PAGE_DIALOG::NETLIST_PAGE_DIALOG( wxNotebook* parent, const wxString& ti
m_TitleStringCtrl = nullptr;
m_AdjustPassiveValues = nullptr;
wxString netfmtName = static_cast<NETLIST_DIALOG*>( parent->GetParent() )->m_DefaultNetFmtName;
bool selected = m_pageNetFmtName == netfmtName;
parent->AddPage( this, title, selected );
parent->AddPage( this, title, false );
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( MainBoxSizer );
@@ -246,8 +241,6 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) :
SCHEMATIC_SETTINGS& settings = m_Parent->Schematic().Settings();
m_DefaultNetFmtName = settings.m_NetFormatName;
for( NETLIST_PAGE_DIALOG*& page : m_PanelNetType)
page = nullptr;
@@ -271,6 +264,15 @@ NETLIST_DIALOG::NETLIST_DIALOG( SCH_EDIT_FRAME* parent ) :
m_sdbSizer2OK->SetDefault();
for( int ii = 0; m_PanelNetType[ii] && ii < 4 + CUSTOMPANEL_COUNTMAX; ++ii )
{
if( m_PanelNetType[ii]->GetPageNetFmtName() == settings.m_NetFormatName )
{
m_NoteBook->ChangeSelection( ii );
break;
}
}
// Now all widgets have the size fixed, call FinishDialogSettings
finishDialogSettings();
}
@@ -416,8 +418,6 @@ void NETLIST_DIALOG::OnNetlistTypeSelection( wxNotebookEvent& event )
if( currPage == nullptr )
return;
m_DefaultNetFmtName = currPage->GetPageNetFmtName();
m_buttonDelGenerator->Enable( currPage->m_IdNetType >= NET_TYPE_CUSTOM1 );
}
@@ -431,8 +431,7 @@ void NETLIST_DIALOG::NetlistUpdateOpt()
settings.m_SpiceAdjustPassiveValues = adjust;
settings.m_SpiceCommandString = spice_cmd_string;
settings.m_NetFormatName = wxEmptyString;
settings.m_NetFormatName = m_DefaultNetFmtName;
settings.m_NetFormatName = m_PanelNetType[m_NoteBook->GetSelection()]->GetPageNetFmtName();
}
@@ -591,7 +590,6 @@ void NETLIST_DIALOG::OnDelGenerator( wxCommandEvent& event )
currPage->m_CommandStringCtrl->SetValue( wxEmptyString );
currPage->m_TitleStringCtrl->SetValue( wxEmptyString );
m_DefaultNetFmtName = m_PanelNetType[PANELPCBNEW]->GetPageNetFmtName();
WriteCurrentNetlistSetup();
@@ -718,17 +716,8 @@ int InvokeDialogNetList( SCH_EDIT_FRAME* aCaller )
{
NETLIST_DIALOG dlg( aCaller );
SCHEMATIC_SETTINGS& settings = aCaller->Schematic().Settings();
wxString curr_default_netformat = settings.m_NetFormatName;
int ret = dlg.ShowModal();
// Update the default netlist and store it in prj config if it was explicitly changed.
settings.m_NetFormatName = dlg.m_DefaultNetFmtName; // can have temporary changed
if( curr_default_netformat != dlg.m_DefaultNetFmtName )
aCaller->SaveProjectSettings();
aCaller->SaveProjectSettings();
return ret;
}
+10 -2
View File
@@ -802,7 +802,7 @@ void DIALOG_PLOT_SCHEMATIC::createPDFFile( bool aPlotAll, bool aPlotDrawingSheet
plotter->SetRenderSettings( aRenderSettings );
plotter->SetColorMode( getModeColor() );
plotter->SetCreator( wxT( "Eeschema-PDF" ) );
plotter->SetTitle( m_parent->GetTitleBlock().GetTitle() );
plotter->SetTitle( ExpandTextVars( m_parent->GetTitleBlock().GetTitle(), &m_parent->Prj() ) );
wxString msg;
wxFileName plotFileName;
@@ -1250,7 +1250,15 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath()
wxStandardPaths::Get().GetDocumentsDir() );
// Build the absolute path of current output directory to preselect it in the file browser.
wxString path = ExpandEnvVarSubstitutions( m_outputDirectoryName->GetValue(), &Prj() );
std::function<bool( wxString* )> textResolver =
[&]( wxString* token ) -> bool
{
return m_parent->Schematic().ResolveTextVar( token, 0 );
};
wxString path = m_outputDirectoryName->GetValue();
path = ExpandTextVars( path, &textResolver, nullptr, &Prj() );
path = ExpandEnvVarSubstitutions( path, &Prj() );
fn.SetPath( path );
@@ -171,6 +171,12 @@ bool DIALOG_PRINT_USING_PRINTER::TransferDataToWindow()
{
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
if( cfg->m_Printing.monochrome )
{
m_checkBackgroundColor->SetValue( false );
m_checkBackgroundColor->Enable( false );
}
m_checkReference->SetValue( cfg->m_Printing.title_block );
m_checkMonochrome->SetValue( cfg->m_Printing.monochrome );
m_checkBackgroundColor->SetValue( cfg->m_Printing.background );
@@ -246,7 +252,10 @@ void DIALOG_PRINT_USING_PRINTER::SavePrintOptions()
cfg->m_Printing.monochrome = m_checkMonochrome->IsChecked();
cfg->m_Printing.title_block = m_checkReference->IsChecked();
cfg->m_Printing.background = m_checkBackgroundColor->IsChecked();
if( m_checkBackgroundColor->IsEnabled() )
cfg->m_Printing.background = m_checkBackgroundColor->IsChecked();
cfg->m_Printing.use_theme = m_checkUseColorTheme->IsChecked();
COLOR_SETTINGS* theme = static_cast<COLOR_SETTINGS*>(
+13 -2
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 2010-2019 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
@@ -196,6 +196,14 @@ void DIALOG_SCH_FIND::OnReplaceWithEnter( wxCommandEvent& aEvent )
void DIALOG_SCH_FIND::OnOptions( wxCommandEvent& aEvent )
{
updateFlags();
m_findDirty = true;
}
void DIALOG_SCH_FIND::updateFlags()
{
// Rebuild the search flags in m_findReplaceData from dialog settings
int flags = 0;
if( m_radioForward->GetValue() )
@@ -223,12 +231,13 @@ void DIALOG_SCH_FIND::OnOptions( wxCommandEvent& aEvent )
flags |= FR_REPLACE_REFERENCES;
m_findReplaceData->SetFlags( flags );
m_findDirty = true;
}
void DIALOG_SCH_FIND::OnFind( wxCommandEvent& aEvent )
{
updateFlags(); // Ensure search flags are up to date
int index = m_comboFind->FindString( m_comboFind->GetValue(), true );
if( index == wxNOT_FOUND )
@@ -250,6 +259,8 @@ void DIALOG_SCH_FIND::OnFind( wxCommandEvent& aEvent )
void DIALOG_SCH_FIND::OnReplace( wxCommandEvent& aEvent )
{
updateFlags(); // Ensure search flags are up to date
int index = m_comboReplace->FindString( m_comboReplace->GetValue(), true );
if( index == wxNOT_FOUND )
+4 -1
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2010 Wayne Stambaugh <stambaughw@gmail.com>
* 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
@@ -75,6 +75,9 @@ protected:
void OnFind( wxCommandEvent& aEvent ) override;
void OnReplace( wxCommandEvent& aEvent ) override;
// Rebuild the search flags from dialog settings
void updateFlags();
SCH_EDIT_FRAME* m_frame;
SCH_EDITOR_CONTROL* m_editorControl;
wxFindReplaceData* m_findReplaceData;

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