Compare commits

...

376 Commits

Author SHA1 Message Date
Mike Williams 9389a2b7c5 design blocks: cross-editor notification of library actions 2025-02-05 12:20:17 -05:00
Mike Williams 97aa507dd4 design blocks: commonize tool control functionality 2025-02-05 10:28:59 -05:00
Mike Williams eed62789a8 design blocks: check for library existence in table dialog 2025-02-04 09:27:31 -05:00
Mike Williams 17a29794a1 pcb design blocks: add place (repeated, grouped) functionality 2025-02-04 09:27:31 -05:00
Mike Williams c49a9497ff pcb design blocks: PCB save selection as design block 2025-02-04 09:27:31 -05:00
Mike Williams 362366d6f5 pcb design blocks: create from board working-ish and block preview 2025-02-04 09:27:31 -05:00
Mike Williams 372a9c3f51 pcbnew: move extension ensurance up a level 2025-02-04 09:27:31 -05:00
Mike Williams 8c2a6fc818 pcb: don't show informational message on successful save 2025-02-04 09:27:31 -05:00
Mike Williams 7054963d90 PCB editor: add design block panel 2025-02-04 09:27:31 -05:00
Mike Williams b894e7fe91 design blocks: commonize a lot of the code in prep for PCB blocks 2025-02-04 09:27:31 -05:00
Jon Evans 55e5596cda Fix more field fallout
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19832
2025-02-03 21:40:09 -05:00
Jon Evans ec405f02f8 Fix build on linux 2025-02-03 20:48:25 -05:00
Jon Evans 29b2c79f0a API: Clean up orphaned sockets 2025-02-03 18:56:55 -05:00
Jon Evans 0682d319fb API: Don't check for busy when not needed
see https://gitlab.com/kicad/code/kicad-python/-/issues/11
2025-02-03 18:02:46 -05:00
Jeff Young b2de4cf40a Fix typo. 2025-02-03 22:57:49 +00:00
Jeff Young f724dab4b2 Fix build. 2025-02-03 22:15:56 +00:00
Jeff Young bef63fe76b More accurate tooltip for Gerber knockout of solder mask.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19744
2025-02-03 22:04:20 +00:00
Jeff Young ec649593ae Fix layout issues in print dialog controls. 2025-02-03 21:41:03 +00:00
Jeff Young fec6882e0a Fix row shading.
Don't use the wxGrid convenience covers.  They assume
you're doing nothing else with attributes.
2025-02-03 20:06:30 +00:00
Seth Hillbrand 28b2e656e5 Work around (maybe) wx wrapping issue
wx infobar generic will wrap text, changing the stored label data on
instantiation.  Since we might expand the infobar later, this presents
an issue as the newlines are then baked into the string.

We do two things here: keep a copy of the original string to make sure
that we can reset it on update and do a hard calculation of the minimum
height for the infobar to ensure we are displaying the full text string

Fixes https://gitlab.com/kicad/code/kicad/issues/19799
2025-02-03 13:31:24 -06:00
Alex Shvartzkop b46bce8f8f Update translations 2025-02-03 19:59:03 +03:00
Marco Ciampa 8b5cd26dc7 Translated using Weblate (Italian)
Currently translated at 93.1% (9268 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-02-03 17:58:10 +01:00
CloverGit 1bf44150b1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-02-03 17:58:10 +01:00
CloverGit c7b4da3ef9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-02-03 17:58:10 +01:00
김랑기 c24192108d Translated using Weblate (Korean)
Currently translated at 99.1% (9865 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-02-03 17:58:10 +01:00
Marco Ciampa c07f83b06b Translated using Weblate (Italian)
Currently translated at 92.6% (9213 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-02-03 17:58:10 +01:00
CloverGit 716c899a6b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-02-03 17:58:10 +01:00
김랑기 e1810c9835 Translated using Weblate (Korean)
Currently translated at 99.1% (9865 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-02-03 17:58:09 +01:00
Elek Zoltán 9f18dc3cbf Translated using Weblate (Hungarian)
Currently translated at 6.1% (607 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-02-03 17:58:09 +01:00
Marco Ciampa f1d69af419 Translated using Weblate (Italian)
Currently translated at 91.9% (9148 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-02-03 17:58:09 +01:00
Henrik Kauhanen 708c6cca63 Translated using Weblate (Swedish)
Currently translated at 99.6% (9911 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-02-03 17:58:09 +01:00
co8 j 8d9ae99258 Translated using Weblate (Japanese)
Currently translated at 99.9% (9942 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-02-03 17:58:09 +01:00
Henrik Kauhanen 9bc6fde2f6 Translated using Weblate (Finnish)
Currently translated at 99.1% (9859 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-02-03 17:58:09 +01:00
Henrik Kauhanen 1ef0a5e22b Translated using Weblate (German)
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-02-03 17:58:09 +01:00
김랑기 6c356aa21c Translated using Weblate (Korean)
Currently translated at 96.9% (9645 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-02-03 17:58:09 +01:00
109247019824 69cf4fb6ef Translated using Weblate (Bulgarian)
Currently translated at 8.2% (817 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/bg/
2025-02-03 17:58:08 +01:00
김랑기 3adf9f0c82 Translated using Weblate (Korean)
Currently translated at 96.9% (9645 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-02-03 17:58:08 +01:00
iamPeter 777860d520 Translated using Weblate (Hungarian)
Currently translated at 5.9% (591 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-02-03 17:58:08 +01:00
109247019824 1a510a297e Translated using Weblate (Bulgarian)
Currently translated at 8.1% (815 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/bg/
2025-02-03 17:58:08 +01:00
reimu105 d65d41286f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.3% (9086 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-02-03 17:58:08 +01:00
ZbeeGin b40d42696a Translated using Weblate (Polish)
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-02-03 17:58:08 +01:00
109247019824 3e25689be7 Translated using Weblate (Bulgarian)
Currently translated at 7.3% (733 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/bg/
2025-02-03 17:58:08 +01:00
Wellington Terumi Uemura cad5a2722c Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-02-03 17:58:08 +01:00
Pferd O a673970435 Translated using Weblate (German)
Currently translated at 100.0% (9948 of 9948 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-02-03 17:58:08 +01:00
Mike Williams 45ba00ac22 design blocks: point to new lib table on project change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19783
2025-02-03 10:26:30 -05:00
Tomasz Wlostowski 8d858fe998 router: prevent shove endpoint-in-hull fallback code from making non-45 degree tracks
Fixes https://gitlab.com/kicad/code/kicad/issues/19760
2025-02-03 13:24:27 +01:00
Tomasz Wlostowski 232b286793 router: comment out some excessive debug calls
Too much PNS_DBG() calls make the debug tool very sluggish, even in release mode.
2025-02-03 13:24:27 +01:00
Tomasz Wlostowski 60b40579cb router: reenable diff pair placement in shove mode
Fixes https://gitlab.com/kicad/code/kicad/issues/19547
2025-02-03 13:24:27 +01:00
Tomasz Wlostowski 3ba87b9d08 router: fix 'litter' tracks issue
The commit adds missing calls to unwindLineStack() and fixes the logic of the method.
2025-02-03 13:24:27 +01:00
Tomasz Wlostowski 849e3d2f18 qa: fix setting of router mode (single/diff) in pns_log_viewer 2025-02-03 13:24:27 +01:00
Tomasz Wlostowski 9f2eade5f5 router: dump NODE overrides debug method 2025-02-03 13:24:27 +01:00
Jeff Young 857d4f3803 Cleanup. 2025-02-03 11:54:57 +00:00
Jeff Young 5f06f0d863 Indentation fixes for controls in print dialog. 2025-02-03 11:54:57 +00:00
Jeff Young 9b7b923e34 Consistency with library browsers & symbol fields table. 2025-02-03 11:54:57 +00:00
Jeff Young d551b0b949 Formatting. 2025-02-03 11:54:56 +00:00
Ian McInerney 59a4cc2e4b Default to 4 user defined layers 2025-02-02 23:09:08 +00:00
Jeff Young 9ab4fef369 Remove duplicate short-form argument.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19798
2025-02-02 19:58:56 +00:00
Jeff Young 8024555323 Icon spacing. 2025-02-02 18:25:08 +00:00
Jeff Young d209dddcc6 Correctly initialise mandatory fields array.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19819
2025-02-02 18:10:44 +00:00
Jeff Young 96022ee169 Correctly handle mandatory fields when adding/removing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19819
2025-02-02 17:55:07 +00:00
Seth Hillbrand 4eb0e70ddf Fix issue preventing printing on some platforms
Linux printing for some systems blanked the printouts when the gal
screensize was set here.  Restoring the screensize after clearing
ensures that the view redraw is properly scaled

Fixes https://gitlab.com/kicad/code/kicad/issues/19807
2025-02-02 09:44:10 -06:00
Jeff Young 879e76b28e Make notifications stand out from parent, and fix focus & focus-loss events on Mac. 2025-02-02 15:00:52 +00:00
Jeff Young 72a59c547c Formatting and better use of common code. 2025-02-02 15:00:52 +00:00
Ethan Chien d96479dd34 Windows: Add post-build script for installation and file copying 2025-02-02 07:55:11 +08:00
Jeff Young 8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00:00
Jeff Young ada1a9b054 Formatting. 2025-02-01 17:39:24 +00:00
Seth Hillbrand 56ca054c0d Add new table icon
Replace a couple uses of the old spreadsheet
2025-02-01 09:53:12 -06:00
Jeff Young 5dc8e9a5de Formatting. 2025-02-01 11:38:07 +00:00
jean-pierre charras 91d5238f4c DIALOG_XXX_JOB_XXX: fix min size and other minor fix.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19811
2025-02-01 10:44:25 +01:00
jean-pierre charras bc25044e78 Eeschema, advanced_config: enable Cairo to export to clipboard by default. 2025-01-31 19:31:43 +01:00
John Beard 30affcd7a1 QA: side-step wxSize printer not working for some
Not sure what it is that caused it to break (reported by
Seth on Linux, but works for me and on the CI).

Rather than trying to be clever at this point, just do the dumb
thing (and remove the boost_test_print_type for wxSize to prevent
someone using it for the time being).
2025-02-01 00:35:13 +08:00
Mark Roszko a7f5fc45e7 Widths in WX_GRID_AUTOSIZER should account for dpi scaling 2025-01-31 11:14:40 -05:00
Mark Roszko 88a404580a Fix DPI scaling on Configure Paths 2025-01-31 11:10:39 -05:00
Mark Roszko 29311393a5 Set a min size on the layer pair grid or else it bugs out when the first entry is added 2025-01-31 11:04:35 -05:00
Mark Roszko e765ad0c2f Kill unused var warning 2025-01-31 11:00:07 -05:00
Mark Roszko d9809fb816 Partially fix the DIALOG_LAYER_SELECTION_BASE 2025-01-31 10:59:42 -05:00
Mark Roszko 50e2a12e17 Fix palette icon scaling on Windows, also extend KiBitmapBundle because we use bundles wrong
wxBitmapBundle assumes the smallest bitmap added is the intended "original" size for a particular use case.
And generally that is probably true. However, we re-use icons in some places where we intend for them to start at 16
or start at 24. This is problematic when GetPreferredBitmapSizeFor is called for calculations because it'll return the
16*scale number instead of 24*scale number. So let's just allow passing in a min height restriction to KiBitmapBundle
for when we reuse bitmaps.
2025-01-31 10:37:00 -05:00
John Beard 636c6c4efb Eeschema/pcbnew: fix pasted image saving
The m_imageData buffer in the BITMAP_BASE is an
internal implementation - the public API to persist the
data to a stream appears to be SaveImageData - so use that,
which hides the implementation (and generates the image data
"live" when needed).

Remove the public access to the m_imageData buffer as it isn't
needed for public use, and also is misleading.

Also break out the formatting of the data into KICAD_FORMAT,
as it's currently replicated in eeschema/pcb/pagelayout
formatting code.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19772
2025-01-31 23:01:07 +08:00
Roberto Fernandez Bautista c5120b9090 Add fake-autoroute to context menus (router and edit) 2025-01-31 15:49:27 +01:00
Seth Hillbrand 8955e33e80 Update grid icons
Adds a new grid override icon.  In the process, I noticed that the other
grid icons were not pixel aligned.  So this also updates all of the grid
icons to align the points
2025-01-31 08:44:23 -06:00
Mark Roszko 4037894b99 Complete the hi-dpi fixes, woops 2025-01-31 08:32:13 -05:00
Mark Roszko 74b174e4f0 Add "source" field for jobsets to discern SCH & PCB jobs 2025-01-31 08:16:26 -05:00
Mark Roszko 062a813139 Make EDA_LIST_DIALOG more hi-dpi friendly 2025-01-31 08:15:07 -05:00
Mark Roszko afb61b3b4e Disable C4746 2025-01-31 03:48:29 -05:00
jean-pierre charras 9e510759b8 FP_LIB_TABLE_ROW::LibraryExists(): ensure environment variables are expanded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19800
2025-01-31 09:14:42 +01:00
Seth Hillbrand d4c9e1f069 Adjust LayerDepthFactor to account for layer size
We need to draw all layers on top of the layer behind us, the factor is
rather arbitrary but needs to ensure that the step is still below 0 when
subtracted using the full layer size

Fixes https://gitlab.com/kicad/code/kicad/issues/19795
2025-01-30 16:35:05 -06:00
Jeff Young ccb39fb775 Formatting. 2025-01-30 18:16:42 +00:00
Jeff Young a5d643cbaa Formatting. 2025-01-30 13:02:07 +00:00
Jeff Young 9083c9e6ab Remove dead code. 2025-01-29 20:54:33 +00:00
Jeff Young 0c4ff6b640 No inheritance for table ruling line styles. 2025-01-29 20:54:33 +00:00
Jeff Young 8bdc7f108b Report errors when library is missing. 2025-01-29 20:54:33 +00:00
Ian McInerney 4cf8274b2b Silence errors from file watchers when adding files
The file watcher can throw errors on Linux that are very cryptic and
actually not very useful to users, so let's hide them since there isn't
really any problem that comes from this.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
2025-01-29 19:34:00 +00:00
jean-pierre charras 799ea8317d spread_footprints.cpp, SpreadFootprints(): fix incorrect conversion int to uint64
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19780
2025-01-29 19:43:17 +01:00
Alex Shvartzkop 3baa6cd791 Update translations 2025-01-29 19:59:04 +03:00
John Beard 12dc00b8d8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (9974 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-01-29 17:58:42 +01:00
John Beard 09c8ac2038 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.6% (9142 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-29 17:58:42 +01:00
ZbeeGin 36e155ee58 Translated using Weblate (Polish)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-29 17:58:42 +01:00
Pferd O 4ec8aee7d8 Translated using Weblate (German)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-29 17:58:42 +01:00
109247019824 25a49a64a6 Translated using Weblate (Bulgarian)
Currently translated at 7.3% (737 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/bg/
2025-01-29 17:58:41 +01:00
Seth Hillbrand c436207659 Update new bitmaps
Forgot to commit the bitmap_info previously
Updated the jobset to be usable for new and open forms
Added remaining icon references
2025-01-29 09:33:31 -06:00
Seth Hillbrand 3260aa2213 Utilize libpopcnt
We need to be sure to reference the include when pulling in
dynamic_bitset
2025-01-29 08:18:46 -06:00
Seth Hillbrand 94444adb54 Don't take references to casts
We don't really save cycles and this can lead to unexpected behavior
when the compiler decides that the sizes of the two types are different
2025-01-29 08:17:27 -06:00
Seth Hillbrand 683be91b60 Adding new icons 2025-01-29 05:42:57 -06:00
Jeff Young 3078d82bd5 Don't wait for mouse-move to update screen.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19771
2025-01-29 11:23:56 +00:00
Jeff Young fb87ea6837 Nothing wrong with a NPTH pad with no layers.
Also fixes PTH anchor layer warning to mention "outer".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19752
2025-01-29 10:32:58 +00:00
Seth Hillbrand 112e8e7ccb Remove a few more crashers
Need to check SYM_LIB_TABLE_ENTRY for null but need to check
FP_LIB_TABLE_ENTRY for throwing
2025-01-29 00:00:11 -06:00
Seth Hillbrand 9beca90185 Ensure that new text objects are "new"
Setting the new object flag ensures that we do not commit changes in the
dialog, before the object is placed on the canvas

Fixes https://gitlab.com/kicad/code/kicad/issues/19778
2025-01-28 23:16:46 -06:00
Damjan 46ada43166 Eeschema: Import sheet pins: sort pin names intelligently 2025-01-29 04:16:35 +00:00
Damjan c6e049df2a Pcbnew: isDrag detection in Table creation tool
Drag breaks the UI when in the create table action

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19767
2025-01-29 01:25:37 +00:00
Ian McInerney 088e0e80a1 Fix layer writing/reading for copper zones
* Always enumerate layers - never use the wildcards
* Keep fills on layers the zone is actually on when loading

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19775
2025-01-29 00:31:28 +00:00
Seth Hillbrand 3f90cfb0ca Fix up git warning 2025-01-28 12:22:39 -08:00
Seth Hillbrand 81fbaacae2 Keep track of user layer mapping for footprints
Footprints in orgs have standard naming.  We need to allow designers to
keep their standard namings outside of boards where they are fixed.
This belongs in the preferences as a set-once for local standards
2025-01-28 12:22:39 -08:00
Seth Hillbrand ff820bd809 Keep AllCuLayers as base for number of copper layers 2025-01-28 12:22:39 -08:00
Seth Hillbrand e316b33a08 Update mask in grid box helper when showing
Masks are not permanent depending on the editor, so make sure that the
value is kept up to date
2025-01-28 12:22:39 -08:00
Seth Hillbrand 7ea6206126 dynamic_bitset requires both sets to be same size 2025-01-28 12:22:39 -08:00
Seth Hillbrand f34f962455 Fix switch branch for rapid change
Was missing a handler for the rapid switch IDs
2025-01-28 12:22:39 -08:00
Seth Hillbrand 919931f0f0 Get embedded files panel working for lib_symbol
The symbol library embedded files were implicit, which made them hard to
work with.  Adding the panel makes it clearer and setting the panel
correctly to the callback ensures that the structure is updated on
close.

Adds some copy/move semantics for EMBEDDED_FILES to take advantage of
how the multiple copies are handled in the library editor

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18935
2025-01-28 12:22:39 -08:00
Seth Hillbrand 0d86b88008 Unify embedded files handling btw editors
Each editor needs the embedded files tab in the
schematic/pcb/symbol/footprint settings.  But the footprint may add an
embedded file from the 3d models tab and symbols/footprints may add
embedded files from the grid.  This should be immediately visible in the
embedded files tab.  Additionally, removing the reference to an embedded
file in the grid or 3d models now removes the embedded file as well.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18934
2025-01-28 12:22:39 -08:00
Seth Hillbrand 1641878af7 Don't create a repository before the dialog
The user might cancel a dialog, leaving a broken repo.  We use a temp
repo to test the connection

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16263
2025-01-28 12:22:39 -08:00
Seth Hillbrand f871255005 Clean and unify pad/fp rotations
IPC2581 classifies pad rotation as clockwise from the top layer looking
down.  Which means that if you have the exact same footprint with
rotated pads on the top layer and bottom layer, then that will need two
different packages because one package will have the pads rotated one
way, the other will have the pads rotated in the opposite direction.
The IPC committee clearly was too smart for its own good here.  So we
hash the footprints based on layer as well and then introduce the
rotation into the pad.  This increases the number of packages but keeps
the code compact

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19703
2025-01-28 12:22:39 -08:00
Seth Hillbrand 6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
Alex Shvartzkop 33a8425d3d Update translations 2025-01-28 19:42:48 +03:00
reimu105 17af30d26f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.6% (9143 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
Wellington Terumi Uemura 5aa8f1841f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-01-28 17:39:42 +01:00
reimu105 c9985f02cf Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.5% (9130 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
Marco Ciampa 37e74c9614 Translated using Weblate (Italian)
Currently translated at 92.1% (9195 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:42 +01:00
reimu105 23fff95362 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.5% (9130 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 5ff079fb3f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 91.3% (9113 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
co8 j 8220f72db0 Translated using Weblate (Japanese)
Currently translated at 99.9% (9970 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-01-28 17:39:42 +01:00
reimu105 5ab146aa7b Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.1% (8990 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 90229d0129 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.1% (8989 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 05c7900363 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.1% (8988 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 1c13ab4dc9 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8987 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 cb6be36969 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8986 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 4b20b9bf92 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8985 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:42 +01:00
reimu105 0786b005b3 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8984 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 22afe8c060 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8983 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 d395091899 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8982 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 001962c8b7 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8982 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 3191ba4d70 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8982 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 da94a9127d Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 8bf308573a Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 5139cbb0ab Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 8a6c9bd395 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 fe19b02ea3 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 a51173d017 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 b6be36f7ef Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 f039378bde Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 493db877c9 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 04ca6e6d5c Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 dc20d120eb Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 40e8a573f0 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8981 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:41 +01:00
reimu105 342217478b Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8980 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
reimu105 1d928ea1b0 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8979 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
reimu105 981fb67d57 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 90.0% (8978 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
reimu105 d49059be91 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.7% (8956 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
reimu105 b00a7e294f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.7% (8956 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
Marco Ciampa 9cb500654b Translated using Weblate (Italian)
Currently translated at 90.5% (9034 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:40 +01:00
reimu105 3ce858e88d Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.7% (8956 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:40 +01:00
Marco Ciampa e23777e826 Translated using Weblate (Italian)
Currently translated at 90.1% (8993 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:40 +01:00
CloverGit 1cd9929b15 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-28 17:39:40 +01:00
CloverGit 39d87c339b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (9969 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-28 17:39:40 +01:00
KK0571 dc8cb076c6 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (9969 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-28 17:39:40 +01:00
ZbeeGin d361e58da9 Translated using Weblate (Polish)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-28 17:39:39 +01:00
Pferd O bec82d1951 Translated using Weblate (German)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-28 17:39:39 +01:00
John Beard 1a00405a87 Translated using Weblate (Italian)
Currently translated at 89.9% (8977 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:39 +01:00
Marco Ciampa 1082aa2861 Translated using Weblate (Italian)
Currently translated at 89.9% (8977 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:39 +01:00
John Beard 9f685ddec8 Translated using Weblate (Ukrainian)
Currently translated at 76.0% (7586 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-01-28 17:39:39 +01:00
John Beard 202833aa8d Translated using Weblate (Spanish (Mexico))
Currently translated at 87.0% (8682 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2025-01-28 17:39:39 +01:00
John Beard fdb3401ec1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.9% (9974 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-01-28 17:39:39 +01:00
John Beard 812e2983a5 Translated using Weblate (Thai)
Currently translated at 62.1% (6199 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/th/
2025-01-28 17:39:39 +01:00
John Beard bebe0216f9 Translated using Weblate (Danish)
Currently translated at 42.8% (4273 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/da/
2025-01-28 17:39:39 +01:00
John Beard 0a13094913 Translated using Weblate (Vietnamese)
Currently translated at 23.9% (2389 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2025-01-28 17:39:39 +01:00
John Beard 1159ff2735 Translated using Weblate (Turkish)
Currently translated at 54.0% (5389 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-01-28 17:39:39 +01:00
John Beard 37db18b249 Translated using Weblate (Norwegian Bokmål)
Currently translated at 41.8% (4172 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2025-01-28 17:39:38 +01:00
John Beard 4b19a6d33a Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.0% (8885 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-01-28 17:39:38 +01:00
John Beard 014df49c4f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (9968 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-28 17:39:38 +01:00
John Beard 7d532e4502 Translated using Weblate (Swedish)
Currently translated at 99.0% (9885 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-01-28 17:39:38 +01:00
John Beard 3aca721bb4 Translated using Weblate (Slovenian)
Currently translated at 0.4% (48 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sl/
2025-01-28 17:39:38 +01:00
John Beard f4e65c54cf Translated using Weblate (Slovak)
Currently translated at 56.5% (5645 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sk/
2025-01-28 17:39:38 +01:00
John Beard cfaf70c0a4 Translated using Weblate (Russian)
Currently translated at 99.8% (9965 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-28 17:39:38 +01:00
John Beard 9399f2ba7d Translated using Weblate (Portuguese)
Currently translated at 93.7% (9348 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2025-01-28 17:39:38 +01:00
John Beard 94c3f05bd7 Translated using Weblate (Polish)
Currently translated at 99.9% (9974 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-28 17:39:38 +01:00
John Beard 07d7cddafb Translated using Weblate (Dutch)
Currently translated at 90.2% (9006 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2025-01-28 17:39:38 +01:00
John Beard c9a06ca564 Translated using Weblate (Lithuanian)
Currently translated at 43.7% (4364 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/lt/
2025-01-28 17:39:38 +01:00
John Beard ab3d2e4c60 Translated using Weblate (Korean)
Currently translated at 97.3% (9710 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-01-28 17:39:37 +01:00
김랑기 641070db7c Translated using Weblate (Korean)
Currently translated at 97.3% (9710 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-01-28 17:39:37 +01:00
John Beard c71ea22e7d Translated using Weblate (Japanese)
Currently translated at 99.9% (9969 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-01-28 17:39:37 +01:00
John Beard ea6e527063 Translated using Weblate (Finnish)
Currently translated at 99.4% (9923 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-28 17:39:37 +01:00
John Beard 57c9120c20 Translated using Weblate (Spanish)
Currently translated at 85.2% (8507 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-01-28 17:39:37 +01:00
John Beard ee4dd37ad1 Translated using Weblate (Greek)
Currently translated at 87.7% (8758 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2025-01-28 17:39:37 +01:00
John Beard 9c3b246c36 Translated using Weblate (German)
Currently translated at 99.9% (9974 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-28 17:39:37 +01:00
John Beard 6903f6c71c Translated using Weblate (Czech)
Currently translated at 76.6% (7646 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-01-28 17:39:37 +01:00
John Beard 6077f467ec Translated using Weblate (Catalan)
Currently translated at 41.7% (4164 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-01-28 17:39:37 +01:00
Marco Ciampa 31863bb266 Translated using Weblate (Italian)
Currently translated at 89.1% (8888 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-28 17:39:37 +01:00
Wellington Terumi Uemura 5dd563f2db Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-01-28 17:39:37 +01:00
Hanna Breisand 863b460d09 Translated using Weblate (Swedish)
Currently translated at 99.1% (9886 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-01-28 17:39:36 +01:00
dsa-t 2e1029fc53 Translated using Weblate (Russian)
Currently translated at 99.9% (9966 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-28 17:39:36 +01:00
dsa-t 4dccffa153 Translated using Weblate (Ukrainian)
Currently translated at 76.0% (7586 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-01-28 17:39:36 +01:00
Henrik Kauhanen d5ebe0f6f6 Translated using Weblate (Swedish)
Currently translated at 99.1% (9886 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-01-28 17:39:36 +01:00
dsa-t 088e2f96ee Translated using Weblate (Polish)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-28 17:39:36 +01:00
ZbeeGin eca0bf6f0b Translated using Weblate (Polish)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-28 17:39:36 +01:00
dsa-t 6209b3b23a Translated using Weblate (Japanese)
Currently translated at 99.9% (9970 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-01-28 17:39:36 +01:00
co8 j 7824f1d650 Translated using Weblate (Japanese)
Currently translated at 99.9% (9970 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-01-28 17:39:36 +01:00
dsa-t dfa8bc2adc Translated using Weblate (Finnish)
Currently translated at 99.4% (9924 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-28 17:39:36 +01:00
Henrik Kauhanen 16eda46396 Translated using Weblate (Finnish)
Currently translated at 99.4% (9924 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-28 17:39:36 +01:00
dsa-t 785edc3247 Translated using Weblate (German)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-28 17:39:36 +01:00
Pferd O c912250b0d Translated using Weblate (German)
Currently translated at 100.0% (9975 of 9975 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-28 17:39:36 +01:00
Damjan 0ba7f0e766 Eeschema: Default value for line style combo box in Graphic properties dialog window is Combo! 2025-01-28 15:21:27 +00:00
Mike Williams 19708d2a75 design blocks: add error message when necessary 2025-01-28 10:12:10 -05:00
Mike Williams d16c28911e design blocks: move settings save out of destructor 2025-01-28 10:12:09 -05:00
Mike Williams e94052ccb3 sch design block preview: fix order of preview destruction 2025-01-28 10:10:01 -05:00
Jeff Young e8e0b07223 Honour on-the-fly language changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19773
2025-01-28 15:09:11 +00:00
Marek Roszko 6652d3eca7 Remove the long path adjustment for now
Some bugs between archive vs backup project
2025-01-28 06:36:29 -05:00
Marek Roszko 76083e507a Revert "Kicad manager: make zip archive working on Windows."
This reverts commit 80303b4caa.
2025-01-27 22:23:03 -05:00
John Beard d90862b444 Pcbnew: fix snapping view update after hover delay
Te update didn't refresh, so the snap extensions sometimes only
appeared after the _next_ mouse move, which was annoying when the
mouse was very still (e.g. when deliberately hovering over an item).

Use a wxTimer to put all the callbacks in the UI thread which is also
much simpler. Also the update function needs to call a canvas refresh
as well as the item update.
2025-01-28 08:50:31 +08:00
Jon Evans 28a4ca2d80 Mark string for translation 2025-01-27 19:04:32 -05:00
Jon Evans 8a7bf78b38 Fix color theme load logic in jobs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19754
2025-01-27 19:00:35 -05:00
Jon Evans e417b209a0 Don't paint clearance layers as copper
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19764
2025-01-27 18:16:58 -05:00
Alex Shvartzkop 6e54b88fe0 EasyEDA Pro import: set 3D model rotation for other axes as well.
(cherry picked from commit fbad7ae602)
2025-01-28 01:25:43 +03:00
JamesJCode 00e4d72d4b Move ownership of listener cleanup to BOARD itself
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19736
2025-01-27 21:55:11 +00:00
Jeff Young 25379b3094 Honour hover selections. 2025-01-27 20:30:45 +00:00
Jeff Young e530bab396 Don't report "shorting nets" when one pad has no net.
(Fall back to clearance violation instead.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19752
2025-01-27 19:08:35 +00:00
Jeff Young a9500de3f8 Ignore invisible copper text in router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19420
2025-01-27 18:41:36 +00:00
Jeff Young e21ec0558e DEFAULT no longer a legal LINE_STYLE for graphic lines.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19766
2025-01-27 18:25:39 +00:00
jean-pierre charras 32673a0ead Pcbnew, router: fix crash when trying to create a blind via without a track
Using PnS router, when trying to create a blind/buried or micro via with layer
selection with no track in progress, the router crashed because the starting
layer was not defined.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19750
2025-01-27 18:29:54 +01:00
Jeff Young fccb661487 More MANDATORY_FIELDS work.
Also fixes a crasher when Cancelling a FIELDS_GRID
dialog with one of the grid editors currently open.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19762
2025-01-27 17:02:17 +00:00
Ethan Chien c9001cc187 Sync Sheet Pins: Refactor button enable logic to use selected row count for synchronization models
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19738
2025-01-28 00:53:16 +08:00
Wayne Stambaugh 048669eced Compare SCH_SHAPE UUIDs after comparing shape object coordinates.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19716
2025-01-27 10:34:01 -05:00
jean-pierre charras b2ef81808b Pcbnew, DIALOG_PLOT: store B&W/Color option for PDF and SVG formats
Previously, the dialog started withB&W option.
2025-01-27 16:03:17 +01:00
Marek Roszko 68b3f66cd3 Bump vcpkg mainline 2025-01-26 20:55:46 -05:00
Marek Roszko 76728ab748 Bump vcpkg for wxpython ducktape 2025-01-26 20:55:46 -05:00
Jon Evans 8903a82c50 Fix design block panel trampling symbol chooser settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19190
2025-01-26 18:32:00 -05:00
jean-pierre charras e487f19260 QA api test: ensure the "C" locale is used in tests.
Fix also a compatibility with current code in drc_proto.cpp
2025-01-26 11:47:18 +01:00
Jon Evans 42b9a9604b Fix several data races triggered by parallel library loading 2025-01-25 11:44:15 -05:00
John Beard 7080d99464 Pcbnew: reduce snap timeout a fraction
This is subjective but 500ms just seems a hair too long.
2025-01-25 23:57:38 +08:00
John Beard c120254aa4 Pcbnew: snap to object faster if no objects activated
Otherwise it's annoying to snap to the first item you get to
if you have to wait every time.
2025-01-25 23:57:38 +08:00
Jeff Young 66df840353 Attempt to fix CLI test. 2025-01-25 15:00:00 +00:00
Jon Evans 9cf4dd05b3 Fixes to build with wxWidgets 3.3 2025-01-24 22:33:00 -05:00
Wayne Stambaugh 4e80c6fdc1 Revert "Do not use schematic object UUID comparisons when UUIDs are mutable."
This reverts commit 1dfe3ebc54.
2025-01-24 15:30:25 -05:00
Wayne Stambaugh 1dfe3ebc54 Do not use schematic object UUID comparisons when UUIDs are mutable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19716
2025-01-24 14:01:02 -05:00
Jeff Young 60c2469c75 Don't use dynamic_cast across compile boundaries.
(Especially not after we've already tested the
filenames explicitly so that we don't have to.)
2025-01-24 16:54:52 +00:00
John Beard 6f2a3582ae SCH_PIN: defer to lib pin for menu image
Otherwise we try to look up the icon for INHERIT,
which is an assertion.

This can be hit when long-clicking  no-connect on a pin.
2025-01-25 00:35:00 +08:00
John Beard 86394b7598 Eeschema: more useful assert msg on pin type lookup failure 2025-01-25 00:35:00 +08:00
Jeff Young 59f20cdedc Fix Mac build. 2025-01-24 16:06:22 +00:00
John Beard fb6d3c1808 Pcbnew: don't let axes hide construction geometry 2025-01-24 21:47:28 +08:00
Wayne Stambaugh 9eaefa3301 Fix crash when importing Eagle schematics with multiple module levels.
Fix annotation when importing Eagle schematic modules.  Apparently Eagle
uses hard coded module name prefixing scheme to generate module symbol
references by prefixing module name separated by a colon.  Even though
this results in references that are incompatible with KiCad, they are
used so that the board and schematic can be synchronized by references
on import.

https://gitlab.com/kicad/code/kicad/-/issues/19718
2025-01-24 07:35:31 -05:00
John Beard 0011586372 Position relative: don't run with no selection 2025-01-24 20:26:57 +08:00
John Beard 43be371f83 Kimath: don't access aActual unless set
Avoids at least one test failure in qa_pcbnew
due to uninitialised access.
2025-01-24 20:26:31 +08:00
John Beard d9a243d98c QA: Use data-driven tests in a few places
This means that you can run just a single case from the command line,
for example:

   `qa_pcbnew -t DRCCopperSliver/_0`

The case is also automatically printed as context.

This means that when isolating a specific defect in one case,
you can run only that one case, which is useful under debuggers
and also when using slow tools like valgrind.

Not all possibe tests are doing this, but they're easy to do
when needed (i.e. when you want to run just one case)
2025-01-24 20:13:19 +08:00
JamesJCode 09bbaa5813 Attempt to fix broken Windows build 2025-01-24 02:40:21 +00:00
JamesJCode b25cc8eb02 Set new symbol fields to default to hidden
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19727
2025-01-24 02:17:07 +00:00
JamesJCode 38054953d1 Set read-only color swatches on first use 2025-01-24 01:11:08 +00:00
Jeff Young b7592db2b3 Fix latent error in annotator uncovered by tests. 2025-01-23 23:47:30 +00:00
Jon Evans 877e197fec Fix another footprint field fallout
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19729
2025-01-23 18:25:07 -05:00
John Beard de7f735856 Pcbnew: fix extension snaps for initial persistent items
Specifically, do not race the delay against the proposal
cancellation for the initial items, but just accept them
immediately.
2025-01-24 03:46:58 +08:00
John Beard 5b07bb4f6a Pcbnew: fix snapping to reference image anchor points
Otherwise it's impossible to accurately place an image
using a corner or origin.
2025-01-24 03:46:58 +08:00
John Beard 954ef70a8a QA: add a library-mode footprint load/test/save test
This is not only a useful place to hang regression tests,
but also allows to catch defects specific to loading or
saving footprints.

For example, it would catch:

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/19713
2025-01-24 02:11:06 +08:00
Jeff Young 469d2176dd Use m_numRefStr when converting back to string.
(It main contain leading zeroes.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19724
2025-01-23 17:40:40 +00:00
Jeff Young 4c65085fa5 Search within symbols' draw items as well. 2025-01-23 14:54:10 +00:00
Jeff Young 7f307afb04 Adjust layout of Find dialogs. 2025-01-23 11:09:10 +00:00
Jeff Young a9ddcf4287 Fix positions of popup menus when plotting in mirrored mode.
[Resolve conflicts with JP's fix to same.  I'm not sure if we support !m_mirrorIsHorizontal, but
it was in other code, so I left it in just to be
safe....]

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19717
2025-01-23 10:55:11 +00:00
John Beard 48b32f781e Add ellipsis to 'Derive from Existing Symbol' 2025-01-23 17:04:29 +08:00
jean-pierre charras e9269e59f7 Pcbnew, PDF plot: fix property popup locations when plotting mirrored.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19717
2025-01-23 09:48:08 +01:00
Marek Roszko dc5276c1df Add Zc:inline for msvc 2025-01-22 20:23:32 -05:00
Marek Roszko 90465d6261 Add windows runtime copy with install step under msvc 2025-01-22 20:20:46 -05:00
Marek Roszko df1b5dd62c Move 2 warn flags to same place as the rest 2025-01-22 19:43:13 -05:00
Jeff Young 8fe8637297 Fix yet more assumptions about field IDs and order.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19710
2025-01-22 18:17:18 +00:00
Jeff Young d562336760 Always start kicad mgr with the apps page.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19711
2025-01-22 18:01:00 +00:00
jean-pierre charras 0748a1ca34 PANEL_SETUP_LAYERS: fix broken init of copper layer types.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19715
2025-01-22 18:59:15 +01:00
Alex Shvartzkop 88b56413d5 Fix crash when closing project manager during KiCad update check.
Also: allow to terminate the KiCad update check.
Also: update the status label when jobs are removed.
(cherry picked from commit 19890b7f99)
2025-01-22 20:56:03 +03:00
Jeff Young e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
jean-pierre charras be38fa5cac Pcbnew: footprint editor: fix crash when saving a footprint in lib
The crash was due to a footprint member (m_board) that is null in some
cases in footprint editor (renaming, saving, duplicate a Fp).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19713
2025-01-22 17:24:18 +01:00
jean-pierre charras 9a57f7d573 Fix a minor compil warning 2025-01-22 17:18:26 +01:00
John Beard 95a1d17603 Eeschema: init variable in SCH_FIELD 2025-01-22 21:03:42 +08:00
John Beard 84f4f7f724 Lib editors: avoid bogus overwrite prompt when renaming to self
Just accept the dialog and then early-return.
2025-01-22 19:35:54 +08:00
John Beard 78cf47bd00 Eeschema: avoid double entries after renaming to exisiting names
Also handles the case when the overwritten symbol is the current
one (i.e. select symbol Bar, then rename the unselected symbol
Foo to Bar).

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19709
2025-01-22 19:33:50 +08:00
Alex Shvartzkop 8f60a47a81 Don't wait for background tasks before closing the project manager frame.
Cancels the curl transfer if the reporter was cancelled.
2025-01-22 13:52:28 +03:00
Alex Shvartzkop 0c694de209 Protect against calling curl_easy_cleanup after curl_global_cleanup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17103
Fixes KICAD-7DP
2025-01-22 13:52:28 +03:00
Alex Shvartzkop 4eaadcae5c Fix PCM logger format string usage. 2025-01-22 13:52:28 +03:00
Alex Shvartzkop 76849b05a7 Make controls of grid cell editors mostly invisible on creation.
The controls were visible momentarily when clicking on cells, at least on MSW.

The wxStyledTextCtrl is still visible, but is not multi-line with scrollbars.
2025-01-22 13:52:28 +03:00
Alex Shvartzkop 2278ee070f Fix warning C4296: '>=': expression is always true. 2025-01-22 13:52:28 +03:00
jean-pierre charras c0e2acc8cb French translation update 2025-01-22 11:01:46 +01:00
Seth Hillbrand 0281bfe05e Fix missing display pads on MacOS
The distance from any point in the negative quadrant to
std::numeric_limits::max will be larger than std::numeric_limits::max,
meaning that if we take the square of this value, we will overflow the
extended_type.  Overflows are undefined behavior when dealing with
signed integers (c.f. C99 §3.4.3/1) so while most compilers retain a
positive value, Apple, in release mode, overflows into the sign bit,
resulting in a negative number for the squared distance.

This prevented us from displaying certain shapes in the negative
quadrant on MacOS, only in release mode builds

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19424
2025-01-21 20:05:25 -08:00
Jon Evans 4118c14d97 API: Add selection handling 2025-01-21 19:53:03 -05:00
Jon Evans 71353b11f1 API: Make sure socket is cleaned up 2025-01-21 19:53:02 -05:00
Seth Hillbrand 988d229bbf Clean up unused var
Turns out we didn't need that one
2025-01-21 16:21:27 -08:00
Jeff Young dac7c9d4d7 Convert cross-references in Table Properties dialogs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19705
2025-01-22 00:16:44 +00:00
Seth Hillbrand 5a57e5cfd4 Handle SSH keys better
OpenSSH will iterate through a series of keys.  Additionally, there may
be a key specified in the ssh/config file that we need to account for.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18864
2025-01-21 15:59:07 -08:00
Jeff Young 4fe05bfe47 Remove some more usages of MANDATORY_FIELDS. 2025-01-21 23:38:55 +00:00
Jeff Young 27755ac317 Calc mandatoryRows on the fly to prevent initialization order issues. 2025-01-21 17:00:19 +00:00
Jeff Young a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young d21eeb4249 Nullptr safety when called from test framework. 2025-01-21 14:21:10 +00:00
Jeff Young d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
Seth Hillbrand 427d7d2dad Move git password management to local password control
Don't keep passwords in plain text config files that may be checked into
version control.  Passwords stored in system-specific password managers

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18053
2025-01-20 17:33:55 -08:00
JamesJCode a50d3b5d1b Set default netclass priority explicitly in constructor
This currently only happens for migrated schematics. It's not
currently needed for netclass ordering, but will ensure the
priorities are orderable without special-casing the default
netclass should anybody require that functionality in the future.
2025-01-21 00:23:48 +00:00
Alex Shvartzkop a71b7e14d4 Update translations 2025-01-21 01:58:03 +03:00
dsa-t eb24b18f0a Translated using Weblate (Russian)
Currently translated at 99.8% (9962 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:47 +01:00
CloverGit 7171713315 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9972 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-20 23:57:47 +01:00
Sárkány Lőrinc aa960e661b Translated using Weblate (Hungarian)
Currently translated at 6.0% (601 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-01-20 23:57:46 +01:00
CloverGit 0cd67e3c66 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (9961 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-20 23:57:46 +01:00
Sárkány Lőrinc 56c19a9257 Translated using Weblate (Hungarian)
Currently translated at 5.7% (571 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-01-20 23:57:46 +01:00
Jan Straka f54de9181d Translated using Weblate (Czech)
Currently translated at 76.7% (7654 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-01-20 23:57:46 +01:00
Sárkány Lőrinc 1f90c17f39 Translated using Weblate (Hungarian)
Currently translated at 5.5% (556 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-01-20 23:57:46 +01:00
Toni Laiho 15652dd1a7 Translated using Weblate (Finnish)
Currently translated at 99.5% (9928 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-20 23:57:46 +01:00
Ulices e2db63236e Translated using Weblate (Spanish (Mexico))
Currently translated at 87.1% (8688 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2025-01-20 23:57:46 +01:00
Wellington Terumi Uemura 3b943ad079 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9972 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-01-20 23:57:46 +01:00
Rigo Ligo 56a19c5e1e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (9961 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев 1cbcab4208 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:46 +01:00
Toni Laiho 40c8dc7e8e Translated using Weblate (Finnish)
Currently translated at 99.5% (9925 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев 2867b28a24 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев 0e8c04888d Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев 6dde23a1d2 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев dd14092d5f Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:46 +01:00
Дмитрий Михирев 1da00b7d1e Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев ba1b65cf69 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев 058d99f236 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев b7ca7163f9 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев ed662c3f1f Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев b2c8c9c302 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев 196b3d100b Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев b891860c25 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев 056b8d668a Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев 9143ab47c1 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:45 +01:00
Marco Ciampa e8adb46e59 Translated using Weblate (Italian)
Currently translated at 88.0% (8780 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-01-20 23:57:45 +01:00
Ivan Chuba 910a5d2483 Translated using Weblate (Ukrainian)
Currently translated at 76.1% (7592 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-01-20 23:57:45 +01:00
Ulices 6c794b85fd Translated using Weblate (Spanish (Mexico))
Currently translated at 87.1% (8687 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2025-01-20 23:57:45 +01:00
CloverGit 4efa78abc9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (9961 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-01-20 23:57:45 +01:00
Дмитрий Михирев 3702f73de9 Translated using Weblate (Russian)
Currently translated at 99.2% (9897 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-01-20 23:57:44 +01:00
ZbeeGin fc54a2615e Translated using Weblate (Polish)
Currently translated at 100.0% (9972 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-01-20 23:57:44 +01:00
2tama3 8c4e2f1577 Translated using Weblate (Japanese)
Currently translated at 100.0% (9972 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-01-20 23:57:44 +01:00
Ricky Tigg 239f200b2d Translated using Weblate (Finnish)
Currently translated at 98.5% (9823 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-01-20 23:57:44 +01:00
Pferd O 613be802b9 Translated using Weblate (German)
Currently translated at 100.0% (9972 of 9972 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-01-20 23:57:44 +01:00
JamesJCode 6af44c8ffa Show full component class string in pcb properties panel
Currently, the human-readable component class is shown in the info
bar. For multiple component classes, this means that not all will
be readable. Showing the formal ordered string in the properties
panel mitigates this issue.
2025-01-20 22:56:26 +00:00
Alex Shvartzkop 0216b186aa Disable Bezier and Table tools when no footprint is loaded. 2025-01-21 01:15:22 +03:00
Seth Hillbrand abbdea4412 Correct rotations for flipped parts
Rotation is always seen as clockwise from the top of the board in 2581

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19675
2025-01-20 12:09:56 -08:00
Alex Shvartzkop 689441ebab Fix image size in Layer selector in Properties panel on hidpi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13105

(cherry picked from commit 8b24496b79)
2025-01-20 22:15:52 +03:00
Jeff Young 062a03c3aa Only test existing layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19694
2025-01-20 18:28:33 +00:00
Jeff Young 8a0bff7351 Improved naming. 2025-01-20 18:28:33 +00:00
jean-pierre charras ca5f867957 F3D viewer: fix incorrect code in commit becaba53 2025-01-20 17:47:34 +01:00
jean-pierre charras becaba531b 3D Viewer: fix incorrect render of platted copper of texts.
Previously, with option "Use bare copper color for unplated copper", the
plated area of texts were drawn using their bounding box.
2025-01-20 17:15:49 +01:00
Jeff Young 240a745aa7 Hack-fix for paste into std dialog search box.
It's hard to know how widely this fix needs to be
applied, but this should at least get most of the
cases.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19684
2025-01-20 12:58:00 +00:00
Wayne Stambaugh db877e6a00 Fix Eagle schematic import issue.
Handle duplicate symbol library names with Eagle URN notation.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19666
2025-01-20 07:28:25 -05:00
Jeff Young 5e6795a774 Ellipsis for Edit Table Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19682
2025-01-20 11:39:50 +00:00
Jeff Young 44840c7df2 Don't expose Default Font selection in PCBNew. 2025-01-20 11:30:46 +00:00
Jeff Young 6b6729284c Remove default line styles from all items except eeschema wires and buses. 2025-01-20 11:30:46 +00:00
Jeff Young c50ce416f2 Consistency in panel layout. 2025-01-20 11:30:45 +00:00
Jon Evans dd20d464f3 Turn KICAD_USE_CMAKE_FINDPROTOBUF on for old containers 2025-01-19 23:58:07 -05:00
Seth Hillbrand 867e6858c8 Handle paste special case when converting bitmap
Library export to file requires a library container but when pasting, we
paste into an existing library, so we need to skip the library header.

Long term solution would be to allow pasting library with multiple
symbols into existing library

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19688
2025-01-19 17:46:54 -08:00
Seth Hillbrand 1abfc13755 Get Autoplace tool to skip locks
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19690

(cherry picked from commit 614b327d23)
2025-01-19 17:29:57 -08:00
Seth Hillbrand f226287360 Minor adjustments to autoplace
Don't use FP bbox with text when placing footprints
Don't do unneeded poly calculation when initial work is only with
bounding box

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

(cherry picked from commit e0c57b7f20)
2025-01-19 17:29:57 -08:00
Alex Shvartzkop 775b768833 Fix VRML layer Z positions after v9 layer changes.
https://gitlab.com/kicad/code/kicad/-/issues/19608
2025-01-20 03:30:38 +03:00
Alex Shvartzkop 0118d7fb38 Raytracing: use all lights in preview mode.
It's not significantly slower, but looks much better.

Related: https://gitlab.com/kicad/code/kicad/-/issues/17354
2025-01-19 23:52:02 +03:00
Alex Shvartzkop 6b3396ea2d Raytracing: convert from linear RGB to sRGB in preview mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17354
2025-01-19 23:52:02 +03:00
Alex Shvartzkop 87c42db898 Raytracing: fix orthogonal camera frustum normal calculations.
Normal values were very close to 0 in orthogonal camera projection,
causing issues on the arm64/macOS platform.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18207
2025-01-19 23:52:02 +03:00
Jeff Young e85f1bea0c Fix bugs in SyncPinMode.
In particular an errant else, and calling ChangeLength()
after SetPosition().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18566
2025-01-19 13:07:10 +00:00
Alex Shvartzkop e0c61e6069 Fix error with ARG_LIGHT_SIDE_ELEVATION in CLI. 2025-01-19 02:44:10 +03:00
Jeff Young f0d1052547 Check for missing courtyards in footprint checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19678
2025-01-18 20:51:24 +00:00
Wayne Stambaugh d53ed205f2 CvPcb and Eeschema part 1 housekeeping. 2025-01-18 14:31:15 -05:00
Jon Evans 975fe32fa7 Add a mechanism for using a mock config dir for QA tests 2025-01-18 13:40:38 -05:00
Jeff Young b582f178dd nullptr safety 2025-01-18 16:13:32 +00:00
John Beard 6423571349 Account for origin transforms in WX_PT_ENTRY_DIALOG
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19673
2025-01-19 00:08:20 +08:00
Jon Evans 7993daecf0 Don't use stdout monitor for actions 2025-01-18 10:23:10 -05:00
Jon Evans 6122fca858 Change default for KICAD_USE_CMAKE_FINDPROTOBUF 2025-01-18 10:23:10 -05:00
lucas e6eff2ce27 Simulator: Fix live view (regression)
- Fixes regression from commit 1fc3068d
- Traces were not updated while simulation was running
2025-01-18 15:11:02 +00:00
Jeff Young 24ec25a24c Update layer infrastructure in Image Converter.
(Also cleans up the interface a little.)
2025-01-18 14:33:03 +00:00
Jeff Young 3a3e2fe835 Clear status at start of jobset run. 2025-01-18 14:33:03 +00:00
Jon Evans d74744596e Fix application of component class to memberOfFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19663
2025-01-18 09:14:28 -05:00
Jon Evans cd403a27a9 SWIG: re-wrap LSET::FmtHex and co
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19546
2025-01-18 09:04:25 -05:00
jean-pierre charras 8557deec54 job export pos Gerber X3: fix incorrect filename of back side.
Fix also a shadowed var.
2025-01-18 10:43:35 +01:00
Seth Hillbrand a1fa0bdb0b Make newly added symbol fields invisible
Also place them coincident with the symbol

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19671
2025-01-17 17:46:44 -08:00
Seth Hillbrand c16d403dd0 Do not iterate over lists you are modifying
The iterator changes when you modify the list, leading to unpredictable
results.  Using the count, working from the back ensures that our list
is stable when removing fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19672
2025-01-17 17:40:35 -08:00
Seth Hillbrand 7972ba84fa Be sure to update the ODB++ filename when loading
Otherwise, we get .zip extension but uncompressed file handling
2025-01-17 17:05:12 -08:00
Seth Hillbrand 1259e6057a Correct ODB++ attribute output
System attributes should be prefixed by the . while user-defined
attributes can be freeform ASCII

Adds DNP & Component Type for footprints to ODB++ export
2025-01-17 15:46:55 -08:00
Jeff Young b933d3228f Reduce warnings. 2025-01-17 22:07:07 +00:00
Jeff Young a1fbff35e8 Formatting. 2025-01-17 22:07:07 +00:00
864 changed files with 326488 additions and 145675 deletions
+2 -1
View File
@@ -65,6 +65,7 @@ Coverity:
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DKICAD_STDLIB_LIGHT_DEBUG=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_USE_CMAKE_FINDPROTOBUF=ON
- coverity/bin/cov-build --dir cov-int make -j10
- *coverity_submit
artifacts:
@@ -72,4 +73,4 @@ Coverity:
expose_as: 'Coverity log'
name: "coverity_log.txt"
paths:
- cov-int/build-log.txt
- cov-int/build-log.txt
+27 -6
View File
@@ -642,12 +642,33 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// add also this shape to the plated copper polygon list if required
if( cfg.DifferentiatePlatedCopper() )
{
if( layer == F_Cu )
item->TransformShapeToPolygon( *m_frontPlatedCopperPolys, F_Cu,
0, maxError, ERROR_INSIDE );
else if( layer == B_Cu )
item->TransformShapeToPolygon( *m_backPlatedCopperPolys, B_Cu,
0, maxError, ERROR_INSIDE );
// Note: for TEXT and TEXTBOX, TransformShapeToPolygon returns the bounding
// box shape, not the exact text shape. So it is not used for these items
if( layer == F_Cu || layer == B_Cu )
{
SHAPE_POLY_SET* platedCopperPolys = layer == F_Cu
? m_frontPlatedCopperPolys
: m_backPlatedCopperPolys;
if( item->Type() == PCB_TEXTBOX_T )
{
PCB_TEXTBOX* text_box = static_cast<PCB_TEXTBOX*>( item );
text_box->TransformTextToPolySet( *platedCopperPolys,
0, maxError, ERROR_INSIDE );
// Add box outlines
text_box->PCB_SHAPE::TransformShapeToPolygon( *platedCopperPolys, layer,
0, maxError, ERROR_INSIDE );
}
else if( item->Type() == PCB_TEXT_T )
{
static_cast<PCB_TEXT*>( item )->TransformTextToPolySet(
*platedCopperPolys,
0, maxError, ERROR_INSIDE );
}
else
item->TransformShapeToPolygon( *platedCopperPolys, layer,
0, maxError, ERROR_INSIDE );
}
}
}
}
+6
View File
@@ -48,6 +48,12 @@ COLOR_RGBA::COLOR_RGBA( const SFVEC4F& aColor )
}
COLOR_RGBA::operator SFVEC4F() const
{
return SFVEC4F( r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f );
}
COLOR_RGBA BlendColor( const COLOR_RGBA& aC1, const COLOR_RGBA& aC2 )
{
const unsigned int r = aC1.r + aC2.r;
+2
View File
@@ -60,6 +60,8 @@ union COLOR_RGBA
b = aB;
a = aA;
}
operator SFVEC4F() const;
};
@@ -42,10 +42,15 @@ void FRUSTUM::GenerateFrustum( const RAY& topLeft, const RAY& topRight, const RA
m_point[2] = bottomLeft.m_Origin;
m_point[3] = topLeft.m_Origin;
m_normals[0] = glm::cross( topRight.m_Dir, topLeft.m_Dir ); // TOP
m_normals[1] = glm::cross( bottomRight.m_Dir, topRight.m_Dir ); // RIGHT
m_normals[2] = glm::cross( bottomLeft.m_Dir, bottomRight.m_Dir ); // BOTTOM
m_normals[3] = glm::cross( topLeft.m_Dir, bottomLeft.m_Dir ); // LEFT
SFVEC3F tl_tr = topRight.m_Origin - topLeft.m_Origin;
SFVEC3F tr_br = bottomRight.m_Origin - topRight.m_Origin;
SFVEC3F br_bl = bottomLeft.m_Origin - bottomRight.m_Origin;
SFVEC3F bl_tl = topLeft.m_Origin - bottomLeft.m_Origin;
m_normals[0] = glm::cross( tl_tr, topLeft.m_Dir ); // TOP
m_normals[1] = glm::cross( tr_br, topRight.m_Dir ); // RIGHT
m_normals[2] = glm::cross( br_bl, bottomRight.m_Dir ); // BOTTOM
m_normals[3] = glm::cross( bl_tl, bottomLeft.m_Dir ); // LEFT
}
@@ -37,6 +37,53 @@
#include <wx/log.h>
#ifdef USE_SRGB_SPACE
/// @todo This should be removed in future when KiCad supports a greater version of glm lib.
#define SRGB_GAMA 2.4f
// This function implements the conversion from linear RGB to sRGB
// https://github.com/g-truc/glm/blob/master/glm/gtc/color_space.inl#L12
static SFVEC3F convertLinearToSRGB( const SFVEC3F& aRGBcolor )
{
const float gammaCorrection = 1.0f / SRGB_GAMA;
const SFVEC3F clampedColor = glm::clamp( aRGBcolor, SFVEC3F( 0.0f ), SFVEC3F( 1.0f ) );
return glm::mix( glm::pow( clampedColor, SFVEC3F(gammaCorrection) ) * 1.055f - 0.055f,
clampedColor * 12.92f,
glm::lessThan( clampedColor, SFVEC3F(0.0031308f) ) );
}
static SFVEC4F convertLinearToSRGBA( const SFVEC4F& aRGBAcolor )
{
return SFVEC4F( convertLinearToSRGB( SFVEC3F( aRGBAcolor ) ), aRGBAcolor.a );
}
// This function implements the conversion from sRGB to linear RGB
// https://github.com/g-truc/glm/blob/master/glm/gtc/color_space.inl#L35
SFVEC3F ConvertSRGBToLinear( const SFVEC3F& aSRGBcolor )
{
const float gammaCorrection = SRGB_GAMA;
return glm::mix( glm::pow( ( aSRGBcolor + SFVEC3F( 0.055f ) )
* SFVEC3F( 0.94786729857819905213270142180095f ),
SFVEC3F( gammaCorrection ) ),
aSRGBcolor * SFVEC3F( 0.07739938080495356037151702786378f ),
glm::lessThanEqual( aSRGBcolor, SFVEC3F( 0.04045f ) ) );
}
SFVEC4F ConvertSRGBAToLinear( const SFVEC4F& aSRGBAcolor )
{
return SFVEC4F( ConvertSRGBToLinear( SFVEC3F( aSRGBAcolor ) ), aSRGBAcolor.a );
}
#endif
RENDER_3D_RAYTRACE_BASE::RENDER_3D_RAYTRACE_BASE( BOARD_ADAPTER& aAdapter, CAMERA& aCamera ) :
RENDER_3D_BASE( aAdapter, aCamera ),
m_postShaderSsao( aCamera )
@@ -116,6 +163,19 @@ static inline void SetPixel( uint8_t* p, const COLOR_RGBA& v )
}
static void SetPixelSRGBA( uint8_t* p, const COLOR_RGBA& v )
{
SFVEC4F color = v;
#ifdef USE_SRGB_SPACE
color = convertLinearToSRGB( color );
#endif
COLOR_RGBA rgba( color );
SetPixel( p, rgba );
}
SFVEC4F RENDER_3D_RAYTRACE_BASE::premultiplyAlpha( const SFVEC4F& aInput )
{
return SFVEC4F( aInput.r * aInput.a, aInput.g * aInput.a, aInput.b * aInput.a, aInput.a );
@@ -238,53 +298,6 @@ void RENDER_3D_RAYTRACE_BASE::renderTracing( uint8_t* ptrPBO, REPORTER* aStatusR
}
#ifdef USE_SRGB_SPACE
/// @todo This should be removed in future when KiCad supports a greater version of glm lib.
#define SRGB_GAMA 2.4f
// This function implements the conversion from linear RGB to sRGB
// https://github.com/g-truc/glm/blob/master/glm/gtc/color_space.inl#L12
static SFVEC3F convertLinearToSRGB( const SFVEC3F& aRGBcolor )
{
const float gammaCorrection = 1.0f / SRGB_GAMA;
const SFVEC3F clampedColor = glm::clamp( aRGBcolor, SFVEC3F( 0.0f ), SFVEC3F( 1.0f ) );
return glm::mix( glm::pow( clampedColor, SFVEC3F(gammaCorrection) ) * 1.055f - 0.055f,
clampedColor * 12.92f,
glm::lessThan( clampedColor, SFVEC3F(0.0031308f) ) );
}
static SFVEC4F convertLinearToSRGBA( const SFVEC4F& aRGBAcolor )
{
return SFVEC4F( convertLinearToSRGB( SFVEC3F( aRGBAcolor ) ), aRGBAcolor.a );
}
// This function implements the conversion from sRGB to linear RGB
// https://github.com/g-truc/glm/blob/master/glm/gtc/color_space.inl#L35
SFVEC3F ConvertSRGBToLinear( const SFVEC3F& aSRGBcolor )
{
const float gammaCorrection = SRGB_GAMA;
return glm::mix( glm::pow( ( aSRGBcolor + SFVEC3F( 0.055f ) )
* SFVEC3F( 0.94786729857819905213270142180095f ),
SFVEC3F( gammaCorrection ) ),
aSRGBcolor * SFVEC3F( 0.07739938080495356037151702786378f ),
glm::lessThanEqual( aSRGBcolor, SFVEC3F( 0.04045f ) ) );
}
SFVEC4F ConvertSRGBAToLinear( const SFVEC4F& aSRGBAcolor )
{
return SFVEC4F( ConvertSRGBToLinear( SFVEC3F( aSRGBAcolor ) ), aSRGBAcolor.a );
}
#endif
void RENDER_3D_RAYTRACE_BASE::renderFinalColor( uint8_t* ptrPBO, const SFVEC4F& rgbColor,
bool applyColorSpaceConversion )
{
@@ -791,6 +804,10 @@ void RENDER_3D_RAYTRACE_BASE::renderPreview( uint8_t* ptrPBO )
{
m_isPreview = true;
m_backgroundColorTop = ConvertSRGBAToLinear( premultiplyAlpha( m_boardAdapter.m_BgColorTop ) );
m_backgroundColorBottom =
ConvertSRGBAToLinear( premultiplyAlpha( m_boardAdapter.m_BgColorBot ) );
std::atomic<size_t> nextBlock( 0 );
std::atomic<size_t> threadsFinished( 0 );
@@ -827,8 +844,8 @@ void RENDER_3D_RAYTRACE_BASE::renderPreview( uint8_t* ptrPBO )
// Calculate background gradient color
SFVEC4F bgColor[RAYPACKET_DIM];
SFVEC4F bgTopColor = premultiplyAlpha( m_boardAdapter.m_BgColorTop );
SFVEC4F bgBotColor = premultiplyAlpha( m_boardAdapter.m_BgColorBot );
SFVEC4F bgTopColor = m_backgroundColorTop;
SFVEC4F bgBotColor = m_backgroundColorBottom;
for( unsigned int y = 0; y < RAYPACKET_DIM; ++y )
{
@@ -1350,28 +1367,29 @@ void RENDER_3D_RAYTRACE_BASE::renderPreview( uint8_t* ptrPBO )
&ptrPBO[( 4 * x + m_blockPositionsFast[iBlock].x
+ m_realBufferSize.x
* ( m_blockPositionsFast[iBlock].y + 4 * y ) ) * 4];
SetPixel( ptr + 0, cLT );
SetPixel( ptr + 4, BlendColor( cLT, cLRT, cLTC ) );
SetPixel( ptr + 8, cLRT );
SetPixel( ptr + 12, BlendColor( cLRT, cRT, cRTC ) );
SetPixelSRGBA( ptr + 0, cLT );
SetPixelSRGBA( ptr + 4, BlendColor( cLT, cLRT, cLTC ) );
SetPixelSRGBA( ptr + 8, cLRT );
SetPixelSRGBA( ptr + 12, BlendColor( cLRT, cRT, cRTC ) );
ptr += m_realBufferSize.x * 4;
SetPixel( ptr + 0, BlendColor( cLT , cLTB, cLTC ) );
SetPixel( ptr + 4, BlendColor( cLTC, BlendColor( cLT , cC ) ) );
SetPixel( ptr + 8, BlendColor( cC, BlendColor( cLRT, cLTC, cRTC ) ) );
SetPixel( ptr + 12, BlendColor( cRTC, BlendColor( cRT , cC ) ) );
SetPixelSRGBA( ptr + 0, BlendColor( cLT , cLTB, cLTC ) );
SetPixelSRGBA( ptr + 4, BlendColor( cLTC, BlendColor( cLT , cC ) ) );
SetPixelSRGBA( ptr + 8, BlendColor( cC, BlendColor( cLRT, cLTC, cRTC ) ) );
SetPixelSRGBA( ptr + 12, BlendColor( cRTC, BlendColor( cRT , cC ) ) );
ptr += m_realBufferSize.x * 4;
SetPixel( ptr + 0, cLTB );
SetPixel( ptr + 4, BlendColor( cC, BlendColor( cLTB, cLTC, cLBC ) ) );
SetPixel( ptr + 8, cC );
SetPixel( ptr + 12, BlendColor( cC, BlendColor( cRTB, cRTC, cRBC ) ) );
SetPixelSRGBA( ptr + 0, cLTB );
SetPixelSRGBA( ptr + 4, BlendColor( cC, BlendColor( cLTB, cLTC, cLBC ) ) );
SetPixelSRGBA( ptr + 8, cC );
SetPixelSRGBA( ptr + 12, BlendColor( cC, BlendColor( cRTB, cRTC, cRBC ) ) );
ptr += m_realBufferSize.x * 4;
SetPixel( ptr + 0, BlendColor( cLB , cLTB, cLBC ) );
SetPixel( ptr + 4, BlendColor( cLBC, BlendColor( cLB , cC ) ) );
SetPixel( ptr + 8, BlendColor( cC, BlendColor( cLRB, cLBC, cRBC ) ) );
SetPixel( ptr + 12, BlendColor( cRBC, BlendColor( cRB , cC ) ) );
SetPixelSRGBA( ptr + 0, BlendColor( cLB , cLTB, cLBC ) );
SetPixelSRGBA( ptr + 4, BlendColor( cLBC, BlendColor( cLB , cC ) ) );
SetPixelSRGBA( ptr + 8, BlendColor( cC, BlendColor( cLRB, cLBC, cRBC ) ) );
SetPixelSRGBA( ptr + 12, BlendColor( cRBC, BlendColor( cRB , cC ) ) );
}
}
}
@@ -1425,9 +1443,6 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a
light->GetLightParameters( hitPoint, vectorToLight, colorOfLight, distToLight );
if( m_isPreview )
colorOfLight = SFVEC3F( 1.0f );
const float NdotL = glm::dot( aHitInfo.m_HitNormal, vectorToLight );
// Only calc shade if the normal is facing the direction of light,
@@ -1496,10 +1511,6 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a
shadow_att_factor_light ),
1.0 );
}
// Only use the headlight for preview
if( m_isPreview )
break;
}
// Improvement: this is not taking in account the lightcolor
+1 -1
View File
@@ -65,7 +65,7 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
KiBitmapBundle( BITMAPS::render_mode ),
KiBitmapBundle( BITMAPS::ray_tracing ),
_( "Render current view using Raytracing" ), wxITEM_CHECK );
m_mainToolBar->AddScaledSeparator( this );
+2 -2
View File
@@ -634,12 +634,12 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
}
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( int aFlags )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ) );
// Regen menu bars, etc
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
EDA_BASE_FRAME::CommonSettingsChanged( aFlags );
// There is no base class that handles toolbars for this frame
ReCreateMainToolbar();
+1 -1
View File
@@ -114,7 +114,7 @@ public:
* This would be private (and only called by the Kiway), but we need to do this manually
* from the PCB frame because the 3D viewer isn't updated via the #KIWAY.
*/
void CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) override;
void CommonSettingsChanged( int aFlags ) override;
void ShowChangedLanguage() override;
APPEARANCE_CONTROLS_3D* GetAppearanceManager() { return m_appearancePanel; }
+1 -1
View File
@@ -90,7 +90,7 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_bpvRight->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_right ) );
m_bpvBottom->SetBitmap( KiBitmapBundle( BITMAPS::axis3d_bottom ) );
m_bpvISO->SetBitmap( KiBitmapBundle( BITMAPS::ortho ) );
m_bpvBodyStyle->SetBitmap( KiBitmapBundle( BITMAPS::axis3d ) );
m_bpvBodyStyle->SetBitmap( KiBitmapBundle( BITMAPS::show_board_body ) );
m_bpUpdate->SetBitmap( KiBitmapBundle( BITMAPS::reload ) );
m_bpSettings->SetBitmap( KiBitmapBundle( BITMAPS::options_3drender ) );
@@ -196,7 +196,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
bSizer3DButtons->Add( 0, 14, 0, wxEXPAND, 5 );
m_bpvISO = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
m_bpvISO->SetToolTip( _("Enable/disable orthographic projection") );
@@ -238,10 +238,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
bSizer3DButtons->Add( m_bpUpdate, 0, wxTOP, 5 );
m_bpSettings = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bSizer3DButtons->Add( m_bpSettings, 0, wxTOP, 5 );
bSizer3DButtons->Add( 0, 10, 1, wxEXPAND, 5 );
bSizer3DButtons->Add( m_bpSettings, 0, wxTOP|wxBOTTOM, 5 );
bSizermain->Add( bSizer3DButtons, 0, wxEXPAND|wxRIGHT, 5 );
@@ -2075,9 +2075,9 @@
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<property name="proportion">0</property>
<object class="spacer" expanded="true">
<property name="height">0</property>
<property name="height">14</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
@@ -2779,7 +2779,7 @@
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxTOP</property>
<property name="flag">wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" expanded="true">
<property name="BottomDockable">1</property>
@@ -2852,16 +2852,6 @@
<event name="OnButtonClick">View3DSettings</event>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="true">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
</object>
</object>
</object>
+8 -13
View File
@@ -165,15 +165,9 @@ cmake_dependent_option( KICAD_APPLE_MAKE_RELOCATEABLE_BUNDLE
"On macOS, post-process the build to make it relocateable (default ON)"
ON "APPLE" OFF )
# CMake's FindProtobuf module doesn't work correctly on MacOS or Windows but is
# required for Linux
if( UNIX_NOT_APPLE )
set( KICAD_CMAKE_PROTOBUF_DEFAULT ON )
else()
set( KICAD_CMAKE_PROTOBUF_DEFAULT OFF )
endif()
option( KICAD_USE_CMAKE_FINDPROTOBUF "Use FindProtobuf provided by CMake" ${KICAD_CMAKE_PROTOBUF_DEFAULT} )
# Old versions of CMake and/or protobuf can require the FindProtobuf.cmake,
# but modern platforms require this to be off
option( KICAD_USE_CMAKE_FINDPROTOBUF "Use FindProtobuf provided by CMake" OFF )
mark_as_advanced( KICAD_USE_CMAKE_FINDPROTOBUF )
####################################
@@ -532,10 +526,6 @@ if( MSVC )
add_compile_definitions( NOMINMAX )
# source and execution charset are UTF-8
string( APPEND CMAKE_CXX_FLAGS " /utf-8" )
# C4290: throw() is interpreted as declspec(nothrow)
string( APPEND CMAKE_CXX_FLAGS " /wd4290" )
# C4800: non-bool is explicitly cast to bool, forcing value of 0 or 1
string( APPEND CMAKE_CXX_FLAGS " /wd4800" )
# cmake 3.25 or higher requried for MSVC, should be fine
if( USE_CCACHE AND CCACHE_FOUND )
@@ -550,6 +540,8 @@ if( MSVC )
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /Zc:inline: enforces C++11 requirement that inline functions must have a definition in the same unit
string( APPEND CMAKE_CXX_FLAGS " /Zc:inline" )
# /GF: enable string pooling
string( APPEND CMAKE_CXX_FLAGS_RELEASE " /GF" )
string( APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " /GF" )
@@ -607,6 +599,9 @@ if( MSVC )
if( KICAD_WIN32_BUILD_PARALLEL_CL_MP )
string( APPEND CMAKE_CXX_FLAGS " /MP" )
endif()
set( CMAKE_INSTALL_UCRT_LIBRARIES TRUE )
include( InstallRequiredSystemLibraries )
endif()
# KIFACE_SUFFIX is the file extension used for top level program modules which
@@ -326,6 +326,47 @@ message GetBoundingBoxResponse
repeated kiapi.common.types.Box2 boxes = 2;
}
// Retrieves a list of items. Returns SelectionResponse
message GetSelection
{
// Specifies which document to query for selected items.
kiapi.common.types.ItemHeader header = 1;
// An optional list of types to filter on.
// If none are provided, all selected items will be returned.
repeated kiapi.common.types.KiCadObjectType types = 2;
}
// The set of currently selected items
message SelectionResponse
{
repeated google.protobuf.Any items = 1;
}
// Adds the given items to the selection. Returns SelectionResponse
message AddToSelection
{
kiapi.common.types.ItemHeader header = 1;
// The items to select
repeated kiapi.common.types.KIID items = 2;
}
// Removes the given items to the selection. Returns SelectionResponse
message RemoveFromSelection
{
kiapi.common.types.ItemHeader header = 1;
// The items to deselect
repeated kiapi.common.types.KIID items = 2;
}
// Removes all items from selection
message ClearSelection
{
kiapi.common.types.ItemHeader header = 1;
}
// Tests if a certain point falls within tolerance of an item's geometry
message HitTest
{
+40 -58
View File
@@ -30,14 +30,13 @@
#include <bitmaps.h>
#include <common.h>
#include <id.h>
#include <kiface_base.h>
#include <pgm_base.h>
#include <widgets/wx_menubar.h>
#include <wildcards_and_files_ext.h>
#include <file_history.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tool/common_control.h>
#include <tool/action_manager.h>
#include <bitmap2cmp_control.h>
#include <tool/actions.h>
@@ -333,8 +332,8 @@ void BITMAP2CMP_FRAME::ShowChangedLanguage()
mainSizer->Add( m_panel, 1, wxEXPAND, 5 );
Layout();
if( !m_bitmapFileName.IsEmpty() )
OpenProjectFiles( std::vector<wxString>( 1, m_bitmapFileName ) );
if( !m_srcFileName.IsEmpty() )
OpenProjectFiles( std::vector<wxString>( 1, m_srcFileName ) );
LoadSettings( config() );
m_panel->SetOutputSize( imageSizeX, imageSizeY );
@@ -348,9 +347,9 @@ void BITMAP2CMP_FRAME::UpdateTitle()
{
wxString title;
if( !m_bitmapFileName.IsEmpty() )
if( !m_srcFileName.IsEmpty() )
{
wxFileName filename( m_bitmapFileName );
wxFileName filename( m_srcFileName );
title = filename.GetFullName() + wxT( " \u2014 " );
}
@@ -364,12 +363,10 @@ void BITMAP2CMP_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
{
EDA_BASE_FRAME::LoadSettings( aCfg );
BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg );
if( cfg )
if( BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg ) )
{
m_bitmapFileName = cfg->m_BitmapFileName;
m_convertedFileName = cfg->m_ConvertedFileName;
m_srcFileName = cfg->m_BitmapFileName;
m_outFileName = cfg->m_ConvertedFileName;
m_panel->LoadSettings( cfg );
}
}
@@ -379,12 +376,10 @@ void BITMAP2CMP_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
{
EDA_BASE_FRAME::SaveSettings( aCfg );
BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg );
if( cfg )
if( BITMAP2CMP_SETTINGS* cfg = dynamic_cast<BITMAP2CMP_SETTINGS*>( aCfg ) )
{
cfg->m_BitmapFileName = m_bitmapFileName;
cfg->m_ConvertedFileName = m_convertedFileName;
cfg->m_BitmapFileName = m_srcFileName;
cfg->m_ConvertedFileName = m_outFileName;
m_panel->SaveSettings( cfg );
}
}
@@ -392,7 +387,7 @@ void BITMAP2CMP_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
void BITMAP2CMP_FRAME::OnLoadFile()
{
wxFileName fn( m_bitmapFileName );
wxFileName fn( m_srcFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
@@ -402,9 +397,7 @@ void BITMAP2CMP_FRAME::OnLoadFile()
_( "Image Files" ) + wxS( " " )+ wxImage::GetImageExtWildcard(),
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
int diag = fileDlg.ShowModal();
if( diag != wxID_OK )
if( fileDlg.ShowModal() != wxID_OK )
return;
wxString fullFilename = fileDlg.GetPath();
@@ -422,11 +415,11 @@ void BITMAP2CMP_FRAME::OnLoadFile()
bool BITMAP2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl )
{
m_bitmapFileName = aFileSet[0];
m_srcFileName = aFileSet[0];
if( m_panel->OpenProjectFiles( aFileSet, aCtl ) )
{
UpdateFileHistory( m_bitmapFileName );
UpdateFileHistory( m_srcFileName );
return true;
}
@@ -436,7 +429,7 @@ bool BITMAP2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet,
void BITMAP2CMP_FRAME::ExportDrawingSheetFormat()
{
wxFileName fn( m_convertedFileName );
wxFileName fn( m_outFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
@@ -444,28 +437,24 @@ void BITMAP2CMP_FRAME::ExportDrawingSheetFormat()
wxFileDialog fileDlg( this, _( "Create Drawing Sheet File" ), path, wxEmptyString,
FILEEXT::DrawingSheetFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
int diag = fileDlg.ShowModal();
if( diag != wxID_OK )
if( fileDlg.ShowModal() != wxID_OK )
return;
fn = fileDlg.GetPath();
fn.SetExt( FILEEXT::DrawingSheetFileExtension );
m_convertedFileName = fn.GetFullPath();
m_outFileName = fn.GetFullPath();
FILE* outfile;
outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
FILE* outfile = wxFopen( m_outFileName, wxT( "w" ) );
if( outfile == nullptr )
if( !outfile )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
wxMessageBox( msg );
wxMessageBox( wxString::Format( _( "File '%s' could not be created." ), m_outFileName ) );
return;
}
std::string buffer;
m_panel->ExportToBuffer( buffer, KICAD_WKS_LOGO );
m_panel->ExportToBuffer( buffer, DRAWING_SHEET_FMT );
fputs( buffer.c_str(), outfile );
fclose( outfile );
}
@@ -473,7 +462,7 @@ void BITMAP2CMP_FRAME::ExportDrawingSheetFormat()
void BITMAP2CMP_FRAME::ExportPostScriptFormat()
{
wxFileName fn( m_convertedFileName );
wxFileName fn( m_outFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
@@ -487,16 +476,13 @@ void BITMAP2CMP_FRAME::ExportPostScriptFormat()
fn = fileDlg.GetPath();
fn.SetExt( wxT( "ps" ) );
m_convertedFileName = fn.GetFullPath();
m_outFileName = fn.GetFullPath();
FILE* outfile;
outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
FILE* outfile = wxFopen( m_outFileName, wxT( "w" ) );
if( outfile == nullptr )
if( !outfile )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
wxMessageBox( msg );
wxMessageBox( wxString::Format( _( "File '%s' could not be created." ), m_outFileName ) );
return;
}
@@ -509,10 +495,10 @@ void BITMAP2CMP_FRAME::ExportPostScriptFormat()
void BITMAP2CMP_FRAME::ExportEeschemaFormat()
{
wxFileName fn( m_convertedFileName );
wxFileName fn( m_outFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists(path) )
if( path.IsEmpty() || !wxDirExists( path ) )
path = ::wxGetCwd();
wxFileDialog fileDlg( this, _( "Create Symbol Library" ), path, wxEmptyString,
@@ -523,20 +509,18 @@ void BITMAP2CMP_FRAME::ExportEeschemaFormat()
return;
fn = EnsureFileExtension( fileDlg.GetPath(), FILEEXT::KiCadSymbolLibFileExtension );
m_convertedFileName = fn.GetFullPath();
m_outFileName = fn.GetFullPath();
FILE* outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
FILE* outfile = wxFopen( m_outFileName, wxT( "w" ) );
if( outfile == nullptr )
if( !outfile )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
wxMessageBox( msg );
wxMessageBox( wxString::Format( _( "File '%s' could not be created." ), m_outFileName ) );
return;
}
std::string buffer;
m_panel->ExportToBuffer( buffer, EESCHEMA_FMT );
m_panel->ExportToBuffer( buffer, SYMBOL_FMT );
fputs( buffer.c_str(), outfile );
fclose( outfile );
}
@@ -544,7 +528,7 @@ void BITMAP2CMP_FRAME::ExportEeschemaFormat()
void BITMAP2CMP_FRAME::ExportPcbnewFormat()
{
wxFileName fn( m_convertedFileName );
wxFileName fn( m_outFileName );
wxString path = fn.GetPath();
if( path.IsEmpty() || !wxDirExists( path ) )
@@ -558,20 +542,18 @@ void BITMAP2CMP_FRAME::ExportPcbnewFormat()
return;
fn = EnsureFileExtension( fileDlg.GetPath(), FILEEXT::KiCadFootprintFileExtension );
m_convertedFileName = fn.GetFullPath();
m_outFileName = fn.GetFullPath();
FILE* outfile = wxFopen( m_convertedFileName, wxT( "w" ) );
FILE* outfile = wxFopen( m_outFileName, wxT( "w" ) );
if( outfile == nullptr )
if( !outfile )
{
wxString msg;
msg.Printf( _( "File '%s' could not be created." ), m_convertedFileName );
wxMessageBox( msg );
wxMessageBox( wxString::Format( _( "File '%s' could not be created." ), m_outFileName ) );
return;
}
std::string buffer;
m_panel->ExportToBuffer( buffer, PCBNEW_KICAD_MOD );
m_panel->ExportToBuffer( buffer, FOOTPRINT_FMT );
fputs( buffer.c_str(), outfile );
fclose( outfile );
m_mruPath = fn.GetPath();
+2 -2
View File
@@ -88,8 +88,8 @@ private:
BITMAP2CMP_PANEL* m_panel;
wxStatusBar* m_statusBar;
wxString m_bitmapFileName;
wxString m_convertedFileName;
wxString m_srcFileName;
wxString m_outFileName;
};
#endif// BITMOP2CMP_GUI_H_
+112 -123
View File
@@ -27,11 +27,8 @@
#include <bitmap2cmp_panel.h>
#include <bitmap2cmp_settings.h>
#include <bitmap_io.h>
#include <bitmaps.h>
#include <common.h>
#include <kiface_base.h>
#include <math/util.h> // for KiROUND
#include <pgm_base.h>
#include <potracelib.h>
#include <wx/clipbrd.h>
#include <wx/rawbmp.h>
@@ -44,10 +41,11 @@
BITMAP2CMP_PANEL::BITMAP2CMP_PANEL( BITMAP2CMP_FRAME* aParent ) :
BITMAP2CMP_PANEL_BASE( aParent ),
m_parentFrame( aParent ), m_negative( false ),
m_parentFrame( aParent ),
m_negative( false ),
m_aspectRatio( 1.0 )
{
for( wxString unit : { _( "mm" ), _( "Inch" ), _( "DPI" ) } )
for( const wxString& unit : { _( "mm" ), _( "Inch" ), _( "DPI" ) } )
m_PixelUnit->Append( unit );
m_outputSizeX.SetUnit( getUnitFromSelection() );
@@ -55,19 +53,14 @@ BITMAP2CMP_PANEL::BITMAP2CMP_PANEL( BITMAP2CMP_FRAME* aParent ) :
m_outputSizeX.SetOutputSize( 0, getUnitFromSelection() );
m_outputSizeY.SetOutputSize( 0, getUnitFromSelection() );
m_UnitSizeX->ChangeValue( FormatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( FormatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_UnitSizeX->ChangeValue( formatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( formatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_buttonExportFile->Enable( false );
m_buttonExportClipboard->Enable( false );
}
BITMAP2CMP_PANEL::~BITMAP2CMP_PANEL()
{
}
wxWindow* BITMAP2CMP_PANEL::GetCurrentPage()
{
return m_Notebook->GetCurrentPage();
@@ -76,12 +69,8 @@ wxWindow* BITMAP2CMP_PANEL::GetCurrentPage()
void BITMAP2CMP_PANEL::LoadSettings( BITMAP2CMP_SETTINGS* cfg )
{
int u_select = cfg->m_Units;
if( u_select < 0 || u_select > 2 ) // Validity control
u_select = 0;
m_PixelUnit->SetSelection( u_select );
if( cfg->m_Units >= 0 && cfg->m_Units < (int) m_PixelUnit->GetCount() )
m_PixelUnit->SetSelection( cfg->m_Units );
m_sliderThreshold->SetValue( cfg->m_Threshold );
@@ -91,32 +80,31 @@ void BITMAP2CMP_PANEL::LoadSettings( BITMAP2CMP_SETTINGS* cfg )
m_aspectRatio = 1.0;
m_aspectRatioCheckbox->SetValue( true );
int format = cfg->m_LastFormat;
switch( cfg->m_LastFormat )
{
default:
case FOOTPRINT_FMT: m_rbFootprint->SetValue( true ); break;
case SYMBOL_FMT:
case SYMBOL_PASTE_FMT: m_rbSymbol->SetValue( true ); break;
case POSTSCRIPT_FMT: m_rbPostscript->SetValue( true ); break;
case DRAWING_SHEET_FMT: m_rbWorksheet->SetValue( true ); break;
}
if( format < 0 || format > FINAL_FMT )
format = PCBNEW_KICAD_MOD;
m_layerLabel->Enable( cfg->m_LastFormat == FOOTPRINT_FMT );
m_layerCtrl->Enable( cfg->m_LastFormat == FOOTPRINT_FMT );
m_rbOutputFormat->SetSelection( format );
bool enable = format == PCBNEW_KICAD_MOD;
m_chPCBLayer->Enable( enable );
int last_layer = cfg->m_LastModLayer;
if( last_layer < 0 || last_layer > static_cast<int>( MOD_LYR_FINAL ) ) // Out of range
last_layer = MOD_LYR_FSILKS;
m_chPCBLayer->SetSelection( last_layer );
if( cfg->m_LastLayer >= 0 && cfg->m_LastLayer < (int) m_layerCtrl->GetCount() )
m_layerCtrl->SetSelection( cfg->m_LastLayer );
}
void BITMAP2CMP_PANEL::SaveSettings( BITMAP2CMP_SETTINGS* cfg )
{
cfg->m_Threshold = m_sliderThreshold->GetValue();
cfg->m_Negative = m_checkNegative->IsChecked();
cfg->m_LastFormat = m_rbOutputFormat->GetSelection();
cfg->m_LastModLayer = m_chPCBLayer->GetSelection();
cfg->m_Units = m_PixelUnit->GetSelection();
cfg->m_Threshold = m_sliderThreshold->GetValue();
cfg->m_Negative = m_checkNegative->IsChecked();
cfg->m_LastFormat = getOutputFormat();
cfg->m_LastLayer = m_layerCtrl->GetSelection();
cfg->m_Units = m_PixelUnit->GetSelection();
}
@@ -244,9 +232,9 @@ bool BITMAP2CMP_PANEL::OpenProjectFiles( const std::vector<wxString>& aFileSet,
{
for( int y = 0; y < m_Pict_Bitmap.GetHeight(); y++ )
{
if( m_Pict_Image.GetRed( x, y ) == m_Pict_Image.GetMaskRed() &&
m_Pict_Image.GetGreen( x, y ) == m_Pict_Image.GetMaskGreen() &&
m_Pict_Image.GetBlue( x, y ) == m_Pict_Image.GetMaskBlue() )
if( m_Pict_Image.GetRed( x, y ) == m_Pict_Image.GetMaskRed()
&& m_Pict_Image.GetGreen( x, y ) == m_Pict_Image.GetMaskGreen()
&& m_Pict_Image.GetBlue( x, y ) == m_Pict_Image.GetMaskBlue() )
{
m_Greyscale_Image.SetRGB( x, y, 255, 255, 255 );
}
@@ -255,26 +243,26 @@ bool BITMAP2CMP_PANEL::OpenProjectFiles( const std::vector<wxString>& aFileSet,
}
if( m_negative )
NegateGreyscaleImage( );
negateGreyscaleImage();
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
m_NB_Image = m_Greyscale_Image;
Binarize( (double) m_sliderThreshold->GetValue() / m_sliderThreshold->GetMax() );
binarize( (double)m_sliderThreshold->GetValue() / m_sliderThreshold->GetMax() );
m_buttonExportFile->Enable( true );
m_buttonExportClipboard->Enable( true );
m_outputSizeX.SetOutputSizeFromInitialImageSize();
m_UnitSizeX->ChangeValue( FormatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeX->ChangeValue( formatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_outputSizeY.SetOutputSizeFromInitialImageSize();
m_UnitSizeY->ChangeValue( FormatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( formatOutputSize( m_outputSizeY.GetOutputSize() ) );
return true;
}
// return a string giving the output size, according to the selected unit
wxString BITMAP2CMP_PANEL::FormatOutputSize( double aSize )
wxString BITMAP2CMP_PANEL::formatOutputSize( double aSize )
{
wxString text;
@@ -295,13 +283,9 @@ void BITMAP2CMP_PANEL::updateImageInfo()
if( m_Pict_Bitmap.IsOk() )
{
int h = m_Pict_Bitmap.GetHeight();
int w = m_Pict_Bitmap.GetWidth();
int nb = m_Pict_Bitmap.GetDepth();
m_SizeXValue->SetLabel( wxString::Format( wxT( "%d" ), w ) );
m_SizeYValue->SetLabel( wxString::Format( wxT( "%d" ), h ) );
m_BPPValue->SetLabel( wxString::Format( wxT( "%d" ), nb ) );
m_SizeXValue->SetLabel( wxString::Format( wxT( "%d" ), m_Pict_Bitmap.GetWidth() ) );
m_SizeYValue->SetLabel( wxString::Format( wxT( "%d" ), m_Pict_Bitmap.GetHeight() ) );
m_BPPValue->SetLabel( wxString::Format( wxT( "%d" ), m_Pict_Bitmap.GetDepth() ) );
}
}
@@ -338,7 +322,7 @@ void BITMAP2CMP_PANEL::OnSizeChangeX( wxCommandEvent& event )
}
m_outputSizeY.SetOutputSize( calculatedY, getUnitFromSelection() );
m_UnitSizeY->ChangeValue( FormatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( formatOutputSize( m_outputSizeY.GetOutputSize() ) );
}
m_outputSizeX.SetOutputSize( new_size, getUnitFromSelection() );
@@ -367,7 +351,7 @@ void BITMAP2CMP_PANEL::OnSizeChangeY( wxCommandEvent& event )
}
m_outputSizeX.SetOutputSize( calculatedX, getUnitFromSelection() );
m_UnitSizeX->ChangeValue( FormatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeX->ChangeValue( formatOutputSize( m_outputSizeX.GetOutputSize() ) );
}
m_outputSizeY.SetOutputSize( new_size, getUnitFromSelection() );
@@ -383,8 +367,8 @@ void BITMAP2CMP_PANEL::OnSizeUnitChange( wxCommandEvent& event )
m_outputSizeY.SetUnit( getUnitFromSelection() );
updateImageInfo();
m_UnitSizeX->ChangeValue( FormatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( FormatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_UnitSizeX->ChangeValue( formatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( formatOutputSize( m_outputSizeY.GetOutputSize() ) );
}
@@ -394,8 +378,8 @@ void BITMAP2CMP_PANEL::SetOutputSize( const IMAGE_SIZE& aSizeX, const IMAGE_SIZE
m_outputSizeY = aSizeY;
updateImageInfo();
m_UnitSizeX->ChangeValue( FormatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( FormatOutputSize( m_outputSizeY.GetOutputSize() ) );
m_UnitSizeX->ChangeValue( formatOutputSize( m_outputSizeX.GetOutputSize() ) );
m_UnitSizeY->ChangeValue( formatOutputSize( m_outputSizeY.GetOutputSize() ) );
}
@@ -410,28 +394,25 @@ void BITMAP2CMP_PANEL::ToggleAspectRatioLock( wxCommandEvent& event )
}
void BITMAP2CMP_PANEL::Binarize( double aThreshold )
void BITMAP2CMP_PANEL::binarize( double aThreshold )
{
int h = m_Greyscale_Image.GetHeight();
int w = m_Greyscale_Image.GetWidth();
unsigned char threshold = aThreshold * 255;
unsigned char alpha_thresh = 0.7 * threshold;
for( int y = 0; y < h; y++ )
for( int y = 0; y < m_Greyscale_Image.GetHeight(); y++ )
{
for( int x = 0; x < w; x++ )
for( int x = 0; x < m_Greyscale_Image.GetWidth(); x++ )
{
unsigned char pixout;
unsigned char pixin = m_Greyscale_Image.GetGreen( x, y );
unsigned char pixel = m_Greyscale_Image.GetGreen( x, y );
unsigned char alpha = m_Greyscale_Image.HasAlpha() ? m_Greyscale_Image.GetAlpha( x, y )
: wxALPHA_OPAQUE;
if( pixin < threshold && alpha > alpha_thresh )
pixout = 0;
if( pixel < threshold && alpha > alpha_thresh )
pixel = 0;
else
pixout = 255;
pixel = 255;
m_NB_Image.SetRGB( x, y, pixout, pixout, pixout );
m_NB_Image.SetRGB( x, y, pixel, pixel, pixel );
}
}
@@ -439,19 +420,15 @@ void BITMAP2CMP_PANEL::Binarize( double aThreshold )
}
void BITMAP2CMP_PANEL::NegateGreyscaleImage( )
void BITMAP2CMP_PANEL::negateGreyscaleImage( )
{
unsigned char pix;
int h = m_Greyscale_Image.GetHeight();
int w = m_Greyscale_Image.GetWidth();
for( int y = 0; y < h; y++ )
for( int y = 0; y < m_Greyscale_Image.GetHeight(); y++ )
{
for( int x = 0; x < w; x++ )
for( int x = 0; x < m_Greyscale_Image.GetWidth(); x++ )
{
pix = m_Greyscale_Image.GetGreen( x, y );
pix = ~pix;
m_Greyscale_Image.SetRGB( x, y, pix, pix, pix );
unsigned char pixel = m_Greyscale_Image.GetGreen( x, y );
pixel = ~pixel;
m_Greyscale_Image.SetRGB( x, y, pixel, pixel, pixel );
}
}
}
@@ -461,10 +438,10 @@ void BITMAP2CMP_PANEL::OnNegativeClicked( wxCommandEvent& )
{
if( m_checkNegative->GetValue() != m_negative )
{
NegateGreyscaleImage();
negateGreyscaleImage();
m_Greyscale_Bitmap = wxBitmap( m_Greyscale_Image );
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
binarize( (double)m_sliderThreshold->GetValue() / m_sliderThreshold->GetMax() );
m_negative = m_checkNegative->GetValue();
Refresh();
@@ -474,27 +451,41 @@ void BITMAP2CMP_PANEL::OnNegativeClicked( wxCommandEvent& )
void BITMAP2CMP_PANEL::OnThresholdChange( wxScrollEvent& event )
{
Binarize( (double)m_sliderThreshold->GetValue()/m_sliderThreshold->GetMax() );
binarize( (double)m_sliderThreshold->GetValue() / m_sliderThreshold->GetMax() );
Refresh();
}
void BITMAP2CMP_PANEL::OnExportToFile( wxCommandEvent& event )
{
// choices of m_rbOutputFormat are expected to be in same order as
// OUTPUT_FMT_ID. See bitmap2component.h
OUTPUT_FMT_ID format = (OUTPUT_FMT_ID) m_rbOutputFormat->GetSelection();
exportBitmap( format );
switch( getOutputFormat() )
{
case SYMBOL_FMT:
case SYMBOL_PASTE_FMT: m_parentFrame->ExportEeschemaFormat(); break;
case FOOTPRINT_FMT: m_parentFrame->ExportPcbnewFormat(); break;
case POSTSCRIPT_FMT: m_parentFrame->ExportPostScriptFormat(); break;
case DRAWING_SHEET_FMT: m_parentFrame->ExportDrawingSheetFormat(); break;
}
}
OUTPUT_FMT_ID BITMAP2CMP_PANEL::getOutputFormat()
{
if( m_rbSymbol->GetValue() )
return SYMBOL_FMT;
else if( m_rbPostscript->GetValue() )
return POSTSCRIPT_FMT;
else if( m_rbWorksheet->GetValue() )
return DRAWING_SHEET_FMT;
else
return FOOTPRINT_FMT;
}
void BITMAP2CMP_PANEL::OnExportToClipboard( wxCommandEvent& event )
{
// choices of m_rbOutputFormat are expected to be in same order as
// OUTPUT_FMT_ID. See bitmap2component.h
OUTPUT_FMT_ID format = (OUTPUT_FMT_ID) m_rbOutputFormat->GetSelection();
std::string buffer;
OUTPUT_FMT_ID format = getOutputFormat() == SYMBOL_FMT ? SYMBOL_PASTE_FMT : getOutputFormat();
ExportToBuffer( buffer, format );
wxLogNull doNotLog; // disable logging of failed clipboard actions
@@ -515,61 +506,59 @@ void BITMAP2CMP_PANEL::OnExportToClipboard( wxCommandEvent& event )
}
void BITMAP2CMP_PANEL::exportBitmap( OUTPUT_FMT_ID aFormat )
{
switch( aFormat )
{
case EESCHEMA_FMT: m_parentFrame->ExportEeschemaFormat(); break;
case PCBNEW_KICAD_MOD: m_parentFrame->ExportPcbnewFormat(); break;
case POSTSCRIPT_FMT: m_parentFrame->ExportPostScriptFormat(); break;
case KICAD_WKS_LOGO: m_parentFrame->ExportDrawingSheetFormat(); break;
}
}
void BITMAP2CMP_PANEL::ExportToBuffer( std::string& aOutput, OUTPUT_FMT_ID aFormat )
{
// Create a potrace bitmap
int h = m_NB_Image.GetHeight();
int w = m_NB_Image.GetWidth();
potrace_bitmap_t* potrace_bitmap = bm_new( w, h );
potrace_bitmap_t* potrace_bitmap = bm_new( m_NB_Image.GetWidth(), m_NB_Image.GetHeight() );
if( !potrace_bitmap )
{
wxString msg;
msg.Printf( _( "Error allocating memory for potrace bitmap" ) );
wxMessageBox( msg );
wxMessageBox( _( "Error allocating memory for potrace bitmap" ) );
return;
}
/* fill the bitmap with data */
for( int y = 0; y < h; y++ )
for( int y = 0; y < m_NB_Image.GetHeight(); y++ )
{
for( int x = 0; x < w; x++ )
for( int x = 0; x < m_NB_Image.GetWidth(); x++ )
{
unsigned char pix = m_NB_Image.GetGreen( x, y );
BM_PUT( potrace_bitmap, x, y, pix ? 0 : 1 );
unsigned char pixel = m_NB_Image.GetGreen( x, y );
BM_PUT( potrace_bitmap, x, y, pixel ? 0 : 1 );
}
}
// choices of m_rbPCBLayer are expected to be in same order as
// BMP2CMP_MOD_LAYER. See bitmap2component.h
BMP2CMP_MOD_LAYER modLayer = MOD_LYR_FSILKS;
wxString layer = wxT( "F.SilkS" );
if( aFormat == PCBNEW_KICAD_MOD )
modLayer = (BMP2CMP_MOD_LAYER) m_chPCBLayer->GetSelection();
if( aFormat == FOOTPRINT_FMT )
{
switch( m_layerCtrl->GetSelection() )
{
case 0: layer = wxT( "F.Cu" ); break;
case 1: layer = wxT( "F.SilkS" ); break;
case 2: layer = wxT( "F.Mask" ); break;
case 3: layer = wxT( "Dwgs.User" ); break;
case 4: layer = wxT( "Cmts.User" ); break;
case 5: layer = wxT( "Eco1.User" ); break;
case 6: layer = wxT( "Eco2.User" ); break;
case 7: layer = wxT( "F.Fab" ); break;
}
}
WX_STRING_REPORTER reporter;
BITMAPCONV_INFO converter( aOutput, reporter );
BITMAPCONV_INFO converter( aOutput );
converter.ConvertBitmap( potrace_bitmap, aFormat, m_outputSizeX.GetOutputDPI(),
m_outputSizeY.GetOutputDPI(), modLayer );
m_outputSizeY.GetOutputDPI(), layer );
if( !converter.GetErrorMessages().empty() )
wxMessageBox( converter.GetErrorMessages().c_str(), _( "Errors" ) );
if( reporter.HasMessage() )
wxMessageBox( reporter.GetMessages(), _( "Errors" ) );
}
void BITMAP2CMP_PANEL::OnFormatChange( wxCommandEvent& event )
{
bool enable = m_rbOutputFormat->GetSelection() == PCBNEW_KICAD_MOD;
m_chPCBLayer->Enable( enable );
m_layerLabel->Enable( m_rbFootprint->GetValue() );
m_layerCtrl->Enable( m_rbFootprint->GetValue() );
}
+18 -38
View File
@@ -40,32 +40,13 @@ public:
// to the value in new unit
void SetUnit( EDA_UNITS aUnit );
// Accessors:
void SetOriginalDPI( int aDPI )
{
m_originalDPI = aDPI;
}
void SetOriginalDPI( int aDPI ) { m_originalDPI = aDPI; }
void SetOriginalSizePixels( int aPixels )
{
m_originalSizePixels = aPixels;
}
void SetOriginalSizePixels( int aPixels ) { m_originalSizePixels = aPixels; }
int GetOriginalSizePixels() { return m_originalSizePixels; }
double GetOutputSize()
{
return m_outputSize;
}
void SetOutputSize( double aSize, EDA_UNITS aUnit )
{
m_unit = aUnit;
m_outputSize = aSize;
}
int GetOriginalSizePixels()
{
return m_originalSizePixels;
}
double GetOutputSize() { return m_outputSize; }
void SetOutputSize( double aSize, EDA_UNITS aUnit ) { m_outputSize = aSize; m_unit = aUnit; }
// Set the m_outputSize value from the m_originalSizePixels and the selected unit
void SetOutputSizeFromInitialImageSize();
@@ -88,7 +69,7 @@ class BITMAP2CMP_PANEL : public BITMAP2CMP_PANEL_BASE
{
public:
BITMAP2CMP_PANEL( BITMAP2CMP_FRAME* aParent );
~BITMAP2CMP_PANEL();
~BITMAP2CMP_PANEL() {}
bool OpenProjectFiles( const std::vector<wxString>& aFilenames, int aCtl = 0 );
@@ -117,28 +98,27 @@ private:
void OnPaintBW( wxPaintEvent& event ) override;
void OnExportToFile( wxCommandEvent& event ) override;
void OnExportToClipboard( wxCommandEvent& event ) override;
void OnFormatChange( wxCommandEvent& event ) override;
void OnNegativeClicked( wxCommandEvent& event ) override;
void OnThresholdChange( wxScrollEvent& event ) override;
void OnSizeChangeX( wxCommandEvent& event ) override;
void OnSizeChangeY( wxCommandEvent& event ) override;
void OnSizeUnitChange( wxCommandEvent& event ) override;
void ToggleAspectRatioLock( wxCommandEvent& event ) override;
OUTPUT_FMT_ID getOutputFormat();
///< @return the EDA_UNITS from the m_PixelUnit choice
EDA_UNITS getUnitFromSelection();
// return a string giving the output size, according to the selected unit
wxString FormatOutputSize( double aSize );
wxString formatOutputSize( double aSize );
void Binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level)
void OnNegativeClicked( wxCommandEvent& event ) override;
void OnThresholdChange( wxScrollEvent& event ) override;
void binarize( double aThreshold ); // aThreshold = 0.0 (black level) to 1.0 (white level)
void OnSizeChangeX( wxCommandEvent& event ) override;
void OnSizeChangeY( wxCommandEvent& event ) override;
void OnSizeUnitChange( wxCommandEvent& event ) override;
void ToggleAspectRatioLock( wxCommandEvent& event ) override;
void NegateGreyscaleImage();
void negateGreyscaleImage();
void updateImageInfo();
void OnFormatChange( wxCommandEvent& event ) override;
void exportBitmap( OUTPUT_FMT_ID aFormat );
private:
BITMAP2CMP_FRAME* m_parentFrame;
+63 -32
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -27,7 +27,7 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
m_BNPicturePanel->SetScrollRate( 5, 5 );
m_Notebook->AddPage( m_BNPicturePanel, _("Black && White Picture"), true );
bMainSizer->Add( m_Notebook, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
bMainSizer->Add( m_Notebook, 1, wxEXPAND|wxBOTTOM|wxLEFT, 10 );
wxBoxSizer* brightSizer;
brightSizer = new wxBoxSizer( wxVERTICAL );
@@ -96,7 +96,7 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
brightSizer->Add( sbSizerInfo, 0, wxEXPAND|wxALL, 5 );
m_buttonLoad = new wxButton( this, wxID_ANY, _("Load Source Image"), wxDefaultPosition, wxDefaultSize, 0 );
brightSizer->Add( m_buttonLoad, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
brightSizer->Add( m_buttonLoad, 0, wxEXPAND|wxALL, 5 );
brightSizer->Add( 0, 0, 1, wxEXPAND, 5 );
@@ -104,35 +104,35 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
wxStaticBoxSizer* sbSizerImgPrms;
sbSizerImgPrms = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Output Size") ), wxVERTICAL );
m_aspectRatioCheckbox = new wxCheckBox( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("Lock height / width ratio"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerImgPrms->Add( m_aspectRatioCheckbox, 0, wxBOTTOM, 5 );
wxBoxSizer* bSizerRes;
bSizerRes = new wxBoxSizer( wxHORIZONTAL );
m_staticTextOSize = new wxStaticText( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOSize->Wrap( -1 );
bSizerRes->Add( m_staticTextOSize, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
m_sizeLabel = new wxStaticText( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_sizeLabel->Wrap( -1 );
bSizerRes->Add( m_sizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_UnitSizeX = new wxTextCtrl( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
m_UnitSizeX->SetMinSize( wxSize( 60,-1 ) );
bSizerRes->Add( m_UnitSizeX, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bSizerRes->Add( m_UnitSizeX, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_UnitSizeY = new wxTextCtrl( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("300"), wxDefaultPosition, wxDefaultSize, 0 );
m_UnitSizeY->SetMinSize( wxSize( 60,-1 ) );
bSizerRes->Add( m_UnitSizeY, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bSizerRes->Add( m_UnitSizeY, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
wxArrayString m_PixelUnitChoices;
m_PixelUnit = new wxChoice( sbSizerImgPrms->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_PixelUnitChoices, 0 );
m_PixelUnit->SetSelection( 0 );
m_PixelUnit->SetMinSize( wxSize( 80,-1 ) );
bSizerRes->Add( m_PixelUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
bSizerRes->Add( m_PixelUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
sbSizerImgPrms->Add( bSizerRes, 0, wxEXPAND, 5 );
sbSizerImgPrms->Add( bSizerRes, 0, wxEXPAND|wxBOTTOM, 5 );
m_aspectRatioCheckbox = new wxCheckBox( sbSizerImgPrms->GetStaticBox(), wxID_ANY, _("Lock height / width ratio"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerImgPrms->Add( m_aspectRatioCheckbox, 0, wxALL, 5 );
brightSizer->Add( sbSizerImgPrms, 0, wxALL|wxEXPAND, 5 );
@@ -142,7 +142,7 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
m_ThresholdText = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Black / white threshold:"), wxDefaultPosition, wxDefaultSize, 0 );
m_ThresholdText->Wrap( -1 );
sbSizer2->Add( m_ThresholdText, 0, wxLEFT, 5 );
sbSizer2->Add( m_ThresholdText, 0, wxRIGHT|wxLEFT, 5 );
m_sliderThreshold = new wxSlider( sbSizer2->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
m_sliderThreshold->SetToolTip( _("Adjust the level to convert the greyscale picture to a black and white picture.") );
@@ -150,29 +150,54 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
sbSizer2->Add( m_sliderThreshold, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_checkNegative = new wxCheckBox( sbSizer2->GetStaticBox(), wxID_ANY, _("Negative"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer2->Add( m_checkNegative, 0, wxBOTTOM, 5 );
sbSizer2->Add( m_checkNegative, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
brightSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
m_sizerPcbLayer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pcb Layer for Graphics") ), wxVERTICAL );
wxStaticBoxSizer* sbOutputFormat;
sbOutputFormat = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Output Format") ), wxVERTICAL );
wxString m_chPCBLayerChoices[] = { _("Front silk screen"), _("Front solder mask"), _("Front Fab layer"), _("User layer drawings"), _("User layer comments"), _("User layer Eco1"), _("User layer Eco2") };
int m_chPCBLayerNChoices = sizeof( m_chPCBLayerChoices ) / sizeof( wxString );
m_chPCBLayer = new wxChoice( m_sizerPcbLayer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_chPCBLayerNChoices, m_chPCBLayerChoices, 0 );
m_chPCBLayer->SetSelection( 0 );
m_sizerPcbLayer->Add( m_chPCBLayer, 0, wxALL|wxEXPAND, 5 );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 5, 1, 2, 0 );
fgSizer2->SetFlexibleDirection( wxBOTH );
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_rbSymbol = new wxRadioButton( sbOutputFormat->GetStaticBox(), wxID_ANY, _("Symbol (.kicad_sym file)"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_rbSymbol, 0, wxBOTTOM|wxRIGHT, 5 );
m_rbFootprint = new wxRadioButton( sbOutputFormat->GetStaticBox(), wxID_ANY, _("Footprint (.kicad_mod file)"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_rbFootprint, 0, wxTOP|wxRIGHT, 5 );
wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
m_layerLabel = new wxStaticText( sbOutputFormat->GetStaticBox(), wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
m_layerLabel->Wrap( -1 );
bSizer4->Add( m_layerLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 28 );
wxString m_layerCtrlChoices[] = { _("F.Cu"), _("F.Silkscreen"), _("F.Mask"), _("User.Drawings"), _("User.Comments"), _("User.Eco1"), _("User.Eco2"), _("F.Fab") };
int m_layerCtrlNChoices = sizeof( m_layerCtrlChoices ) / sizeof( wxString );
m_layerCtrl = new wxChoice( sbOutputFormat->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_layerCtrlNChoices, m_layerCtrlChoices, 0 );
m_layerCtrl->SetSelection( 0 );
bSizer4->Add( m_layerCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
brightSizer->Add( m_sizerPcbLayer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
fgSizer2->Add( bSizer4, 1, wxEXPAND, 5 );
wxString m_rbOutputFormatChoices[] = { _("Symbol (.kicad_sym file)"), _("Footprint (.kicad_mod file)"), _("Postscript (.ps file)"), _("Drawing Sheet (.kicad_wks file)") };
int m_rbOutputFormatNChoices = sizeof( m_rbOutputFormatChoices ) / sizeof( wxString );
m_rbOutputFormat = new wxRadioBox( this, wxID_ANY, _("Output Format"), wxDefaultPosition, wxDefaultSize, m_rbOutputFormatNChoices, m_rbOutputFormatChoices, 1, wxRA_SPECIFY_COLS );
m_rbOutputFormat->SetSelection( 0 );
brightSizer->Add( m_rbOutputFormat, 0, wxEXPAND|wxALL, 5 );
m_rbPostscript = new wxRadioButton( sbOutputFormat->GetStaticBox(), wxID_ANY, _("Postscript (.ps file)"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_rbPostscript, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_buttonExportFile = new wxButton( this, wxID_ANY, _("Export to File"), wxDefaultPosition, wxDefaultSize, 0 );
m_rbWorksheet = new wxRadioButton( sbOutputFormat->GetStaticBox(), wxID_ANY, _("Drawing Sheet (.kicad_wks file)"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_rbWorksheet, 0, wxTOP|wxRIGHT, 5 );
sbOutputFormat->Add( fgSizer2, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
brightSizer->Add( sbOutputFormat, 1, wxEXPAND|wxALL, 5 );
m_buttonExportFile = new wxButton( this, wxID_ANY, _("Export to File..."), wxDefaultPosition, wxDefaultSize, 0 );
brightSizer->Add( m_buttonExportFile, 0, wxEXPAND|wxALL, 5 );
m_buttonExportClipboard = new wxButton( this, wxID_ANY, _("Export to Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -191,14 +216,17 @@ BITMAP2CMP_PANEL_BASE::BITMAP2CMP_PANEL_BASE( wxWindow* parent, wxWindowID id, c
m_GreyscalePicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BITMAP2CMP_PANEL_BASE::OnPaintGreyscale ), NULL, this );
m_BNPicturePanel->Connect( wxEVT_PAINT, wxPaintEventHandler( BITMAP2CMP_PANEL_BASE::OnPaintBW ), NULL, this );
m_buttonLoad->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnLoadFile ), NULL, this );
m_aspectRatioCheckbox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::ToggleAspectRatioLock ), NULL, this );
m_UnitSizeX->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeChangeX ), NULL, this );
m_UnitSizeY->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeChangeY ), NULL, this );
m_PixelUnit->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeUnitChange ), NULL, this );
m_aspectRatioCheckbox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::ToggleAspectRatioLock ), NULL, this );
m_sliderThreshold->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( BITMAP2CMP_PANEL_BASE::OnThresholdChange ), NULL, this );
m_sliderThreshold->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BITMAP2CMP_PANEL_BASE::OnThresholdChange ), NULL, this );
m_checkNegative->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnNegativeClicked ), NULL, this );
m_rbOutputFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbSymbol->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbFootprint->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbPostscript->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbWorksheet->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_buttonExportFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnExportToFile ), NULL, this );
m_buttonExportClipboard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnExportToClipboard ), NULL, this );
}
@@ -210,14 +238,17 @@ BITMAP2CMP_PANEL_BASE::~BITMAP2CMP_PANEL_BASE()
m_GreyscalePicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BITMAP2CMP_PANEL_BASE::OnPaintGreyscale ), NULL, this );
m_BNPicturePanel->Disconnect( wxEVT_PAINT, wxPaintEventHandler( BITMAP2CMP_PANEL_BASE::OnPaintBW ), NULL, this );
m_buttonLoad->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnLoadFile ), NULL, this );
m_aspectRatioCheckbox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::ToggleAspectRatioLock ), NULL, this );
m_UnitSizeX->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeChangeX ), NULL, this );
m_UnitSizeY->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeChangeY ), NULL, this );
m_PixelUnit->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnSizeUnitChange ), NULL, this );
m_aspectRatioCheckbox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::ToggleAspectRatioLock ), NULL, this );
m_sliderThreshold->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( BITMAP2CMP_PANEL_BASE::OnThresholdChange ), NULL, this );
m_sliderThreshold->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( BITMAP2CMP_PANEL_BASE::OnThresholdChange ), NULL, this );
m_checkNegative->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnNegativeClicked ), NULL, this );
m_rbOutputFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbSymbol->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbFootprint->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbPostscript->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_rbWorksheet->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnFormatChange ), NULL, this );
m_buttonExportFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnExportToFile ), NULL, this );
m_buttonExportClipboard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( BITMAP2CMP_PANEL_BASE::OnExportToClipboard ), NULL, this );
File diff suppressed because it is too large Load Diff
+12 -10
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -24,23 +24,23 @@
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/textctrl.h>
#include <wx/valtext.h>
#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/slider.h>
#include <wx/radiobox.h>
#include <wx/radiobut.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class BITMAP2CMP_PANEL_BASE
///////////////////////////////////////////////////////////////////////////////
class BITMAP2CMP_PANEL_BASE : public wxPanel
{
private:
wxStaticText* m_sizeLabel;
protected:
wxNotebook* m_Notebook;
@@ -59,17 +59,19 @@ class BITMAP2CMP_PANEL_BASE : public wxPanel
wxStaticText* m_BPPValue;
wxStaticText* m_BPPunits;
wxButton* m_buttonLoad;
wxCheckBox* m_aspectRatioCheckbox;
wxStaticText* m_staticTextOSize;
wxTextCtrl* m_UnitSizeX;
wxTextCtrl* m_UnitSizeY;
wxChoice* m_PixelUnit;
wxCheckBox* m_aspectRatioCheckbox;
wxStaticText* m_ThresholdText;
wxSlider* m_sliderThreshold;
wxCheckBox* m_checkNegative;
wxStaticBoxSizer* m_sizerPcbLayer;
wxChoice* m_chPCBLayer;
wxRadioBox* m_rbOutputFormat;
wxRadioButton* m_rbSymbol;
wxRadioButton* m_rbFootprint;
wxStaticText* m_layerLabel;
wxChoice* m_layerCtrl;
wxRadioButton* m_rbPostscript;
wxRadioButton* m_rbWorksheet;
wxButton* m_buttonExportFile;
wxButton* m_buttonExportClipboard;
@@ -78,10 +80,10 @@ class BITMAP2CMP_PANEL_BASE : public wxPanel
virtual void OnPaintGreyscale( wxPaintEvent& event ) { event.Skip(); }
virtual void OnPaintBW( wxPaintEvent& event ) { event.Skip(); }
virtual void OnLoadFile( wxCommandEvent& event ) { event.Skip(); }
virtual void ToggleAspectRatioLock( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSizeChangeX( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSizeChangeY( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSizeUnitChange( wxCommandEvent& event ) { event.Skip(); }
virtual void ToggleAspectRatioLock( wxCommandEvent& event ) { event.Skip(); }
virtual void OnThresholdChange( wxScrollEvent& event ) { event.Skip(); }
virtual void OnNegativeClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnFormatChange( wxCommandEvent& event ) { event.Skip(); }
+28 -11
View File
@@ -27,28 +27,45 @@
///! Update the schema version whenever a migration is required
const int bitmap2cmpSchemaVersion = 0;
const int bitmap2cmpSchemaVersion = 1;
BITMAP2CMP_SETTINGS::BITMAP2CMP_SETTINGS() :
APP_SETTINGS_BASE( "bitmap2component", bitmap2cmpSchemaVersion ),
m_BitmapFileName(), m_ConvertedFileName(), m_Units(), m_Threshold(), m_Negative(),
m_LastFormat(), m_LastModLayer()
m_BitmapFileName(),
m_ConvertedFileName(),
m_Units(),
m_Threshold(),
m_Negative(),
m_LastFormat(),
m_LastLayer()
{
m_params.emplace_back( new PARAM<wxString>( "bitmap_file_name", &m_BitmapFileName, "" ) );
m_params.emplace_back(
new PARAM<wxString>( "converted_file_name", &m_ConvertedFileName, "" ) );
m_params.emplace_back( new PARAM<wxString>( "converted_file_name", &m_ConvertedFileName, "" ) );
m_params.emplace_back( new PARAM<int>( "units", &m_Units, 0 ) );
m_params.emplace_back( new PARAM<int>( "threshold", &m_Threshold, 50 ) );
m_params.emplace_back( new PARAM<bool>( "negative", &m_Negative, false ) );
m_params.emplace_back( new PARAM<int>( "last_format", &m_LastFormat, 0 ) );
m_params.emplace_back( new PARAM<int>( "last_mod_layer", &m_LastLayer, 0 ) );
m_params.emplace_back( new PARAM<int>( "last_mod_layer", &m_LastModLayer, 0 ) );
registerMigration( 0, 1,
[&]() -> bool
{
// Version 1 introduced a new layer (F.Cu), and changed the ordering to
// be consistent with PCBNew.
switch( Get<int>( "last_mod_layer" ).value_or( 0 ) )
{
default:
case 0: Set( "last_mod_layer", 1 ); break;
case 1: Set( "last_mod_layer", 2 ); break;
case 2: Set( "last_mod_layer", 7 ); break;
case 3: Set( "last_mod_layer", 3 ); break;
case 4: Set( "last_mod_layer", 4 ); break;
case 5: Set( "last_mod_layer", 5 ); break;
case 6: Set( "last_mod_layer", 6 ); break;
}
return true;
} );
}
+6 -12
View File
@@ -35,22 +35,16 @@ public:
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
public:
wxString m_BitmapFileName;
wxString m_ConvertedFileName;
int m_Units;
int m_Threshold;
bool m_Negative;
int m_LastFormat;
int m_LastModLayer;
int m_Units;
int m_Threshold;
bool m_Negative;
int m_LastFormat;
int m_LastLayer;
protected:
virtual std::string getLegacyFrameName() const override { return "Bmconverter_"; }
};
+125 -187
View File
@@ -33,12 +33,12 @@
#include <kiid.h>
#include <build_version.h>
#include <layer_ids.h>
#include <locale_io.h>
#include <macros.h>
#include <potracelib.h>
#include <reporter.h>
#include <fmt/format.h>
#include <wx/translation.h>
#include "bitmap2component.h"
@@ -46,23 +46,21 @@
/* free a potrace bitmap */
static void bm_free( potrace_bitmap_t* bm )
{
if( bm != nullptr )
{
if( bm )
free( bm->map );
}
free( bm );
}
static void BezierToPolyline( std::vector <potrace_dpoint_t>& aCornersBuffer,
potrace_dpoint_t p1,
potrace_dpoint_t p2,
potrace_dpoint_t p3,
potrace_dpoint_t p4 );
potrace_dpoint_t p1, potrace_dpoint_t p2,
potrace_dpoint_t p3, potrace_dpoint_t p4 );
BITMAPCONV_INFO::BITMAPCONV_INFO( std::string& aData ):
m_Data( aData )
BITMAPCONV_INFO::BITMAPCONV_INFO( std::string& aData, REPORTER& aReporter ):
m_Data( aData ),
m_reporter( aReporter )
{
m_Format = POSTSCRIPT_FMT;
m_PixmapWidth = 0;
@@ -75,7 +73,7 @@ BITMAPCONV_INFO::BITMAPCONV_INFO( std::string& aData ):
int BITMAPCONV_INFO::ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap, OUTPUT_FMT_ID aFormat,
int aDpi_X, int aDpi_Y, BMP2CMP_MOD_LAYER aModLayer )
int aDpi_X, int aDpi_Y, const wxString& aLayer )
{
potrace_param_t* param;
potrace_state_t* st;
@@ -85,7 +83,8 @@ int BITMAPCONV_INFO::ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap, OUTPUT_FM
if( !param )
{
m_errors += fmt::format( "Error allocating parameters: {}\n", strerror( errno ) );
m_reporter.Report( fmt::format( "Error allocating parameters: {}\n", strerror( errno ) ),
RPT_SEVERITY_ERROR );
return 1;
}
@@ -100,57 +99,48 @@ int BITMAPCONV_INFO::ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap, OUTPUT_FM
if( !st || st->status != POTRACE_STATUS_OK )
{
if( st )
{
potrace_state_free( st );
}
potrace_param_free( param );
m_errors += fmt::format( "Error tracing bitmap: {}\n", strerror( errno ) );
m_reporter.Report( fmt::format( "Error tracing bitmap: {}\n", strerror( errno ) ),
RPT_SEVERITY_ERROR );
return 1;
}
m_PixmapWidth = aPotrace_bitmap->w;
m_PixmapHeight = aPotrace_bitmap->h; // the bitmap size in pixels
m_Paths = st->plist;
m_Paths = st->plist;
m_Format = aFormat;
switch( aFormat )
{
case KICAD_WKS_LOGO:
m_Format = KICAD_WKS_LOGO;
case DRAWING_SHEET_FMT:
m_ScaleX = PL_IU_PER_MM * 25.4 / aDpi_X; // the conversion scale from PPI to micron
m_ScaleY = PL_IU_PER_MM * 25.4 / aDpi_Y; // Y axis is top to bottom
createOutputData();
break;
case POSTSCRIPT_FMT:
m_Format = POSTSCRIPT_FMT;
m_ScaleX = 1.0; // the conversion scale
m_ScaleY = m_ScaleX;
// output vector data, e.g. as a rudimentary EPS file (mainly for tests)
createOutputData();
break;
case EESCHEMA_FMT:
m_Format = EESCHEMA_FMT;
case SYMBOL_FMT:
case SYMBOL_PASTE_FMT:
m_ScaleX = SCH_IU_PER_MM * 25.4 / aDpi_X; // the conversion scale from PPI to eeschema iu
m_ScaleY = -SCH_IU_PER_MM * 25.4 / aDpi_Y; // Y axis is bottom to Top for components in libs
createOutputData();
break;
case PCBNEW_KICAD_MOD:
m_Format = PCBNEW_KICAD_MOD;
case FOOTPRINT_FMT:
m_ScaleX = PCB_IU_PER_MM * 25.4 / aDpi_X; // the conversion scale from PPI to IU
m_ScaleY = PCB_IU_PER_MM * 25.4 / aDpi_Y; // Y axis is top to bottom in Footprint Editor
createOutputData( aModLayer );
break;
default:
createOutputData( aLayer );
break;
}
bm_free( aPotrace_bitmap );
potrace_state_free( st );
potrace_param_free( param );
@@ -159,131 +149,86 @@ int BITMAPCONV_INFO::ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap, OUTPUT_FM
}
const char* BITMAPCONV_INFO::getBoardLayerName( BMP2CMP_MOD_LAYER aChoice )
void BITMAPCONV_INFO::outputDataHeader( const wxString& aBrdLayerName )
{
const char* layerName = "F.SilkS";
switch( aChoice )
{
case MOD_LYR_FSOLDERMASK:
layerName = "F.Mask";
break;
case MOD_LYR_FAB:
layerName = "F.Fab";
break;
case MOD_LYR_DRAWINGS:
layerName = "Dwgs.User";
break;
case MOD_LYR_COMMENTS:
layerName = "Cmts.User";
break;
case MOD_LYR_ECO1:
layerName = "Eco1.User";
break;
case MOD_LYR_ECO2:
layerName = "Eco2.User";
break;
case MOD_LYR_FSILKS:
break;
}
return layerName;
}
void BITMAPCONV_INFO::outputDataHeader( const char * aBrdLayerName )
{
double Ypos = ( m_PixmapHeight / 2 * m_ScaleY ); // fields Y position in mm
double Ypos = ( m_PixmapHeight / 2.0 * m_ScaleY ); // fields Y position in mm
double fieldSize; // fields text size in mm
std::string strbuf;
switch( m_Format )
{
case POSTSCRIPT_FMT:
/* output vector data, e.g. as a rudimentary EPS file */
m_Data += "%!PS-Adobe-3.0 EPSF-3.0\n";
strbuf = fmt::format( "%%BoundingBox: 0 0 {} {}\n", m_PixmapWidth, m_PixmapHeight );
m_Data += strbuf;
m_Data += fmt::format( "%%BoundingBox: 0 0 {} {}\n", m_PixmapWidth, m_PixmapHeight );
m_Data += "gsave\n";
break;
case PCBNEW_KICAD_MOD:
case FOOTPRINT_FMT:
// fields text size = 1.5 mm
// fields text thickness = 1.5 / 5 = 0.3mm
strbuf = fmt::format( "(footprint \"{}\" (version 20221018) (generator \"bitmap2component\") (generator_version \"{}\")\n"
" (layer \"F.Cu\")\n",
m_CmpName.c_str(), GetMajorMinorVersion().ToStdString() );
m_Data += fmt::format( "(footprint \"{}\" (version 20221018) (generator \"bitmap2component\") (generator_version \"{}\")\n"
" (layer \"F.Cu\")\n",
m_CmpName.c_str(),
GetMajorMinorVersion().ToStdString() );
m_Data += strbuf;
strbuf = fmt::format(
" (attr board_only exclude_from_pos_files exclude_from_bom)\n" );
m_Data += strbuf;
strbuf = fmt::format(
" (fp_text reference \"G***\" (at 0 0) (layer \"{}\")\n"
" (effects (font (size 1.5 1.5) (thickness 0.3)))\n"
" (uuid {})\n )\n",
aBrdLayerName, KIID().AsString().ToStdString().c_str() );
m_Data += fmt::format( " (attr board_only exclude_from_pos_files exclude_from_bom)\n" );
m_Data += fmt::format( " (fp_text reference \"G***\" (at 0 0) (layer \"{}\")\n"
" (effects (font (size 1.5 1.5) (thickness 0.3)))\n"
" (uuid {})\n )\n",
aBrdLayerName.ToStdString().c_str(),
KIID().AsString().ToStdString().c_str() );
m_Data += strbuf;
strbuf = fmt::format(
" (fp_text value \"{}\" (at 0.75 0) (layer \"{}\") hide\n"
" (effects (font (size 1.5 1.5) (thickness 0.3)))\n"
" (uuid {})\n )\n",
m_CmpName.c_str(), aBrdLayerName, KIID().AsString().ToStdString().c_str() );
m_Data += strbuf;
m_Data += fmt::format( " (fp_text value \"{}\" (at 0.75 0) (layer \"{}\") hide\n"
" (effects (font (size 1.5 1.5) (thickness 0.3)))\n"
" (uuid {})\n )\n",
m_CmpName.c_str(),
aBrdLayerName.ToStdString().c_str(),
KIID().AsString().ToStdString().c_str() );
break;
case KICAD_WKS_LOGO:
m_Data += fmt::format("(kicad_wks (version 20220228) (generator \"bitmap2component\") (generator_version \"{}\")\n", GetMajorMinorVersion().ToStdString() );
case DRAWING_SHEET_FMT:
m_Data += fmt::format( "(kicad_wks (version 20220228) (generator \"bitmap2component\") (generator_version \"{}\")\n",
GetMajorMinorVersion().ToStdString() );
m_Data += " (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)\n";
m_Data += " (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))\n";
m_Data += " (polygon (name \"\") (pos 0 0) (linewidth 0.01)\n";
break;
case EESCHEMA_FMT:
case SYMBOL_FMT:
m_Data += fmt::format( "(kicad_symbol_lib (version 20220914) (generator \"bitmap2component\") (generator_version \"{}\")\n",
GetMajorMinorVersion().ToStdString() );
KI_FALLTHROUGH;
case SYMBOL_PASTE_FMT:
fieldSize = 1.27; // fields text size in mm (= 50 mils)
Ypos /= SCH_IU_PER_MM;
Ypos += fieldSize / 2;
// snprintf( strbuf, sizeof(strbuf), "# pixmap size w = %d, h = %d\n#\n", m_PixmapWidth, m_PixmapHeight );
strbuf = fmt::format(
"(kicad_symbol_lib (version 20220914) (generator \"bitmap2component\") (generator_version \"{}\")\n"
" (symbol \"{}\" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)\n",
GetMajorMinorVersion().ToStdString(), m_CmpName.c_str() );
m_Data += strbuf;
m_Data += fmt::format( " (symbol \"{}\" (pin_names (offset 1.016)) (in_bom yes) (on_board yes)\n",
m_CmpName.c_str() );
strbuf = fmt::format(
" (property \"Reference\" \"#G\" (at 0 {:g} 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
-Ypos, fieldSize, fieldSize );
m_Data += strbuf;
m_Data += fmt::format( " (property \"Reference\" \"#G\" (at 0 {:g} 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
-Ypos,
fieldSize,
fieldSize );
strbuf = fmt::format(
" (property \"Value\" \"{}\" (at 0 {:g} 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
m_CmpName.c_str(), Ypos, fieldSize, fieldSize );
m_Data += strbuf;
m_Data += fmt::format( " (property \"Value\" \"{}\" (at 0 {:g} 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
m_CmpName.c_str(),
Ypos,
fieldSize,
fieldSize );
strbuf = fmt::format(
" (property \"Footprint\" \"\" (at 0 0 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
fieldSize, fieldSize );
m_Data += strbuf;
m_Data += fmt::format( " (property \"Footprint\" \"\" (at 0 0 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
fieldSize,
fieldSize );
strbuf = fmt::format(
" (property \"Datasheet\" \"\" (at 0 0 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
fieldSize, fieldSize );
m_Data += strbuf;
m_Data += fmt::format( " (property \"Datasheet\" \"\" (at 0 0 0)\n"
" (effects (font (size {:g} {:g})) hide)\n )\n",
fieldSize,
fieldSize );
strbuf = fmt::format( " (symbol \"{}_0_0\"\n", m_CmpName.c_str() );
m_Data += strbuf;
m_Data += fmt::format( " (symbol \"{}_0_0\"\n", m_CmpName.c_str() );
break;
}
}
@@ -298,15 +243,20 @@ void BITMAPCONV_INFO::outputDataEnd()
m_Data += "%%EOF\n";
break;
case PCBNEW_KICAD_MOD:
case FOOTPRINT_FMT:
m_Data += ")\n";
break;
case KICAD_WKS_LOGO:
case DRAWING_SHEET_FMT:
m_Data += " )\n)\n";
break;
case EESCHEMA_FMT:
case SYMBOL_PASTE_FMT:
m_Data += " )\n"; // end symbol_0_0
m_Data += " )\n"; // end symbol
break;
case SYMBOL_FMT:
m_Data += " )\n"; // end symbol_0_0
m_Data += " )\n"; // end symbol
m_Data += ")\n"; // end lib
@@ -315,16 +265,14 @@ void BITMAPCONV_INFO::outputDataEnd()
}
void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char* aBrdLayerName )
void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const wxString& aBrdLayerName )
{
// write one polygon to output file.
// coordinates are expected in target unit.
int ii, jj;
int ii, jj;
VECTOR2I currpoint;
std::string strbuf;
int offsetX = (int)( m_PixmapWidth / 2 * m_ScaleX );
int offsetY = (int)( m_PixmapHeight / 2 * m_ScaleY );
int offsetX = KiROUND( m_PixmapWidth / 2.0 * m_ScaleX );
int offsetY = KiROUND( m_PixmapHeight / 2.0 * m_ScaleY );
const VECTOR2I startpoint = aPolygon.CPoint( 0 );
@@ -332,15 +280,13 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
{
case POSTSCRIPT_FMT:
offsetY = (int)( m_PixmapHeight * m_ScaleY );
strbuf = fmt::format( "newpath\n{} {} moveto\n", startpoint.x, offsetY - startpoint.y );
m_Data += strbuf;
m_Data += fmt::format( "newpath\n{} {} moveto\n", startpoint.x, offsetY - startpoint.y );
jj = 0;
for( ii = 1; ii < aPolygon.PointCount(); ii++ )
{
currpoint = aPolygon.CPoint( ii );
strbuf = fmt::format( " {} {} lineto", currpoint.x, offsetY - currpoint.y );
m_Data += strbuf;
m_Data += fmt::format( " {} {} lineto", currpoint.x, offsetY - currpoint.y );
if( jj++ > 6 )
{
@@ -352,9 +298,7 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
m_Data += "\nclosepath fill\n";
break;
case PCBNEW_KICAD_MOD:
{
double width = 0.0; // outline thickness in mm: no thickness
case FOOTPRINT_FMT:
m_Data += " (fp_poly\n (pts\n";
jj = 0;
@@ -362,23 +306,20 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = aPolygon.CPoint( ii );
strbuf = fmt::format( " (xy {} {})\n",
( currpoint.x - offsetX ) / PCB_IU_PER_MM,
( currpoint.y - offsetY ) / PCB_IU_PER_MM );
m_Data += strbuf;
m_Data += fmt::format( " (xy {} {})\n",
( currpoint.x - offsetX ) / PCB_IU_PER_MM,
( currpoint.y - offsetY ) / PCB_IU_PER_MM );
}
// No need to close polygon
m_Data += " )\n\n";
strbuf = fmt::format(
" (stroke (width {:f}) (type solid)) (fill solid) (layer \"{}\") (uuid {}))\n",
width, aBrdLayerName, KIID().AsString().ToStdString().c_str() );
m_Data += fmt::format( " (stroke (width {:f}) (type solid)) (fill solid) (layer \"{}\") (uuid {}))\n",
0.0,
aBrdLayerName.ToStdString().c_str(),
KIID().AsString().ToStdString().c_str() );
break;
m_Data += strbuf;
}
break;
case KICAD_WKS_LOGO:
case DRAWING_SHEET_FMT:
m_Data += " (pts";
// Internal units = micron, file unit = mm
@@ -387,10 +328,9 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = aPolygon.CPoint( ii );
strbuf = fmt::format( " (xy {:.3f} {:.3f})",
( currpoint.x - offsetX ) / PL_IU_PER_MM,
( currpoint.y - offsetY ) / PL_IU_PER_MM );
m_Data += strbuf;
m_Data += fmt::format( " (xy {:.3f} {:.3f})",
( currpoint.x - offsetX ) / PL_IU_PER_MM,
( currpoint.y - offsetY ) / PL_IU_PER_MM );
if( jj++ > 4 )
{
@@ -400,13 +340,13 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
}
// Close polygon
strbuf = fmt::format( " (xy {:.3f} {:.3f}) )\n",
m_Data += fmt::format( " (xy {:.3f} {:.3f}) )\n",
( startpoint.x - offsetX ) / PL_IU_PER_MM,
( startpoint.y - offsetY ) / PL_IU_PER_MM );
m_Data += strbuf;
break;
case EESCHEMA_FMT:
case SYMBOL_FMT:
case SYMBOL_PASTE_FMT:
// The polygon outline thickness is fixed here to 0.01 ( 0.0 is the default thickness)
#define SCH_LINE_THICKNESS_MM 0.01
//snprintf( strbuf, sizeof(strbuf), "P %d 0 0 %d", (int) aPolygon.PointCount() + 1, EE_LINE_THICKNESS );
@@ -415,31 +355,27 @@ void BITMAPCONV_INFO::outputOnePolygon( SHAPE_LINE_CHAIN& aPolygon, const char*
for( ii = 0; ii < aPolygon.PointCount(); ii++ )
{
currpoint = aPolygon.CPoint( ii );
strbuf = fmt::format( " (xy {:f} {:f})\n",
( currpoint.x - offsetX ) / SCH_IU_PER_MM,
( currpoint.y - offsetY ) / SCH_IU_PER_MM );
m_Data += strbuf;
m_Data += fmt::format( " (xy {:f} {:f})\n",
( currpoint.x - offsetX ) / SCH_IU_PER_MM,
( currpoint.y - offsetY ) / SCH_IU_PER_MM );
}
// Close polygon
strbuf = fmt::format( " (xy {:f} {:f})\n",
( startpoint.x - offsetX ) / SCH_IU_PER_MM,
( startpoint.y - offsetY ) / SCH_IU_PER_MM );
m_Data += strbuf;
m_Data += fmt::format( " (xy {:f} {:f})\n",
( startpoint.x - offsetX ) / SCH_IU_PER_MM,
( startpoint.y - offsetY ) / SCH_IU_PER_MM );
m_Data += " )\n"; // end pts
strbuf = fmt::format(
" (stroke (width {:g}) (type default))\n (fill (type outline))\n",
SCH_LINE_THICKNESS_MM );
m_Data += strbuf;
m_Data += fmt::format( " (stroke (width {:g}) (type default))\n"
" (fill (type outline))\n",
SCH_LINE_THICKNESS_MM );
m_Data += " )\n"; // end polyline
break;
}
}
void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
void BITMAPCONV_INFO::createOutputData( const wxString& aLayer )
{
std::vector <potrace_dpoint_t> cornersBuffer;
@@ -456,7 +392,7 @@ void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
// The layer name has meaning only for .kicad_mod files.
// For these files the header creates 2 invisible texts: value and ref
// (needed but not useful) on silk screen layer
outputDataHeader( getBoardLayerName( MOD_LYR_FSILKS ) );
outputDataHeader( "F.SilkS" );
bool main_outline = true;
@@ -465,9 +401,10 @@ void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
*/
potrace_path_t* paths = m_Paths; // the list of paths
if(!m_Paths)
if( !m_Paths )
{
m_errors += "No shape in black and white image to convert: no outline created\n";
m_reporter.Report( _( "No shape in black and white image to convert: no outline created." ),
RPT_SEVERITY_ERROR );
}
while( paths != nullptr )
@@ -501,10 +438,11 @@ void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
// build the current main polygon
polyset_areas.NewOutline();
for( unsigned int i = 0; i < cornersBuffer.size(); i++ )
for( const potrace_dpoint_s& pt : cornersBuffer )
{
polyset_areas.Append( int( cornersBuffer[i].x * m_ScaleX ),
int( cornersBuffer[i].y * m_ScaleY ) );
polyset_areas.Append( int( pt.x * m_ScaleX ),
int( pt.y * m_ScaleY ) );
}
}
else
@@ -512,10 +450,10 @@ void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
// Add current hole in polyset_holes
polyset_holes.NewOutline();
for( unsigned int i = 0; i < cornersBuffer.size(); i++ )
for( const potrace_dpoint_s& pt : cornersBuffer )
{
polyset_holes.Append( int( cornersBuffer[i].x * m_ScaleX ),
int( cornersBuffer[i].y * m_ScaleY ) );
polyset_holes.Append( int( pt.x * m_ScaleX ),
int( pt.y * m_ScaleY ) );
}
}
@@ -538,7 +476,7 @@ void BITMAPCONV_INFO::createOutputData( BMP2CMP_MOD_LAYER aModLayer )
for( int ii = 0; ii < polyset_areas.OutlineCount(); ii++ )
{
SHAPE_LINE_CHAIN& poly = polyset_areas.Outline( ii );
outputOnePolygon( poly, getBoardLayerName( aModLayer ));
outputOnePolygon( poly, aLayer );
}
polyset_areas.RemoveAllContours();
+20 -46
View File
@@ -27,71 +27,53 @@
#include <geometry/shape_poly_set.h>
#include <potracelib.h>
// for consistency this enum should conform to the
// indices in m_radioBoxFormat from bitmap2cmp_gui.cpp
class REPORTER;
enum OUTPUT_FMT_ID
{
EESCHEMA_FMT = 0,
PCBNEW_KICAD_MOD,
SYMBOL_FMT,
SYMBOL_PASTE_FMT, // This does not include the header information
FOOTPRINT_FMT,
POSTSCRIPT_FMT,
KICAD_WKS_LOGO,
FINAL_FMT = KICAD_WKS_LOGO
DRAWING_SHEET_FMT,
};
// for consistency this enum should conform to the
// indices in m_cbPcbLayer from bitmap2cmp_gui.cpp
enum BMP2CMP_MOD_LAYER
{
MOD_LYR_FSILKS = 0,
MOD_LYR_FSOLDERMASK,
MOD_LYR_FAB,
MOD_LYR_DRAWINGS,
MOD_LYR_COMMENTS,
MOD_LYR_ECO1,
MOD_LYR_ECO2,
MOD_LYR_FINAL = MOD_LYR_ECO2
};
/* Helper class to handle useful info to convert a bitmap image to
* a polygonal object description
*/
class BITMAPCONV_INFO
{
private:
enum OUTPUT_FMT_ID m_Format; // File format
int m_PixmapWidth;
int m_PixmapHeight; // the bitmap size in pixels
enum OUTPUT_FMT_ID m_Format; // File format
int m_PixmapWidth;
int m_PixmapHeight; // the bitmap size in pixels
double m_ScaleX;
double m_ScaleY; // the conversion scale
potrace_path_t* m_Paths; // the list of paths, from potrace (list of lines and bezier curves)
std::string m_CmpName; // The string used as cmp/footprint name
std::string& m_Data; // the buffer containing the conversion
std::string m_errors; // a buffer to return error messages
double m_ScaleY; // the conversion scale
potrace_path_t* m_Paths; // the list of paths, from potrace (list of lines and bezier curves)
std::string m_CmpName; // The string used as cmp/footprint name
std::string& m_Data; // the buffer containing the conversion
REPORTER& m_reporter;
public:
BITMAPCONV_INFO( std::string& aData );
BITMAPCONV_INFO( std::string& aData, REPORTER& aReporter );
/**
* Run the conversion of the bitmap
*/
int ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap,
OUTPUT_FMT_ID aFormat, int aDpi_X, int aDpi_Y,
BMP2CMP_MOD_LAYER aModLayer );
std::string& GetErrorMessages() {return m_errors; }
int ConvertBitmap( potrace_bitmap_t* aPotrace_bitmap, OUTPUT_FMT_ID aFormat, int aDpi_X,
int aDpi_Y, const wxString& aLayer );
private:
/**
* Creates the data specified by m_Format
*/
void createOutputData( BMP2CMP_MOD_LAYER aModLayer = (BMP2CMP_MOD_LAYER) 0 );
void createOutputData( const wxString& aBrdLayerName = wxT( "F.SilkS" ) );
/**
* Function outputDataHeader
* write to file the header depending on file format
*/
void outputDataHeader( const char * aBrdLayerName );
void outputDataHeader( const wxString& aBrdLayerName );
/**
* Function outputDataEnd
@@ -99,20 +81,12 @@ private:
*/
void outputDataEnd();
/**
* @return the board layer name depending on the board layer selected
* @param aChoice = the choice (MOD_LYR_FSILKS to MOD_LYR_FINAL)
*/
const char * getBoardLayerName( BMP2CMP_MOD_LAYER aChoice );
/**
* Function outputOnePolygon
* write one polygon to output file.
* Polygon coordinates are expected scaled by the polygon extraction function
*/
void outputOnePolygon( SHAPE_LINE_CHAIN & aPolygon, const char* aBrdLayerName );
void outputOnePolygon( SHAPE_LINE_CHAIN & aPolygon, const wxString& aBrdLayerName );
};
#endif // BITMAP2COMPONENT_H
+6
View File
@@ -274,4 +274,10 @@ if( MSVC )
string( APPEND WARN_FLAGS_CXX " /wd5267" )
# disable "reinterpret_cast used between related classes"
string( APPEND WARN_FLAGS_CXX " /wd4946" )
# disable throw() is interpreted as declspec(nothrow)
string( APPEND WARN_FLAGS_CXX " /wd4290" )
# disable non-bool is explicitly cast to bool, forcing value of 0 or 1
string( APPEND WARN_FLAGS_CXX " /wd4800" )
# disable volatile access of '<expression>' is subject to /volatile:[iso|ms] setting;
string( APPEND WARN_FLAGS_CXX " /wd4746" )
endif()
+6
View File
@@ -348,6 +348,8 @@ set( COMMON_DLG_SRCS
dialogs/dialog_color_picker_base.cpp
dialogs/dialog_configure_paths.cpp
dialogs/dialog_configure_paths_base.cpp
dialogs/dialog_design_block_properties.cpp
dialogs/dialog_design_block_properties_base.cpp
dialogs/dialog_display_html_text_base.cpp
dialogs/dialog_edit_library_tables.cpp
dialogs/dialog_embed_files.cpp
@@ -421,6 +423,7 @@ set( COMMON_WIDGET_SRCS
widgets/bitmap_toggle.cpp
widgets/button_row_panel.cpp
widgets/color_swatch.cpp
widgets/design_block_pane.cpp
widgets/filter_combobox.cpp
widgets/font_choice.cpp
widgets/footprint_choice.cpp
@@ -445,6 +448,7 @@ set( COMMON_WIDGET_SRCS
widgets/mathplot.cpp
widgets/msgpanel.cpp
widgets/paged_dialog.cpp
widgets/panel_design_block_chooser.cpp
widgets/properties_panel.cpp
widgets/search_pane.cpp
widgets/search_pane_base.cpp
@@ -607,6 +611,7 @@ set( COMMON_SRCS
lib_table_grid_tricks.cpp
lib_tree_model.cpp
lib_tree_model_adapter.cpp
design_block_tree_model_adapter.cpp
marker_base.cpp
origin_transforms.cpp
printout.cpp
@@ -640,6 +645,7 @@ set( COMMON_SRCS
tool/construction_manager.cpp
tool/common_tools.cpp
tool/conditional_menu.cpp
tool/design_block_control.cpp
tool/edit_constraints.cpp
tool/edit_points.cpp
tool/editor_conditions.cpp
+2 -2
View File
@@ -260,7 +260,7 @@ ADVANCED_CFG::ADVANCED_CFG()
m_EnableLibDir = false;
m_EnableEeschemaPrintCairo = true;
m_EnableEeschemaExportClipboardCairo = false;
m_EnableEeschemaExportClipboardCairo = true;
m_3DRT_BevelHeight_um = 30;
m_3DRT_BevelExtentFactor = 1.0 / 16.0;
@@ -292,7 +292,7 @@ ADVANCED_CFG::ADVANCED_CFG()
m_ResolveTextRecursionDepth = 3;
m_EnableExtensionSnaps = true;
m_ExtensionSnapTimeoutMs = 500;
m_ExtensionSnapTimeoutMs = 400;
m_ExtensionSnapActivateOnHover = true;
m_EnableSnapAnchorsDebug = false;
+1 -1
View File
@@ -290,7 +290,7 @@ void API_PLUGIN_MANAGER::InvokeAction( const wxString& aIdentifier )
if( !aError.IsEmpty() )
wxLogTrace( traceApi, wxString::Format( "Manager: action stderr: %s", aError ) );
},
&env );
&env, true );
break;
}
+31 -4
View File
@@ -37,6 +37,10 @@
#include <api/common/envelope.pb.h>
#ifdef __UNIX__
#include <sys/file.h>
#endif
using kiapi::common::ApiRequest, kiapi::common::ApiResponse, kiapi::common::ApiStatusCode;
@@ -63,6 +67,7 @@ KICAD_API_SERVER::KICAD_API_SERVER() :
KICAD_API_SERVER::~KICAD_API_SERVER()
{
Stop();
}
@@ -87,11 +92,31 @@ void KICAD_API_SERVER::Start()
return;
}
if( socket.FileExists() )
{
socket.SetFullName( wxString::Format( wxS( "api-%ul.sock" ), ::wxGetProcessId() ) );
#ifndef __WINDOWS__
// We use non-abstract sockets because macOS and some other non-Linux platforms don't support
// abstract sockets, which means there might be an old socket to unlink. In order to try to
// recover this, we lock a file (which will be unlocked on process exit) and if we get the lock,
// we know the old socket is orphaned and can be removed.
wxFileName lockFilePath( socket.GetPath(), wxS( "api.lock" ) );
if( socket.FileExists() )
int lockFile = open( lockFilePath.GetFullPath().c_str(), O_RDONLY | O_CREAT, 0600 );
if( lockFile >= 0 && flock( lockFile, LOCK_EX | LOCK_NB ) == 0 )
{
if( socket.Exists() )
{
wxLogTrace( traceApi, wxString::Format( "Server: cleaning up stale socket path %s",
socket.GetFullPath() ) );
wxRemoveFile( socket.GetFullPath() );
}
}
#endif
if( socket.Exists() )
{
socket.SetFullName( wxString::Format( wxS( "api-%lu.sock" ), ::wxGetProcessId() ) );
if( socket.Exists() )
{
wxLogTrace( traceApi, wxString::Format( "Server: PID socket path %s already exists!",
socket.GetFullPath() ) );
@@ -210,6 +235,8 @@ void KICAD_API_SERVER::handleApiEvent( wxCommandEvent& aEvent )
if( ADVANCED_CFG::GetCfg().m_EnableAPILogging )
log( "Response (ERROR): " + error.Utf8DebugString() );
return;
}
API_RESULT result;
+6 -2
View File
@@ -183,7 +183,7 @@ BACKGROUND_JOB_REPORTER::BACKGROUND_JOB_REPORTER( BACKGROUND_JOBS_MONITOR* aMoni
bool BACKGROUND_JOB_REPORTER::updateUI()
{
return true;
return !m_cancelled;
}
@@ -266,7 +266,11 @@ void BACKGROUND_JOBS_MONITOR::Remove( std::shared_ptr<BACKGROUND_JOB> aJob )
return job == aJob;
} ) );
if( m_jobs.size() == 0 )
if( m_jobs.size() > 0 )
{
jobUpdated( m_jobs.front() );
}
else
{
for( KISTATUSBAR* statusBar : m_statusBars )
{
+2 -2
View File
@@ -107,9 +107,9 @@ wxBitmap KiBitmap( BITMAPS aBitmap, int aHeightTag )
}
wxBitmapBundle KiBitmapBundle( BITMAPS aBitmap )
wxBitmapBundle KiBitmapBundle( BITMAPS aBitmap, int aMinHeight )
{
return GetBitmapStore()->GetBitmapBundle( aBitmap );
return GetBitmapStore()->GetBitmapBundle( aBitmap, aMinHeight );
}
+5 -5
View File
@@ -239,7 +239,7 @@ bool BITMAP_BASE::LoadLegacyData( LINE_READER& aLine, wxString& aErrorMsg )
m_image->LoadFile( istream, wxBITMAP_TYPE_ANY );
m_bitmap = new wxBitmap( *m_image );
m_originalImage = new wxImage( *m_image );
UpdateImageDataBuffer();
updateImageDataBuffer();
break;
}
@@ -433,7 +433,7 @@ void BITMAP_BASE::Mirror( FLIP_DIRECTION aFlipDirection )
m_isMirroredX = !m_isMirroredX;
rebuildBitmap( false );
UpdateImageDataBuffer();
updateImageDataBuffer();
}
}
@@ -458,7 +458,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
m_rotation += ( aRotateCCW ? ANGLE_90 : -ANGLE_90 );
rebuildBitmap( false );
UpdateImageDataBuffer();
updateImageDataBuffer();
}
}
@@ -470,7 +470,7 @@ void BITMAP_BASE::ConvertToGreyscale()
*m_image = m_image->ConvertToGreyscale();
*m_originalImage = m_originalImage->ConvertToGreyscale();
rebuildBitmap();
UpdateImageDataBuffer();
updateImageDataBuffer();
}
}
@@ -490,7 +490,7 @@ void BITMAP_BASE::PlotImage( PLOTTER* aPlotter, const VECTOR2I& aPos,
}
void BITMAP_BASE::UpdateImageDataBuffer()
void BITMAP_BASE::updateImageDataBuffer()
{
if( m_image )
{
+171 -11
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
* Copyright 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
@@ -423,6 +423,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_24.png" ), 24, wxT( "light" ) );
@@ -558,6 +559,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_24.png" ), 24, wxT( "light" ) );
@@ -657,6 +660,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_24.png" ), 24, wxT( "light" ) );
@@ -667,11 +671,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_24.png" ), 24, wxT( "light" ) );
@@ -697,6 +701,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_24.png" ), 24, wxT( "light" ) );
@@ -736,6 +741,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_24.png" ), 24, wxT( "light" ) );
@@ -843,6 +859,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_dark_24.png" ), 24, wxT( "dark" ) );
@@ -978,6 +995,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1077,6 +1096,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1087,11 +1107,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1117,6 +1137,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1156,6 +1177,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1263,6 +1295,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_16.png" ), 16, wxT( "light" ) );
@@ -1398,6 +1431,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_16.png" ), 16, wxT( "light" ) );
@@ -1497,6 +1532,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_16.png" ), 16, wxT( "light" ) );
@@ -1507,11 +1543,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_16.png" ), 16, wxT( "light" ) );
@@ -1537,6 +1573,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_16.png" ), 16, wxT( "light" ) );
@@ -1576,6 +1613,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_16.png" ), 16, wxT( "light" ) );
@@ -1683,6 +1731,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1818,6 +1867,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1917,6 +1968,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1927,11 +1979,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1957,6 +2009,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1996,6 +2049,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_dark_16.png" ), 16, wxT( "dark" ) );
@@ -2103,6 +2167,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_32.png" ), 32, wxT( "light" ) );
@@ -2238,6 +2303,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_32.png" ), 32, wxT( "light" ) );
@@ -2337,6 +2404,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_32.png" ), 32, wxT( "light" ) );
@@ -2347,11 +2415,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_32.png" ), 32, wxT( "light" ) );
@@ -2377,6 +2445,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_32.png" ), 32, wxT( "light" ) );
@@ -2416,6 +2485,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_32.png" ), 32, wxT( "light" ) );
@@ -2523,6 +2603,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2658,6 +2739,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2757,6 +2840,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2767,11 +2851,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2797,6 +2881,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2836,6 +2921,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2943,6 +3039,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_48.png" ), 48, wxT( "light" ) );
@@ -3078,6 +3175,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_48.png" ), 48, wxT( "light" ) );
@@ -3177,6 +3276,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_48.png" ), 48, wxT( "light" ) );
@@ -3187,11 +3287,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_48.png" ), 48, wxT( "light" ) );
@@ -3217,6 +3317,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_48.png" ), 48, wxT( "light" ) );
@@ -3256,6 +3357,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_48.png" ), 48, wxT( "light" ) );
@@ -3363,6 +3475,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3498,6 +3611,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3597,6 +3712,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3607,11 +3723,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3637,6 +3753,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3676,6 +3793,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3783,6 +3911,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_64.png" ), 64, wxT( "light" ) );
@@ -3918,6 +4047,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_64.png" ), 64, wxT( "light" ) );
@@ -4017,6 +4148,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_64.png" ), 64, wxT( "light" ) );
@@ -4027,11 +4159,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_64.png" ), 64, wxT( "light" ) );
@@ -4057,6 +4189,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_64.png" ), 64, wxT( "light" ) );
@@ -4096,6 +4229,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_64.png" ), 64, wxT( "light" ) );
@@ -4203,6 +4347,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::axis3d_right].emplace_back( BITMAPS::axis3d_right, wxT( "axis3d_right_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d_top].emplace_back( BITMAPS::axis3d_top, wxT( "axis3d_top_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::axis3d].emplace_back( BITMAPS::axis3d, wxT( "axis3d_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::body_style].emplace_back( BITMAPS::body_style, wxT( "body_style_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::break_line].emplace_back( BITMAPS::break_line, wxT( "break_line_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bug].emplace_back( BITMAPS::bug, wxT( "bug_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::bus_definition_tool].emplace_back( BITMAPS::bus_definition_tool, wxT( "bus_definition_tool_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4338,6 +4483,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::info].emplace_back( BITMAPS::info, wxT( "info_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::insert_module_board].emplace_back( BITMAPS::insert_module_board, wxT( "insert_module_board_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::intersect_polygons].emplace_back( BITMAPS::intersect_polygons, wxT( "intersect_polygons_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset].emplace_back( BITMAPS::jobset, wxT( "jobset_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::jobset_open].emplace_back( BITMAPS::jobset_open, wxT( "jobset_open_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::language].emplace_back( BITMAPS::language, wxT( "language_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::layers_manager].emplace_back( BITMAPS::layers_manager, wxT( "layers_manager_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::leave_sheet].emplace_back( BITMAPS::leave_sheet, wxT( "leave_sheet_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4437,6 +4584,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::preference].emplace_back( BITMAPS::preference, wxT( "preference_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::print_button].emplace_back( BITMAPS::print_button, wxT( "print_button_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project].emplace_back( BITMAPS::project, wxT( "project_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_clone].emplace_back( BITMAPS::project_clone, wxT( "project_clone_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_close].emplace_back( BITMAPS::project_close, wxT( "project_close_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::project_kicad].emplace_back( BITMAPS::project_kicad, wxT( "project_kicad_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ps_diff_pair].emplace_back( BITMAPS::ps_diff_pair, wxT( "ps_diff_pair_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4447,11 +4595,11 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::push_pad_settings].emplace_back( BITMAPS::push_pad_settings, wxT( "push_pad_settings_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::puzzle_piece].emplace_back( BITMAPS::puzzle_piece, wxT( "puzzle_piece_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::py_script].emplace_back( BITMAPS::py_script, wxT( "py_script_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::ray_tracing].emplace_back( BITMAPS::ray_tracing, wxT( "ray_tracing_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::recent].emplace_back( BITMAPS::recent, wxT( "recent_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::redo].emplace_back( BITMAPS::redo, wxT( "redo_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::refresh].emplace_back( BITMAPS::refresh, wxT( "refresh_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::reload].emplace_back( BITMAPS::reload, wxT( "reload_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::render_mode].emplace_back( BITMAPS::render_mode, wxT( "render_mode_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::rescue].emplace_back( BITMAPS::rescue, wxT( "rescue_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::restore_from_file].emplace_back( BITMAPS::restore_from_file, wxT( "restore_from_file_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::right].emplace_back( BITMAPS::right, wxT( "right_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4477,6 +4625,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::shape_3d].emplace_back( BITMAPS::shape_3d, wxT( "shape_3d_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::shape_3d_back].emplace_back( BITMAPS::shape_3d_back, wxT( "shape_3d_back_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sheetset].emplace_back( BITMAPS::sheetset, wxT( "sheetset_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::show_board_body].emplace_back( BITMAPS::show_board_body, wxT( "show_board_body_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::simulator].emplace_back( BITMAPS::simulator, wxT( "simulator_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_add_plot].emplace_back( BITMAPS::sim_add_plot, wxT( "sim_add_plot_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::sim_command].emplace_back( BITMAPS::sim_command, wxT( "sim_command_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4516,6 +4665,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::swap].emplace_back( BITMAPS::swap, wxT( "swap_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::swap_layer].emplace_back( BITMAPS::swap_layer, wxT( "swap_layer_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::switch_corner_rounding_shape].emplace_back( BITMAPS::switch_corner_rounding_shape, wxT( "switch_corner_rounding_shape_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table].emplace_back( BITMAPS::table, wxT( "table_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_after].emplace_back( BITMAPS::table_add_column_after, wxT( "table_add_column_after_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_column_before].emplace_back( BITMAPS::table_add_column_before, wxT( "table_add_column_before_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_above].emplace_back( BITMAPS::table_add_row_above, wxT( "table_add_row_above_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_add_row_below].emplace_back( BITMAPS::table_add_row_below, wxT( "table_add_row_below_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_column].emplace_back( BITMAPS::table_delete_column, wxT( "table_delete_column_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_delete_row].emplace_back( BITMAPS::table_delete_row, wxT( "table_delete_row_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_edit].emplace_back( BITMAPS::table_edit, wxT( "table_edit_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select].emplace_back( BITMAPS::table_select, wxT( "table_select_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_column].emplace_back( BITMAPS::table_select_column, wxT( "table_select_column_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::table_select_row].emplace_back( BITMAPS::table_select_row, wxT( "table_select_row_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text].emplace_back( BITMAPS::text, wxT( "text_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_sketch].emplace_back( BITMAPS::text_sketch, wxT( "text_sketch_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::thermal_spokes].emplace_back( BITMAPS::thermal_spokes, wxT( "thermal_spokes_dark_64.png" ), 64, wxT( "dark" ) );
+4 -1
View File
@@ -121,7 +121,7 @@ wxBitmap BITMAP_STORE::GetBitmap( BITMAPS aBitmapId, int aHeight )
}
wxBitmapBundle BITMAP_STORE::GetBitmapBundle( BITMAPS aBitmapId )
wxBitmapBundle BITMAP_STORE::GetBitmapBundle( BITMAPS aBitmapId, int aMinHeight )
{
wxVector<wxBitmap> bmps;
@@ -130,6 +130,9 @@ wxBitmapBundle BITMAP_STORE::GetBitmapBundle( BITMAPS aBitmapId )
if( info.theme != m_theme )
continue;
if( aMinHeight > 0 && info.height < aMinHeight )
continue;
bmps.push_back( wxBitmap( getImage( info.id, info.height ) ) );
}
+6
View File
@@ -175,8 +175,14 @@ void BOARD_PRINTOUT::DrawPage( const wxString& aLayerName, int aPageNum, int aPa
gal->SetLookAtPoint( drawingAreaBBox.Centre() );
gal->SetZoomFactor( m_settings.m_scale );
gal->SetClearColor( dstSettings->GetBackgroundColor() );
// Clearing the screen for the background color needs the screen set to the page size
// in pixels. This can ?somehow? prevent some but not all foreground elements from being printed
// TODO: figure out what's going on here and fix printing. See also sch_printout
VECTOR2I size = gal->GetScreenPixelSize();
gal->ResizeScreen( pageSizePx.GetWidth(),pageSizePx.GetHeight() );
gal->ClearScreen();
gal->ResizeScreen( size.x, size.y );
if( m_gerbviewPrint )
// Mandatory in Gerbview to use the same order for printing as for screen redraw
+13 -3
View File
@@ -21,6 +21,10 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef DESIGN_BLOCK_H
#define DESIGN_BLOCK_H
#include <kicommon.h>
#include <lib_id.h>
#include <nlohmann/json.hpp>
@@ -41,6 +45,9 @@ public:
const wxString& GetSchematicFile() const { return m_schematicFile; }
void SetSchematicFile( const wxString& aFile ) { m_schematicFile = aFile; }
const wxString& GetBoardFile() const { return m_boardFile; }
void SetBoardFile( const wxString& aFile ) { m_boardFile = aFile; }
void SetFields( nlohmann::ordered_map<wxString, wxString>& aFields )
{
m_fields = std::move( aFields );
@@ -55,9 +62,12 @@ public:
private:
LIB_ID m_lib_id;
wxString m_schematicFile; ///< File name and path for schematic symbol.
wxString m_libDescription; ///< File name and path for documentation file.
wxString m_keywords; ///< Search keywords to find footprint in library.
wxString m_schematicFile; // File name and path for schematic file.
wxString m_boardFile; // File name and path for board file
wxString m_libDescription; // File name and path for documentation file.
wxString m_keywords; // Search keywords to find design block in library.
nlohmann::ordered_map<wxString, wxString> m_fields;
};
#endif
+12 -18
View File
@@ -21,10 +21,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* @file design_block_info.h
*/
#ifndef DESIGN_BLOCK_INFO_H_
#define DESIGN_BLOCK_INFO_H_
@@ -119,15 +115,16 @@ protected:
/// lazily load stuff not filled in by constructor. This may throw IO_ERRORS.
virtual void load(){};
DESIGN_BLOCK_LIST* m_owner; ///< provides access to DESIGN_BLOCK_LIB_TABLE
protected:
DESIGN_BLOCK_LIST* m_owner; ///< provides access to DESIGN_BLOCK_LIB_TABLE
bool m_loaded;
bool m_loaded;
wxString m_nickname; ///< library as known in DESIGN_BLOCK_LIB_TABLE
wxString m_dbname; ///< Module name.
int m_num; ///< Order number in the display list.
wxString m_doc; ///< Design block description.
wxString m_keywords; ///< Design block keywords.
wxString m_nickname; ///< library as known in DESIGN_BLOCK_LIB_TABLE
wxString m_dbname; ///< Module name.
int m_num; ///< Order number in the display list.
wxString m_doc; ///< Design block description.
wxString m_keywords; ///< Design block keywords.
};
@@ -141,9 +138,6 @@ protected:
class KICOMMON_API DESIGN_BLOCK_LIST
{
public:
typedef std::vector<std::unique_ptr<DESIGN_BLOCK_INFO>> DBILIST;
typedef SYNC_QUEUE<std::unique_ptr<IO_ERROR>> ERRLIST;
DESIGN_BLOCK_LIST() : m_lib_table( nullptr ) {}
virtual ~DESIGN_BLOCK_LIST() {}
@@ -154,7 +148,7 @@ public:
unsigned GetCount() const { return m_list.size(); }
/// Was forced to add this by modview_frame.cpp
const DBILIST& GetList() const { return m_list; }
const std::vector<std::unique_ptr<DESIGN_BLOCK_INFO>>& GetList() const { return m_list; }
/**
* @return Clears the design block info cache
@@ -209,10 +203,10 @@ public:
DESIGN_BLOCK_LIB_TABLE* GetTable() const { return m_lib_table; }
protected:
DESIGN_BLOCK_LIB_TABLE* m_lib_table = nullptr; ///< no ownership
DESIGN_BLOCK_LIB_TABLE* m_lib_table = nullptr; ///< no ownership
DBILIST m_list;
ERRLIST m_errors; ///< some can be PARSE_ERRORs also
std::vector<std::unique_ptr<DESIGN_BLOCK_INFO>> m_list;
SYNC_QUEUE<std::unique_ptr<IO_ERROR>> m_errors; ///< some can be PARSE_ERRORs also
};
#endif // DESIGN_BLOCK_INFO_H_
+19 -76
View File
@@ -110,49 +110,36 @@ bool DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles( DESIGN_BLOCK_LIB_TABLE* aTabl
m_progress_reporter = aProgressReporter;
if( m_progress_reporter )
{
m_progress_reporter->SetMaxProgress( m_queue_in.size() );
m_progress_reporter->Report( _( "Fetching design_block libraries..." ) );
}
m_cancelled = false;
m_lib_table = aTable;
// Clear data before reading files
m_errors.clear();
m_list.clear();
m_queue_in.clear();
m_queue_out.clear();
m_queue.clear();
if( aNickname )
{
m_queue_in.push( *aNickname );
m_queue.push( *aNickname );
}
else
{
for( const wxString& nickname : aTable->GetLogicalLibs() )
m_queue_in.push( nickname );
m_queue.push( nickname );
}
loadLibs();
if( !m_cancelled )
if( m_progress_reporter )
{
if( m_progress_reporter )
{
m_progress_reporter->SetMaxProgress( m_queue_out.size() );
m_progress_reporter->AdvancePhase();
m_progress_reporter->Report( _( "Loading design_blocks..." ) );
}
loadDesignBlocks();
if( m_progress_reporter )
m_progress_reporter->AdvancePhase();
m_progress_reporter->SetMaxProgress( (int) m_queue.size() );
m_progress_reporter->Report( _( "Loading design_blocks..." ) );
}
loadDesignBlocks();
if( m_progress_reporter )
m_progress_reporter->AdvancePhase();
if( m_cancelled )
m_list_timestamp = 0; // God knows what we got before we were canceled
else
@@ -162,53 +149,6 @@ bool DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles( DESIGN_BLOCK_LIB_TABLE* aTabl
}
void DESIGN_BLOCK_LIST_IMPL::loadLibs()
{
thread_pool& tp = GetKiCadThreadPool();
size_t num_returns = m_queue_in.size();
std::vector<std::future<size_t>> returns( num_returns );
auto loader_job =
[this]() -> size_t
{
wxString nickname;
size_t retval = 0;
if( !m_cancelled && m_queue_in.pop( nickname ) )
{
if( CatchErrors( [this, &nickname]()
{
m_lib_table->PrefetchLib( nickname );
m_queue_out.push( nickname );
} ) && m_progress_reporter )
{
m_progress_reporter->AdvanceProgress();
}
++retval;
}
return retval;
};
for( size_t ii = 0; ii < num_returns; ++ii )
returns[ii] = tp.submit( loader_job );
for( const std::future<size_t>& ret : returns )
{
std::future_status status = ret.wait_for( std::chrono::milliseconds( 250 ) );
while( status != std::future_status::ready )
{
if( m_progress_reporter && !m_progress_reporter->KeepRefreshing() )
m_cancelled = true;
status = ret.wait_for( std::chrono::milliseconds( 250 ) );
}
}
}
void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
{
LOCALE_IO toggle_locale;
@@ -221,16 +161,17 @@ void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
// TODO: blast LOCALE_IO into the sun
SYNC_QUEUE<std::unique_ptr<DESIGN_BLOCK_INFO>> queue_parsed;
thread_pool& tp = GetKiCadThreadPool();
size_t num_elements = m_queue_out.size();
std::vector<std::future<size_t>> returns( num_elements );
thread_pool& tp = GetKiCadThreadPool();
size_t num_elements = m_queue.size();
std::vector<std::future<size_t>> returns( num_elements );
auto db_thread =
[ this, &queue_parsed ]() -> size_t
{
wxString nickname;
if( m_cancelled || !m_queue_out.pop( nickname ) )
if( m_cancelled || !m_queue.pop( nickname ) )
return 0;
wxArrayString dbnames;
@@ -291,6 +232,8 @@ void DESIGN_BLOCK_LIST_IMPL::loadDesignBlocks()
DESIGN_BLOCK_LIST_IMPL::DESIGN_BLOCK_LIST_IMPL() :
m_list_timestamp( 0 ), m_progress_reporter( nullptr ), m_cancelled( false )
m_list_timestamp( 0 ),
m_progress_reporter( nullptr ),
m_cancelled( false )
{
}
+2 -3
View File
@@ -87,7 +87,6 @@ public:
PROGRESS_REPORTER* aProgressReporter = nullptr ) override;
protected:
void loadLibs();
void loadDesignBlocks();
private:
@@ -98,8 +97,8 @@ private:
*/
bool CatchErrors( const std::function<void()>& aFunc );
SYNC_QUEUE<wxString> m_queue_in;
SYNC_QUEUE<wxString> m_queue_out;
private:
SYNC_QUEUE<wxString> m_queue;
long long m_list_timestamp;
PROGRESS_REPORTER* m_progress_reporter;
std::atomic_bool m_cancelled;
+73 -18
View File
@@ -265,7 +265,10 @@ void DESIGN_BLOCK_IO::DesignBlockEnumerate( wxArrayString& aDesignBlockNames,
wxDir dir( aLibraryPath );
if( !dir.IsOpened() )
return;
{
THROW_IO_ERROR(
wxString::Format( _( "Design block '%s' does not exist." ), aLibraryPath ) );
}
wxString dirname;
wxString fileSpec = wxT( "*." ) + wxString( FILEEXT::KiCadDesignBlockPathExtension );
@@ -287,17 +290,23 @@ DESIGN_BLOCK* DESIGN_BLOCK_IO::DesignBlockLoad( const wxString& aLibraryPath,
+ FILEEXT::KiCadDesignBlockPathExtension + wxFileName::GetPathSeparator();
wxString dbSchPath = dbPath + aDesignBlockName + wxT( "." )
+ FILEEXT::KiCadSchematicFileExtension;
wxString dbPcbPath = dbPath + aDesignBlockName + wxT( "." ) + FILEEXT::KiCadPcbFileExtension;
wxString dbMetadataPath = dbPath + aDesignBlockName + wxT( "." ) + FILEEXT::JsonFileExtension;
if( !wxFileExists( dbSchPath ) )
return nullptr;
if( !wxDir::Exists( dbPath ) )
THROW_IO_ERROR( wxString::Format( _( "Design block '%s' does not exist." ), dbPath ) );
DESIGN_BLOCK* newDB = new DESIGN_BLOCK();
// Library name needs to be empty for when we fill it in with the correct library nickname
// one layer above
newDB->SetLibId( LIB_ID( wxEmptyString, aDesignBlockName ) );
newDB->SetSchematicFile( dbSchPath );
if( wxFileExists( dbSchPath ) )
newDB->SetSchematicFile( dbSchPath );
if( wxFileExists( dbPcbPath ) )
newDB->SetBoardFile( dbPcbPath );
// Parse the JSON file if it exists
if( wxFileExists( dbMetadataPath ) )
@@ -333,16 +342,27 @@ DESIGN_BLOCK* DESIGN_BLOCK_IO::DesignBlockLoad( const wxString& aLibraryPath,
}
catch( ... )
{
delete newDB;
THROW_IO_ERROR( wxString::Format(
_( "Design block metadata file '%s' could not be read." ), dbMetadataPath ) );
}
}
return newDB;
}
bool DESIGN_BLOCK_IO::DesignBlockExists( const wxString& aLibraryPath,
const wxString& aDesignBlockName,
const std::map<std::string, UTF8>* aProperties )
{
wxString dbPath = aLibraryPath + wxFileName::GetPathSeparator() + aDesignBlockName + wxT( "." )
+ FILEEXT::KiCadDesignBlockPathExtension + wxFileName::GetPathSeparator();
return wxDir::Exists( dbPath );
}
void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibraryPath,
const DESIGN_BLOCK* aDesignBlock,
const std::map<std::string, UTF8>* aProperties )
@@ -353,12 +373,24 @@ void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibra
THROW_IO_ERROR( _( "Design block does not have a valid library ID." ) );
}
if( !wxFileExists( aDesignBlock->GetSchematicFile() ) )
if( aDesignBlock->GetSchematicFile().IsEmpty() && aDesignBlock->GetBoardFile().IsEmpty() )
{
THROW_IO_ERROR( _( "Design block does not have a schematic or board file." ) );
}
if( !aDesignBlock->GetSchematicFile().IsEmpty()
&& !wxFileExists( aDesignBlock->GetSchematicFile() ) )
{
THROW_IO_ERROR( wxString::Format( _( "Schematic source file '%s' does not exist." ),
aDesignBlock->GetSchematicFile() ) );
}
if( !aDesignBlock->GetBoardFile().IsEmpty() && !wxFileExists( aDesignBlock->GetBoardFile() ) )
{
THROW_IO_ERROR( wxString::Format( _( "Board source file '%s' does not exist." ),
aDesignBlock->GetBoardFile() ) );
}
// Create the design block folder
wxFileName dbFolder( aLibraryPath + wxFileName::GetPathSeparator()
+ aDesignBlock->GetLibId().GetLibItemName() + wxT( "." )
@@ -374,23 +406,46 @@ void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibra
}
}
// The new schematic file name is based on the design block name, not the source sheet name
wxString dbSchematicFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName()
+ wxT( "." ) + FILEEXT::KiCadSchematicFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( aDesignBlock->GetSchematicFile() != dbSchematicFile )
if( !aDesignBlock->GetSchematicFile().IsEmpty() )
{
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( aDesignBlock->GetSchematicFile(), dbSchematicFile ) )
// The new schematic file name is based on the design block name, not the source sheet name
wxString dbSchematicFile = dbFolder.GetFullPath()
+ aDesignBlock->GetLibId().GetLibItemName() + wxT( "." )
+ FILEEXT::KiCadSchematicFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( aDesignBlock->GetSchematicFile() != dbSchematicFile )
{
THROW_IO_ERROR( wxString::Format(
_( "Schematic file '%s' could not be saved as design block at '%s'." ),
aDesignBlock->GetSchematicFile().GetData(), dbSchematicFile ) );
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( aDesignBlock->GetSchematicFile(), dbSchematicFile ) )
{
THROW_IO_ERROR( wxString::Format(
_( "Schematic file '%s' could not be saved as design block at '%s'." ),
aDesignBlock->GetSchematicFile().GetData(), dbSchematicFile ) );
}
}
}
if( !aDesignBlock->GetBoardFile().IsEmpty() )
{
// The new Board file name is based on the design block name, not the source sheet name
wxString dbBoardFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName()
+ wxT( "." ) + FILEEXT::KiCadPcbFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( aDesignBlock->GetBoardFile() != dbBoardFile )
{
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( aDesignBlock->GetBoardFile(), dbBoardFile ) )
{
THROW_IO_ERROR( wxString::Format(
_( "Board file '%s' could not be saved as design block at '%s'." ),
aDesignBlock->GetBoardFile().GetData(), dbBoardFile ) );
}
}
}
wxString dbMetadataFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName()
+ wxT( "." ) + FILEEXT::JsonFileExtension;
+1 -9
View File
@@ -76,10 +76,7 @@ public:
}
bool DesignBlockExists( const wxString& aLibraryPath, const wxString& aDesignBlockName,
const std::map<std::string, UTF8>* aProperties = nullptr )
{
return DesignBlockLoad( aLibraryPath, aDesignBlockName, true, aProperties ) != nullptr;
}
const std::map<std::string, UTF8>* aProperties = nullptr );
DESIGN_BLOCK* ImportDesignBlock( const wxString& aDesignBlockPath,
wxString& aDesignBlockNameOut,
@@ -106,11 +103,6 @@ public:
void DesignBlockDelete( const wxString& aLibraryPath, const wxString& aDesignBlockName,
const std::map<std::string, UTF8>* aProperties = nullptr );
virtual void PrefetchLib( const wxString& aLibraryPath,
const std::map<std::string, UTF8>* aProperties = nullptr )
{
}
};
#endif
+17 -8
View File
@@ -73,6 +73,23 @@ void DESIGN_BLOCK_LIB_TABLE_ROW::SetType( const wxString& aType )
}
bool DESIGN_BLOCK_LIB_TABLE_ROW::Refresh()
{
if( !plugin )
{
wxArrayString dummyList;
plugin.reset( DESIGN_BLOCK_IO_MGR::FindPlugin( type ) );
SetLoaded( false );
plugin->DesignBlockEnumerate( dummyList, GetFullURI( true ), true, GetProperties() );
SetLoaded( true );
return true;
}
return false;
}
DESIGN_BLOCK_LIB_TABLE::DESIGN_BLOCK_LIB_TABLE( DESIGN_BLOCK_LIB_TABLE* aFallBackTable ) :
LIB_TABLE( aFallBackTable )
{
@@ -322,14 +339,6 @@ void DESIGN_BLOCK_LIB_TABLE::DesignBlockEnumerate( wxArrayString& aDesignBlockN
}
void DESIGN_BLOCK_LIB_TABLE::PrefetchLib( const wxString& aNickname )
{
const DESIGN_BLOCK_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
row->plugin->PrefetchLib( row->GetFullURI( true ), row->GetProperties() );
}
const DESIGN_BLOCK_LIB_TABLE_ROW* DESIGN_BLOCK_LIB_TABLE::FindRow( const wxString& aNickname,
bool aCheckIfEnabled )
{
@@ -25,29 +25,34 @@
#include <project/project_file.h>
#include <wx/log.h>
#include <wx/tokenzr.h>
#include <settings/app_settings.h>
#include <string_utils.h>
#include <eda_pattern_match.h>
#include <design_block.h>
#include <design_block_lib_table.h>
#include <design_block_info.h>
#include <design_block_tree_model_adapter.h>
#include <tools/sch_design_block_control.h>
wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>
DESIGN_BLOCK_TREE_MODEL_ADAPTER::Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs )
DESIGN_BLOCK_TREE_MODEL_ADAPTER::Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool )
{
auto* adapter = new DESIGN_BLOCK_TREE_MODEL_ADAPTER( aParent, aLibs );
adapter->m_frame = aParent;
auto* adapter = new DESIGN_BLOCK_TREE_MODEL_ADAPTER( aParent, aLibs, aSettings, aContextMenuTool );
return wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>( adapter );
}
DESIGN_BLOCK_TREE_MODEL_ADAPTER::DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent,
LIB_TABLE* aLibs ) :
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_design_block_libs" ),
Kiface().KifaceSettings() ),
LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool ) :
LIB_TREE_MODEL_ADAPTER( aParent,
wxT( "pinned_design_block_libs" ),
Kiface().KifaceSettings()->m_DesignBlockChooserPanel.tree ),
m_libs( (DESIGN_BLOCK_LIB_TABLE*) aLibs ),
m_frame( aParent )
m_frame( aParent ),
m_contextMenuTool( aContextMenuTool )
{
}
@@ -193,6 +198,11 @@ wxString DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo( LIB_ID const& aLibId, in
html.Replace( "__FIELDS__", fieldTable );
}
else
{
html.Printf( _( "Error loading design block %s from library '%s'." ) + wxS( "\n" ),
aLibId.GetLibItemName().wx_str(), aLibId.GetLibNickname().wx_str() );
}
return html;
}
@@ -200,5 +210,5 @@ wxString DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo( LIB_ID const& aLibId, in
TOOL_INTERACTIVE* DESIGN_BLOCK_TREE_MODEL_ADAPTER::GetContextMenuTool()
{
return m_frame->GetToolManager()->GetTool<SCH_DESIGN_BLOCK_CONTROL>();
return m_contextMenuTool;
}
@@ -34,7 +34,9 @@ public:
* @param aLibs library set from which parts will be loaded
*/
static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( EDA_BASE_FRAME* aParent,
LIB_TABLE* aLibs );
LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool );
void AddLibraries( EDA_BASE_FRAME* aParent );
void ClearLibraries();
@@ -43,11 +45,15 @@ public:
TOOL_INTERACTIVE* GetContextMenuTool() override;
void SetLibTable( DESIGN_BLOCK_LIB_TABLE* aLibs ) { m_libs = aLibs; }
protected:
/**
* Constructor; takes a set of libraries to be included in the search.
*/
DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs );
DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool );
std::vector<LIB_TREE_ITEM*> getDesignBlocks( EDA_BASE_FRAME* aParent,
const wxString& aLibName );
@@ -57,6 +63,7 @@ protected:
protected:
DESIGN_BLOCK_LIB_TABLE* m_libs;
EDA_BASE_FRAME* m_frame;
TOOL_INTERACTIVE* m_contextMenuTool;
};
#endif // DESIGN_BLOCK_TREE_MODEL_ADAPTER_H
+26
View File
@@ -64,6 +64,18 @@ public:
m_win->Raise(); // let's focus back on the parent window
}
}
void SuspendForTrueModal()
{
if( m_win )
m_win->Enable();
}
void ResumeAfterTrueModal()
{
if( m_win )
m_win->Disable();
}
};
@@ -560,6 +572,20 @@ int DIALOG_SHIM::ShowQuasiModal()
}
void DIALOG_SHIM::PrepareForModalSubDialog()
{
if( m_qmodal_parent_disabler )
m_qmodal_parent_disabler->SuspendForTrueModal();
}
void DIALOG_SHIM::CleanupAfterModalSubDialog()
{
if( m_qmodal_parent_disabler )
m_qmodal_parent_disabler->ResumeAfterTrueModal();
}
void DIALOG_SHIM::EndQuasiModal( int retCode )
{
// Hook up validator and transfer data from controls handling so quasi-modal dialogs
+5 -3
View File
@@ -65,12 +65,14 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
m_errorGrid( nullptr ),
m_errorRow( -1 ),
m_errorCol( -1 ),
m_helpBox( nullptr ),
m_heightBeforeHelp( 400 )
m_helpBox( nullptr )
{
m_heightBeforeHelp = FromDIP ( 400 );
m_btnAddEnvVar->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
m_btnDeleteEnvVar->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) );
m_EnvVars->SetMinSize( FromDIP( m_EnvVars->GetMinSize() ) );
m_EnvVars->ClearRows();
m_EnvVars->AppendCols( 1 ); // for the isExternal flags
m_EnvVars->HideCol( TV_FLAG_COL );
@@ -81,7 +83,7 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
m_EnvVars->SetColAttr( TV_VALUE_COL, attr );
// Give a bit more room for combobox editors
m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + 4 );
m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + FromDIP( 4 ) );
m_EnvVars->PushEventHandler( new GRID_TRICKS( m_EnvVars,
[this]( wxCommandEvent& aEvent )
@@ -24,16 +24,16 @@
#include <dialogs/dialog_design_block_properties.h>
#include <sch_edit_frame.h>
#include <wx/msgdlg.h>
#include <wx/tooltip.h>
#include <grid_tricks.h>
#include <widgets/std_bitmap_button.h>
#include <bitmaps.h>
#include <design_block.h>
DIALOG_DESIGN_BLOCK_PROPERTIES::DIALOG_DESIGN_BLOCK_PROPERTIES( SCH_EDIT_FRAME* aParent,
DESIGN_BLOCK* aDesignBlock ) :
DIALOG_DESIGN_BLOCK_PROPERTIES::DIALOG_DESIGN_BLOCK_PROPERTIES( wxWindow* aParent,
DESIGN_BLOCK* aDesignBlock ) :
DIALOG_DESIGN_BLOCK_PROPERTIES_BASE( aParent ), m_designBlock( aDesignBlock )
{
if( !m_textName->IsEmpty() )
@@ -74,6 +74,7 @@ bool DIALOG_DESIGN_BLOCK_PROPERTIES::TransferDataToWindow()
// Typical assignment operator does not work here because of the ordered_map
auto source = m_designBlock->GetFields();
m_fields.clear();
for( const auto& field : source )
{
m_fields[field.first] = field.second;
@@ -22,6 +22,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef DIALOG_DESIGN_BLOCK_PROPERTIES_H
#define DIALOG_DESIGN_BLOCK_PROPERTIES_H
#include <dialogs/dialog_design_block_properties_base.h>
#include <nlohmann/json.hpp>
@@ -31,7 +34,7 @@ class DESIGN_BLOCK;
class DIALOG_DESIGN_BLOCK_PROPERTIES : public DIALOG_DESIGN_BLOCK_PROPERTIES_BASE
{
public:
DIALOG_DESIGN_BLOCK_PROPERTIES( SCH_EDIT_FRAME* aParent, DESIGN_BLOCK* aDesignBlock );
DIALOG_DESIGN_BLOCK_PROPERTIES( wxWindow* aParent, DESIGN_BLOCK* aDesignBlock );
~DIALOG_DESIGN_BLOCK_PROPERTIES() override;
bool TransferDataToWindow() override;
@@ -50,6 +53,8 @@ public:
private:
void AdjustGridColumns( int aWidth );
DESIGN_BLOCK* m_designBlock;
DESIGN_BLOCK* m_designBlock;
nlohmann::ordered_map<wxString, wxString> m_fields;
};
#endif
+3 -3
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -36,13 +36,13 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindow
int m_outputModeNChoices = sizeof( m_outputModeChoices ) / sizeof( wxString );
m_outputMode = new wxChoice( m_sbOptionsSizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputModeNChoices, m_outputModeChoices, 0 );
m_outputMode->SetSelection( 0 );
m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_gbOptionsSizer->Add( m_outputMode, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_titleBlock = new wxCheckBox( m_sbOptionsSizer->GetStaticBox(), wxID_FRAME_SEL, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
m_titleBlock->SetValue(true);
m_titleBlock->SetToolTip( _("Print Frame references.") );
m_gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_gbOptionsSizer->Add( m_titleBlock, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_gbOptionsSizer->AddGrowableCol( 1 );
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-254-gc2ef7767)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -42,8 +42,8 @@ class DIALOG_PRINT_GENERIC_BASE : public DIALOG_SHIM
protected:
enum
{
wxID_FRAME_SEL = 1000,
wxID_PRINT_OPTIONS
wxID_FRAME_SEL = 8200,
wxID_PRINT_OPTIONS,
};
wxBoxSizer* m_bUpperSizer;
+1 -1
View File
@@ -29,7 +29,7 @@ DIALOG_RC_JOB_BASE::DIALOG_RC_JOB_BASE( wxWindow* parent, wxWindowID id, const w
m_textCtrlOutputPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrlOutputPath->SetMinSize( wxSize( 350,-1 ) );
fgSizer1->Add( m_textCtrlOutputPath, 1, wxALIGN_CENTER_VERTICAL, 5 );
fgSizer1->Add( m_textCtrlOutputPath, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticText18 = new wxStaticText( this, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText18->Wrap( -1 );
+3 -3
View File
@@ -50,7 +50,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_RC_JOB_BASE</property>
<property name="pos"></property>
<property name="size"></property>
<property name="size">443,239</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h; forward_declare</property>
<property name="title"></property>
@@ -144,8 +144,8 @@
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
+1 -1
View File
@@ -56,7 +56,7 @@ class KICOMMON_API DIALOG_RC_JOB_BASE : public DIALOG_SHIM
public:
DIALOG_RC_JOB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_RC_JOB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 443,239 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_RC_JOB_BASE();
+4
View File
@@ -57,6 +57,10 @@ WX_PT_ENTRY_DIALOG::WX_PT_ENTRY_DIALOG( EDA_DRAW_FRAME* aParent, const wxString&
{
m_labelX->SetLabel( aLabelX );
m_labelY->SetLabel( aLabelY );
m_unit_binder_x.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
m_unit_binder_y.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
m_unit_binder_x.SetValue( aDefaultValue.x );
m_unit_binder_y.SetValue( aDefaultValue.y );
+11 -8
View File
@@ -32,6 +32,7 @@
// wxWidgets spends *far* too long calculating column widths (most of it, believe it or
// not, in repeatedly creating/destroying a wxDC to do the measurement in).
// Use default column widths instead.
// Note, these are "standard DPI" widths
static int DEFAULT_SINGLE_COL_WIDTH = 260;
static int DEFAULT_COL_WIDTHS[] = { 200, 300 };
@@ -43,6 +44,8 @@ EDA_LIST_DIALOG::EDA_LIST_DIALOG( wxWindow* aParent, const wxString& aTitle,
EDA_LIST_DIALOG_BASE( aParent, wxID_ANY, aTitle ),
m_sortList( aSortList )
{
// correct for wxfb not supporting FromDIP
m_listBox->SetMinSize( FromDIP( m_listBox->GetMinSize() ) );
m_filterBox->SetHint( _( "Filter" ) );
initDialog( aItemHeaders, aItemList, aPreselectText );
@@ -96,21 +99,21 @@ void EDA_LIST_DIALOG::initDialog( const wxArrayString& aItemHeaders,
if( aItemHeaders.Count() == 1 )
{
m_listBox->InsertColumn( 0, aItemHeaders.Item( 0 ), wxLIST_FORMAT_LEFT,
DEFAULT_SINGLE_COL_WIDTH );
FromDIP( DEFAULT_SINGLE_COL_WIDTH ) );
m_listBox->SetMinClientSize( wxSize( DEFAULT_SINGLE_COL_WIDTH, 200 ) );
SetMinClientSize( wxSize( DEFAULT_COL_WIDTHS[0], 220 ) );
m_listBox->SetMinClientSize( FromDIP( wxSize( DEFAULT_SINGLE_COL_WIDTH, 200 ) ) );
SetMinClientSize( FromDIP( wxSize( DEFAULT_COL_WIDTHS[0], 220 ) ) );
}
else if( aItemHeaders.Count() == 2 )
{
for( unsigned i = 0; i < aItemHeaders.Count(); i++ )
{
m_listBox->InsertColumn( i, aItemHeaders.Item( i ), wxLIST_FORMAT_LEFT,
DEFAULT_COL_WIDTHS[ i ] );
FromDIP( DEFAULT_COL_WIDTHS[ i ] ) );
}
m_listBox->SetMinClientSize( wxSize( DEFAULT_COL_WIDTHS[0] * 3, 200 ) );
SetMinClientSize( wxSize( DEFAULT_COL_WIDTHS[0] * 2, 220 ) );
m_listBox->SetMinClientSize( FromDIP( wxSize( DEFAULT_COL_WIDTHS[0] * 3, 200 ) ) );
SetMinClientSize( FromDIP( wxSize( DEFAULT_COL_WIDTHS[0] * 2, 220 ) ) );
}
m_itemsList = aItemList;
@@ -126,7 +129,7 @@ void EDA_LIST_DIALOG::initDialog( const wxArrayString& aItemHeaders,
// Set to a small size so EnsureVisible() won't be foiled by later additions.
// ListBox will expand to fit later.
m_listBox->SetSize( m_listBox->GetSize().GetX(), 100 );
m_listBox->SetSize( m_listBox->GetSize().GetX(), FromDIP( 100 ) );
m_listBox->EnsureVisible( sel );
}
}
@@ -230,7 +233,7 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList,
info.m_itemId = row + position;
info.m_col = col;
info.m_text = itemList[row].Item( col );
info.m_width = DEFAULT_COL_WIDTHS[ col ];
info.m_width = FromDIP( DEFAULT_COL_WIDTHS[ col ] );
info.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_WIDTH;
if( col == 0 )
+8 -12
View File
@@ -193,20 +193,16 @@ void PANEL_COLOR_SETTINGS::OnThemeChanged( wxCommandEvent& event )
void PANEL_COLOR_SETTINGS::updateSwatches()
{
if( m_swatches.empty() )
{
createSwatches();
}
else
{
bool isReadOnly = m_currentSettings->IsReadOnly();
COLOR4D background = m_currentSettings->GetColor( m_backgroundLayer );
for( std::pair<int, COLOR_SWATCH*> pair : m_swatches )
{
pair.second->SetSwatchBackground( background );
pair.second->SetSwatchColor( m_currentSettings->GetColor( pair.first ), false );
pair.second->SetReadOnly( isReadOnly );
}
bool isReadOnly = m_currentSettings->IsReadOnly();
COLOR4D background = m_currentSettings->GetColor( m_backgroundLayer );
for( std::pair<int, COLOR_SWATCH*> pair : m_swatches )
{
pair.second->SetSwatchBackground( background );
pair.second->SetSwatchColor( m_currentSettings->GetColor( pair.first ), false );
pair.second->SetReadOnly( isReadOnly );
}
}
@@ -633,6 +633,46 @@ bool PANEL_DESIGN_BLOCK_LIB_TABLE::verifyTables()
}
}
for( DESIGN_BLOCK_LIB_TABLE* table : { global_model(), project_model() } )
{
if( !table )
continue;
for( unsigned int r = 0; r < table->GetCount(); ++r )
{
DESIGN_BLOCK_LIB_TABLE_ROW& row =
dynamic_cast<DESIGN_BLOCK_LIB_TABLE_ROW&>( table->At( r ) );
// Newly-added rows won't have set this yet
row.SetParent( table );
if( !row.GetIsEnabled() )
continue;
try
{
if( row.Refresh() )
{
if( table == global_model() )
m_parent->m_GlobalTableChanged = true;
else
m_parent->m_ProjectTableChanged = true;
}
}
catch( const IO_ERROR& ioe )
{
msg.Printf( _( "Design block library '%s' failed to load." ), row.GetNickName() );
wxWindow* topLevelParent = wxGetTopLevelParent( this );
wxMessageDialog errdlg( topLevelParent, msg + wxS( "\n" ) + ioe.What(),
_( "Error Loading Library" ) );
errdlg.ShowModal();
return true;
}
}
}
return true;
}
+89 -42
View File
@@ -103,6 +103,24 @@ PANEL_EMBEDDED_FILES::PANEL_EMBEDDED_FILES( wxWindow* parent, EMBEDDED_FILES* aF
m_files_grid->EnableAlternateRowColors();
m_files_grid->PushEventHandler( new EMBEDDED_FILES_GRID_TRICKS( m_files_grid ) );
m_localFiles->SetFileAddedCallback( [this](EMBEDDED_FILES::EMBEDDED_FILE* file) {
for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ )
{
if( m_files_grid->GetCellValue( ii, 1 ) == file->GetLink() )
{
m_files_grid->DeleteRows( ii );
break;
}
}
m_files_grid->AppendRows( 1 );
int ii = m_files_grid->GetNumberRows() - 1;
m_files_grid->SetCellValue( ii, 0, file->name );
m_files_grid->SetCellValue( ii, 1, file->GetLink() );
});
}
@@ -255,56 +273,85 @@ void PANEL_EMBEDDED_FILES::onFontEmbedClick( wxCommandEvent& event )
}
EMBEDDED_FILES::EMBEDDED_FILE* PANEL_EMBEDDED_FILES::AddEmbeddedFile( const wxString& aFile )
{
wxFileName fileName( aFile );
wxString name = fileName.GetFullName();
if( m_localFiles->HasFile( name ) )
{
wxString msg = wxString::Format( _( "File '%s' already exists." ), name );
KIDIALOG errorDlg( m_parent, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
errorDlg.SetOKLabel( _( "Overwrite" ) );
if( errorDlg.ShowModal() != wxID_OK )
return nullptr;
for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ )
{
if( m_files_grid->GetCellValue( ii, 0 ) == name )
{
m_files_grid->DeleteRows( ii );
break;
}
}
}
EMBEDDED_FILES::EMBEDDED_FILE* result = m_localFiles->AddFile( fileName, true );
if( !result )
{
wxString msg = wxString::Format( _( "Failed to add file '%s'." ), name );
KIDIALOG errorDlg( m_parent, msg, _( "Error" ), wxOK | wxICON_ERROR );
errorDlg.ShowModal();
return nullptr;
}
return result;
}
void PANEL_EMBEDDED_FILES::onAddEmbeddedFile( wxCommandEvent& event )
{
wxFileDialog fileDialog( this, _( "Select a file to embed" ), wxEmptyString, wxEmptyString,
_( "All files|*.*" ), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
if( fileDialog.ShowModal() == wxID_OK )
{
wxFileName fileName( fileDialog.GetPath() );
wxString name = fileName.GetFullName();
if( m_localFiles->HasFile( name ) )
{
wxString msg = wxString::Format( _( "File '%s' already exists." ), name );
KIDIALOG errorDlg( m_parent, msg, _( "Confirmation" ),
wxOK | wxCANCEL | wxICON_WARNING );
errorDlg.SetOKLabel( _( "Overwrite" ) );
if( errorDlg.ShowModal() != wxID_OK )
return;
for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ )
{
if( m_files_grid->GetCellValue( ii, 0 ) == name )
{
m_files_grid->DeleteRows( ii );
break;
}
}
}
EMBEDDED_FILES::EMBEDDED_FILE* result = m_localFiles->AddFile( fileName, true );
if( !result )
{
wxString msg = wxString::Format( _( "Failed to add file '%s'." ),
name );
KIDIALOG errorDlg( m_parent, msg, _( "Error" ), wxOK | wxICON_ERROR );
errorDlg.ShowModal();
return;
}
m_files_grid->AppendRows( 1 );
int ii = m_files_grid->GetNumberRows() - 1;
m_files_grid->SetCellValue( ii, 0, name );
m_files_grid->SetCellValue( ii, 1, result->GetLink() );
}
AddEmbeddedFile( fileDialog.GetPath() );
}
bool PANEL_EMBEDDED_FILES::RemoveEmbeddedFile( const wxString& aFileName )
{
wxString name = aFileName;
if( name.StartsWith( FILEEXT::KiCadUriPrefix ) )
name = name.Mid( FILEEXT::KiCadUriPrefix.size() + 3 );
int row = std::max( 0, m_files_grid->GetGridCursorRow() );
for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ )
{
if( m_files_grid->GetCellValue( ii, 0 ) == name )
{
m_files_grid->DeleteRows( ii );
m_localFiles->RemoveFile( name );
if( row < m_files_grid->GetNumberRows() )
m_files_grid->SetGridCursor( row, 0 );
else if( m_files_grid->GetNumberRows() > 0 )
m_files_grid->SetGridCursor( m_files_grid->GetNumberRows() - 1, 0 );
return true;
}
}
return false;
}
void PANEL_EMBEDDED_FILES::onDeleteEmbeddedFile( wxCommandEvent& event )
{
int row = m_files_grid->GetGridCursorRow();
+5 -2
View File
@@ -24,12 +24,11 @@
#ifndef PANEL_EMBEDDED_FILES_H
#define PANEL_EMBEDDED_FILES_H
#include <embedded_files.h>
#include "panel_embedded_files_base.h"
#include "grid_tricks.h"
class EMBEDDED_FILES;
class EMBEDDED_FILES_GRID_TRICKS : public GRID_TRICKS
{
enum
@@ -63,6 +62,10 @@ public:
bool TransferDataToWindow() override;
bool GetEmbedFonts() const { return m_cbEmbedFonts->GetValue(); }
EMBEDDED_FILES* GetLocalFiles() { return m_localFiles; }
EMBEDDED_FILES::EMBEDDED_FILE* AddEmbeddedFile( const wxString& aFileName );
bool RemoveEmbeddedFile( const wxString& aFileName );
protected:
void onFontEmbedClick( wxCommandEvent& event ) override;
void onAddEmbeddedFile( wxCommandEvent& event ) override;
+5 -14
View File
@@ -34,10 +34,11 @@
#include <drawing_sheet/drawing_sheet_lexer.h>
#include <drawing_sheet/ds_file_versions.h>
#include <font/font.h>
#include <io/kicad/kicad_io_utils.h>
#include <string_utils.h>
#include <wx/base64.h>
#include <wx/msgdlg.h>
#include <wx/mstream.h>
using namespace DRAWINGSHEET_T;
@@ -422,21 +423,11 @@ void DS_DATA_MODEL_IO::format( DS_DATA_ITEM_BITMAP* aItem ) const
// Write image in png readable format
m_out->Print( "(data" );
wxString out = wxBase64Encode( aItem->m_ImageBitmap->GetImageDataBuffer() );
wxMemoryOutputStream stream;
aItem->m_ImageBitmap->SaveImageData( stream );
// Apparently the MIME standard character width for base64 encoding is 76 (unconfirmed)
// so use it in a vain attempt to be standard like.
#define MIME_BASE64_LENGTH 76
KICAD_FORMAT::FormatStreamData( *m_out, *stream.GetOutputStreamBuffer() );
size_t first = 0;
while( first < out.Length() )
{
m_out->Print( "\n\"%s\"", TO_UTF8( out( first, MIME_BASE64_LENGTH ) ) );
first += MIME_BASE64_LENGTH;
}
m_out->Print( ")" ); // Closes data token.
m_out->Print( ")" ); // Closes bitmap token.
}
+4 -4
View File
@@ -555,9 +555,9 @@ void EDA_BASE_FRAME::ShowChangedLanguage()
}
void EDA_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
void EDA_BASE_FRAME::CommonSettingsChanged( int aFlags )
{
TOOLS_HOLDER::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
TOOLS_HOLDER::CommonSettingsChanged( aFlags );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
@@ -791,7 +791,7 @@ void EDA_BASE_FRAME::LoadWindowSettings( const WINDOW_SETTINGS* aCfg )
m_perspective = aCfg->perspective;
m_mruPath = aCfg->mru_path;
TOOLS_HOLDER::CommonSettingsChanged( false, false );
TOOLS_HOLDER::CommonSettingsChanged();
}
@@ -1288,7 +1288,7 @@ void EDA_BASE_FRAME::ShowPreferences( wxString aStartPage, wxString aStartParent
// Update our grids that are cached in the tool
m_toolManager->ResetTools( TOOL_BASE::REDRAW );
Pgm().GetSettingsManager().Save();
dlg.Kiway().CommonSettingsChanged( false, false );
dlg.Kiway().CommonSettingsChanged( HOTKEYS_CHANGED );
}
}
+2 -2
View File
@@ -293,9 +293,9 @@ void EDA_DRAW_FRAME::ToggleUserUnits()
}
void EDA_DRAW_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
void EDA_DRAW_FRAME::CommonSettingsChanged( int aFlags )
{
EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
EDA_BASE_FRAME::CommonSettingsChanged( aFlags );
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
KIGFX::VIEW_CONTROLS* viewControls = GetCanvas()->GetViewControls();
+7 -8
View File
@@ -2206,16 +2206,15 @@ static struct EDA_SHAPE_DESC
.Map( SHAPE_T::POLY, _HKI( "Polygon" ) )
.Map( SHAPE_T::BEZIER, _HKI( "Bezier" ) );
auto& plotDashTypeEnum = ENUM_MAP<LINE_STYLE>::Instance();
ENUM_MAP<LINE_STYLE>& lineStyleEnum = ENUM_MAP<LINE_STYLE>::Instance();
if( plotDashTypeEnum.Choices().GetCount() == 0 )
if( lineStyleEnum.Choices().GetCount() == 0 )
{
plotDashTypeEnum.Map( LINE_STYLE::DEFAULT, _HKI( "Default" ) )
.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
lineStyleEnum.Map( LINE_STYLE::SOLID, _HKI( "Solid" ) )
.Map( LINE_STYLE::DASH, _HKI( "Dashed" ) )
.Map( LINE_STYLE::DOT, _HKI( "Dotted" ) )
.Map( LINE_STYLE::DASHDOT, _HKI( "Dash-Dot" ) )
.Map( LINE_STYLE::DASHDOTDOT, _HKI( "Dash-Dot-Dot" ) );
}
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
+63 -3
View File
@@ -10,8 +10,8 @@
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
@@ -101,7 +101,11 @@ EMBEDDED_FILES::EMBEDDED_FILE* EMBEDDED_FILES::AddFile( const wxFileName& aName,
efile->is_valid = true;
m_files[aName.GetFullName()] = efile.release();
EMBEDDED_FILE* result = efile.release();
m_files[aName.GetFullName()] = result;
if( m_fileAddedCallback )
m_fileAddedCallback( result );
return m_files[aName.GetFullName()];
}
@@ -110,6 +114,9 @@ EMBEDDED_FILES::EMBEDDED_FILE* EMBEDDED_FILES::AddFile( const wxFileName& aName,
void EMBEDDED_FILES::AddFile( EMBEDDED_FILE* aFile )
{
m_files.insert( { aFile->name, aFile } );
if( m_fileAddedCallback )
m_fileAddedCallback( aFile );
}
@@ -516,3 +523,56 @@ const std::vector<wxString>* EMBEDDED_FILES::UpdateFontFiles()
return &m_fontFiles;
}
// Move constructor
EMBEDDED_FILES::EMBEDDED_FILES( EMBEDDED_FILES&& other ) noexcept :
m_files( std::move( other.m_files ) ),
m_fontFiles( std::move( other.m_fontFiles ) ),
m_fileAddedCallback( std::move( other.m_fileAddedCallback ) ),
m_embedFonts( other.m_embedFonts )
{
other.m_embedFonts = false;
}
// Move assignment operator
EMBEDDED_FILES& EMBEDDED_FILES::operator=(EMBEDDED_FILES&& other) noexcept
{
if (this != &other)
{
ClearEmbeddedFiles();
m_files = std::move( other.m_files );
m_fontFiles = std::move( other.m_fontFiles );
m_fileAddedCallback = std::move( other.m_fileAddedCallback );
m_embedFonts = other.m_embedFonts;
other.m_embedFonts = false;
}
return *this;
}
// Copy constructor
EMBEDDED_FILES::EMBEDDED_FILES( const EMBEDDED_FILES& other ) : m_embedFonts( other.m_embedFonts )
{
for( const auto& [name, file] : other.m_files )
{
m_files[name] = new EMBEDDED_FILE( *file );
}
m_fontFiles = other.m_fontFiles;
m_fileAddedCallback = other.m_fileAddedCallback;
}
// Copy assignment operator
EMBEDDED_FILES& EMBEDDED_FILES::operator=( const EMBEDDED_FILES& other )
{
if( this != &other )
{
ClearEmbeddedFiles();
for( const auto& [name, file] : other.m_files )
{
m_files[name] = new EMBEDDED_FILE( *file );
}
m_fontFiles = other.m_fontFiles;
m_fileAddedCallback = other.m_fileAddedCallback;
m_embedFonts = other.m_embedFonts;
}
return *this;
}
+3
View File
@@ -127,6 +127,7 @@ private:
static MARKUP_CACHE s_markupCache( 1024 );
static std::mutex s_markupCacheMutex;
static std::mutex s_defaultFontMutex;;
FONT::FONT()
@@ -136,6 +137,8 @@ FONT::FONT()
FONT* FONT::getDefaultFont()
{
std::lock_guard lock( s_defaultFontMutex );
if( !s_defaultFont )
s_defaultFont = STROKE_FONT::LoadFont( wxEmptyString );
+3 -1
View File
@@ -19,7 +19,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <mutex>
#include <font/fontconfig.h>
#include <wx/log.h>
#include <trace_helpers.h>
@@ -40,6 +40,7 @@ static FONTCONFIG* g_config = nullptr;
static bool g_fcInitSuccess = false;
REPORTER* FONTCONFIG::s_reporter = nullptr;
static std::mutex g_fontConfigMutex;
/**
* A simple wrapper to avoid exporting fontconfig in the header
@@ -63,6 +64,7 @@ FONTCONFIG::FONTCONFIG()
void fontconfig::FONTCONFIG::SetReporter( REPORTER* aReporter )
{
std::lock_guard lock( g_fontConfigMutex );
s_reporter = aReporter;
}
+9 -8
View File
@@ -63,6 +63,15 @@ void FP_LIB_TABLE_ROW::SetType( const wxString& aType )
}
bool FP_LIB_TABLE_ROW::LibraryExists() const
{
if( plugin )
return plugin->CanReadLibrary( GetFullURI( true ) );
return false;
}
FP_LIB_TABLE::FP_LIB_TABLE( FP_LIB_TABLE* aFallBackTable ) :
LIB_TABLE( aFallBackTable )
{
@@ -307,14 +316,6 @@ void FP_LIB_TABLE::FootprintEnumerate( wxArrayString& aFootprintNames, const wxS
}
void FP_LIB_TABLE::PrefetchLib( const wxString& aNickname )
{
const FP_LIB_TABLE_ROW* row = FindRow( aNickname, true );
wxASSERT( row->plugin );
row->plugin->PrefetchLib( row->GetFullURI( true ), row->GetProperties() );
}
const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool aCheckIfEnabled )
{
FP_LIB_TABLE_ROW* row = static_cast<FP_LIB_TABLE_ROW*>( findRow( aNickname, aCheckIfEnabled ) );
+1
View File
@@ -63,6 +63,7 @@ bool GIT_CLONE_HANDLER::PerformClone()
cloneOptions.fetch_opts.callbacks.payload = this;
m_testedTypes = 0;
ResetNextKey();
if( git_clone( &m_repo, m_URL.ToStdString().c_str(), m_clonePath.ToStdString().c_str(),
&cloneOptions ) != 0 )
+4 -1
View File
@@ -29,7 +29,7 @@
#include <iostream>
#include <time.h>
GIT_PULL_HANDLER::GIT_PULL_HANDLER( git_repository* aRepo ) : KIGIT_COMMON( aRepo )
GIT_PULL_HANDLER::GIT_PULL_HANDLER( KIGIT_COMMON* aRepo ) : KIGIT_COMMON( *aRepo )
{}
@@ -55,6 +55,9 @@ bool GIT_PULL_HANDLER::PerformFetch()
remoteCallbacks.credentials = credentials_cb;
remoteCallbacks.payload = this;
m_testedTypes = 0;
ResetNextKey();
if( git_remote_connect( remote, GIT_DIRECTION_FETCH, &remoteCallbacks, nullptr, nullptr ) )
{
git_remote_free( remote );
+7 -7
View File
@@ -42,14 +42,14 @@ struct CommitDetails
std::string m_date;
};
// Enum for result codes
enum class PullResult
// Enum for result codes, error codes are negative, success codes are positive
enum class PullResult : int
{
Success,
Error,
MergeFailed = -2,
Error = -1,
Success = 0,
UpToDate,
FastForward,
MergeFailed
FastForward
};
struct ConflictData
@@ -68,7 +68,7 @@ struct ConflictData
class GIT_PULL_HANDLER : public KIGIT_COMMON, public GIT_PROGRESS
{
public:
GIT_PULL_HANDLER( git_repository* aRepo );
GIT_PULL_HANDLER( KIGIT_COMMON* aCommon );
~GIT_PULL_HANDLER();
PullResult PerformPull();
+1 -1
View File
@@ -26,7 +26,7 @@
#include <iostream>
GIT_PUSH_HANDLER::GIT_PUSH_HANDLER( git_repository* aRepo ) : KIGIT_COMMON( aRepo )
GIT_PUSH_HANDLER::GIT_PUSH_HANDLER( KIGIT_COMMON* aRepo ) : KIGIT_COMMON( *aRepo )
{}
+1 -1
View File
@@ -43,7 +43,7 @@ enum class PushResult
class GIT_PUSH_HANDLER : public KIGIT_COMMON, public GIT_PROGRESS
{
public:
GIT_PUSH_HANDLER( git_repository* aRepo );
GIT_PUSH_HANDLER( KIGIT_COMMON* aRepo );
~GIT_PUSH_HANDLER();
PushResult PerformPush();
+214 -3
View File
@@ -23,8 +23,12 @@
#include "kicad_git_common.h"
#include <kiplatform/secrets.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/textfile.h>
#include <wx/utils.h>
#include <map>
#include <vector>
@@ -70,7 +74,7 @@ wxString KIGIT_COMMON::GetCurrentBranchName() const
git_reference_free( branch );
return branchName;
return wxString( branchName );
}
@@ -387,6 +391,207 @@ bool KIGIT_COMMON::HasPushAndPullRemote() const
}
wxString KIGIT_COMMON::GetRemotename() const
{
wxString retval;
git_reference* head = nullptr;
git_reference* upstream = nullptr;
if( git_repository_head( &head, m_repo ) != GIT_OK )
return retval;
if( git_branch_upstream( &upstream, head ) == GIT_OK )
{
git_buf remote_name = GIT_BUF_INIT_CONST( nullptr, 0 );
if( git_branch_remote_name( &remote_name, m_repo, git_reference_name( upstream ) ) == GIT_OK )
{
retval = remote_name.ptr;
git_buf_dispose( &remote_name );
}
git_reference_free( upstream );
}
git_reference_free( head );
return retval;
}
void KIGIT_COMMON::SetSSHKey( const wxString& aKey )
{
auto it = std::find( m_publicKeys.begin(), m_publicKeys.end(), aKey );
if( it != m_publicKeys.end() )
m_publicKeys.erase( it );
m_publicKeys.insert( m_publicKeys.begin(), aKey );
}
void KIGIT_COMMON::updatePublicKeys()
{
m_publicKeys.clear();
wxFileName keyFile( wxGetHomeDir(), wxEmptyString );
keyFile.AppendDir( ".ssh" );
keyFile.SetFullName( "id_rsa" );
if( keyFile.FileExists() )
m_publicKeys.push_back( keyFile.GetFullPath() );
keyFile.SetFullName( "id_dsa" );
if( keyFile.FileExists() )
m_publicKeys.push_back( keyFile.GetFullPath() );
keyFile.SetFullName( "id_ecdsa" );
if( keyFile.FileExists() )
m_publicKeys.push_back( keyFile.GetFullPath() );
keyFile.SetFullName( "id_ed25519" );
if( keyFile.FileExists() )
m_publicKeys.push_back( keyFile.GetFullPath() );
// Parse SSH config file for hostname information
wxFileName sshConfig( wxGetHomeDir(), wxEmptyString );
sshConfig.AppendDir( ".ssh" );
sshConfig.SetFullName( "config" );
if( sshConfig.FileExists() )
{
wxTextFile configFile( sshConfig.GetFullPath() );
configFile.Open();
bool match = false;
for( wxString line = configFile.GetFirstLine(); !configFile.Eof(); line = configFile.GetNextLine() )
{
line.Trim( false ).Trim( true );
if( line.StartsWith( "Host " ) )
match = false;
// The difference here is that we are matching either "Hostname" or "Host" to get the
// match. This is because in the absence of a "Hostname" line, the "Host" line is used
if( line.StartsWith( "Host" ) && line.Contains( m_hostname ) )
match = true;
if( match && line.StartsWith( "IdentityFile" ) )
{
wxString keyPath = line.AfterFirst( ' ' ).Trim( false ).Trim( true );
// Expand ~ to home directory if present
if( keyPath.StartsWith( "~" ) )
keyPath.Replace( "~", wxGetHomeDir(), false );
// Add the public key to the beginning of the list
if( wxFileName::FileExists( keyPath ) )
SetSSHKey( keyPath );
}
}
configFile.Close();
}
}
void KIGIT_COMMON::UpdateCurrentBranchInfo()
{
// We want to get the current branch's upstream url as well as the stored password
// if one exists given the url and username.
wxString remote_name = GetRemotename();
git_remote* remote = nullptr;
if( git_remote_lookup( &remote, m_repo, remote_name.ToStdString().c_str() ) == GIT_OK )
{
const char* url = git_remote_url( remote );
if( url )
m_remote = url;
git_remote_free( remote );
}
// Find the stored password if it exists
KIPLATFORM::SECRETS::GetSecret( m_remote, m_username, m_password );
updateConnectionType();
updatePublicKeys();
}
void KIGIT_COMMON::updateConnectionType()
{
if( m_remote.StartsWith( "https://" ) || m_remote.StartsWith( "http://" ) )
m_connType = GIT_CONN_TYPE::GIT_CONN_HTTPS;
else if( m_remote.StartsWith( "ssh://" ) || m_remote.StartsWith( "git@" ) || m_remote.StartsWith( "git+ssh://" ) )
m_connType = GIT_CONN_TYPE::GIT_CONN_SSH;
else
m_connType = GIT_CONN_TYPE::GIT_CONN_LOCAL;
if( m_connType != GIT_CONN_TYPE::GIT_CONN_LOCAL )
{
wxString uri = m_remote;
size_t atPos = uri.find( '@' );
if( atPos != wxString::npos )
{
size_t protoEnd = uri.find( "//" );
if( protoEnd != wxString::npos )
{
wxString credentials = uri.Mid( protoEnd + 2, atPos - protoEnd - 2 );
size_t colonPos = credentials.find( ':' );
if( colonPos != wxString::npos )
{
m_username = credentials.Left( colonPos );
m_password = credentials.Mid( colonPos + 1, credentials.Length() - colonPos - 1 );
}
else
{
m_username = credentials;
}
}
else
{
m_username = uri.Left( atPos );
}
}
if( m_remote.StartsWith( "git@" ) )
{
// SSH format: git@hostname:path
size_t colonPos = m_remote.find( ':' );
if( colonPos != wxString::npos )
m_hostname = m_remote.Mid( 4, colonPos - 4 );
}
else
{
// other URL format: proto://[user@]hostname/path
size_t hostStart = m_remote.find( "://" ) + 2;
size_t hostEnd = m_remote.find( '/', hostStart );
wxString host;
if( hostEnd != wxString::npos )
host = m_remote.Mid( hostStart, hostEnd - hostStart );
else
host = m_remote.Mid( hostStart );
atPos = host.find( '@' );
if( atPos != wxString::npos )
m_hostname = host.Mid( atPos + 1 );
else
m_hostname = host;
}
}
}
extern "C" int fetchhead_foreach_cb( const char*, const char*,
const git_oid* aOID, unsigned int aIsMerge, void* aPayload )
{
@@ -532,7 +737,14 @@ extern "C" int credentials_cb( git_cred** aOut, const char* aUrl, const char* aU
&& !( parent->TestedTypes() & GIT_CREDTYPE_SSH_KEY ) )
{
// SSH key authentication
wxString sshKey = parent->GetSSHKey();
wxString sshKey = parent->GetNextPublicKey();
if( sshKey.IsEmpty() )
{
parent->TestedTypes() |= GIT_CREDTYPE_SSH_KEY;
return GIT_PASSTHROUGH;
}
wxString sshPubKey = sshKey + ".pub";
wxString username = parent->GetUsername().Trim().Trim( false );
wxString password = parent->GetPassword().Trim().Trim( false );
@@ -541,7 +753,6 @@ extern "C" int credentials_cb( git_cred** aOut, const char* aUrl, const char* aU
sshPubKey.ToStdString().c_str(),
sshKey.ToStdString().c_str(),
password.ToStdString().c_str() );
parent->TestedTypes() |= GIT_CREDTYPE_SSH_KEY;
}
else
{
+25 -3
View File
@@ -89,12 +89,11 @@ public:
wxString GetUsername() const { return m_username; }
wxString GetPassword() const { return m_password; }
wxString GetSSHKey() const { return m_sshKey; }
GIT_CONN_TYPE GetConnType() const { return m_connType; }
void SetUsername( const wxString& aUsername ) { m_username = aUsername; }
void SetPassword( const wxString& aPassword ) { m_password = aPassword; }
void SetSSHKey( const wxString& aSSHKey ) { m_sshKey = aSSHKey; }
void SetSSHKey( const wxString& aSSHKey );
void SetConnType( GIT_CONN_TYPE aConnType ) { m_connType = aConnType; }
void SetConnType( unsigned aConnType )
@@ -114,16 +113,39 @@ public:
// Returns true if the repository has a remote that can be pushed to pulled from
bool HasPushAndPullRemote() const;
// Updates the password and remote information for the repository given the current branch
void UpdateCurrentBranchInfo();
wxString GetRemotename() const;
void ResetNextKey() { m_nextPublicKey = 0; }
wxString GetNextPublicKey()
{
if( m_nextPublicKey >= static_cast<int>( m_publicKeys.size() ) )
return wxEmptyString;
return m_publicKeys[m_nextPublicKey++];
}
protected:
git_repository* m_repo;
GIT_CONN_TYPE m_connType;
wxString m_remote; // This is the full connection string
wxString m_hostname; // This is just the hostname without the protocol, username, or password
wxString m_username;
wxString m_password;
wxString m_sshKey;
unsigned m_testedTypes;
private:
void updatePublicKeys();
void updateConnectionType();
std::vector<wxString> m_publicKeys;
int m_nextPublicKey;
};
+4 -2
View File
@@ -338,6 +338,8 @@ ALTIUM_BINARY_PARSER::ALTIUM_BINARY_PARSER( std::unique_ptr<char[]>& aContent, s
std::map<wxString, wxString> ALTIUM_BINARY_PARSER::ReadProperties(
std::function<std::map<wxString, wxString>( const std::string& )> handleBinaryData )
{
// TSAN reports calling this wx macro is not thread-safe
static wxCSConv convISO8859_1 = wxConvISO8859_1;
std::map<wxString, wxString> kv;
@@ -412,7 +414,7 @@ std::map<wxString, wxString> ALTIUM_BINARY_PARSER::ReadProperties(
// convert the strings to wxStrings, since we use them everywhere
// value can have non-ASCII characters, so we convert them from LATIN1/ISO8859-1
wxString key( keyS.c_str(), wxConvISO8859_1 );
wxString key( keyS.c_str(), convISO8859_1 );
// Altium stores keys either in Upper, or in CamelCase. Lets unify it.
wxString canonicalKey = key.Trim( false ).Trim( true ).MakeUpper();
@@ -423,7 +425,7 @@ std::map<wxString, wxString> ALTIUM_BINARY_PARSER::ReadProperties(
if( canonicalKey.StartsWith( "%UTF8%" ) )
value = wxString( valueS.c_str(), wxConvUTF8 );
else
value = wxString( valueS.c_str(), wxConvISO8859_1 );
value = wxString( valueS.c_str(), convISO8859_1 );
if( canonicalKey != wxS( "PATTERN" ) && canonicalKey != wxS( "SOURCEFOOTPRINTLIBRARY" ) )
{
+109 -9
View File
@@ -35,6 +35,7 @@
#include <trace_helpers.h>
#include <wx/log.h>
#include <wx/regex.h>
#include <wx/tokenzr.h>
#include <functional>
#include <cstdio>
@@ -213,8 +214,6 @@ size_t GetNodeCount( const wxXmlNode* aNode )
return cnt;
}
template<> template<>
OPTIONAL_XML_ATTRIBUTE<wxString>::OPTIONAL_XML_ATTRIBUTE( wxString aData )
{
@@ -291,6 +290,55 @@ long long int ECOORD::ConvertToNm( int aValue, enum EAGLE_UNIT aUnit )
}
EURN::EURN( const wxString& aUrn )
{
Parse( aUrn );
}
void EURN::Parse( const wxString& aUrn )
{
wxStringTokenizer tokens( aUrn, ":" );
host = tokens.GetNextToken();
path = tokens.GetNextToken();
assetType = tokens.GetNextToken();
// Split off the version if there is one.
wxString tmp = tokens.GetNextToken();
assetId = tmp.BeforeFirst( '/' );
assetVersion = tmp.AfterLast( '/' );
}
bool EURN::IsValid() const
{
if( host != "urn" )
return false;
if( path.IsEmpty() )
return false;
static std::set<wxString> validAssetTypes =
{
"component",
"footprint",
"library",
"package",
"symbol"
};
if( validAssetTypes.count( assetType ) == 0 )
return false;
if( assetId.IsEmpty() )
return false;
return true;
}
// Template specializations below parse wxString to the used types:
// - wxString (preferred)
// - string
@@ -376,6 +424,13 @@ ECOORD Convert<ECOORD>( const wxString& aCoord )
}
template<>
EURN Convert<EURN>( const wxString& aUrn )
{
return EURN( aUrn );
}
/**
* Parse \a aAttribute of the XML node \a aNode.
*
@@ -1406,7 +1461,7 @@ EELEMENT::EELEMENT( wxXmlNode* aElement, IO_BASE* aIo ) :
y = parseRequiredAttribute<ECOORD>( aElement, "y" );
// optional
library_urn = parseOptionalAttribute<wxString>( aElement, "library_urn" );
library_urn = parseOptionalAttribute<EURN>( aElement, "library_urn" );
locked = parseOptionalAttribute<bool>( aElement, "locked" );
smashed = parseOptionalAttribute<bool>( aElement, "smashed" );
rot = parseOptionalAttribute<EROT>( aElement, "rot" );
@@ -1471,7 +1526,7 @@ EPART::EPART( wxXmlNode* aPart, IO_BASE* aIo ) :
*/
name = parseRequiredAttribute<wxString>( aPart, "name" );
library = parseRequiredAttribute<wxString>( aPart, "library" );
libraryUrn = parseOptionalAttribute<wxString>( aPart, "library_urn" );
libraryUrn = parseOptionalAttribute<EURN>( aPart, "library_urn" );
deviceset = parseRequiredAttribute<wxString>( aPart, "deviceset" );
device = parseRequiredAttribute<wxString>( aPart, "device" );
package3d_urn = parseOptionalAttribute<wxString>( aPart, "package3d_urn" );
@@ -1717,7 +1772,7 @@ EDEVICE_SET::EDEVICE_SET( wxXmlNode* aDeviceSet, IO_BASE* aIo ) :
* inside boards or schematics -->
*/
name = parseRequiredAttribute<wxString>( aDeviceSet, "name" );
urn = parseOptionalAttribute<wxString>( aDeviceSet, "urn" );
urn = parseOptionalAttribute<EURN>( aDeviceSet, "urn" );
locally_modified = parseOptionalAttribute<bool>( aDeviceSet, "locally_modified" );
prefix = parseOptionalAttribute<wxString>( aDeviceSet, "prefix" );
uservalue = parseOptionalAttribute<bool>( aDeviceSet, "uservalue" );
@@ -2216,7 +2271,7 @@ EPACKAGE::EPACKAGE( wxXmlNode* aPackage, IO_BASE* aIo ) :
* inside boards or schematics -->
*/
name = parseRequiredAttribute<wxString>( aPackage, "name" );
urn = parseOptionalAttribute<wxString>( aPackage, "urn" );
urn = parseOptionalAttribute<EURN>( aPackage, "urn" );
locally_modified = parseOptionalAttribute<bool>( aPackage, "locally_modified" );
library_version = parseOptionalAttribute<int>( aPackage, "library_version" );
library_locally_modified = parseOptionalAttribute<bool>( aPackage, "library_locally_modified" );
@@ -2349,7 +2404,7 @@ ESYMBOL::ESYMBOL( wxXmlNode* aSymbol, IO_BASE* aIo ) :
*/
name = parseRequiredAttribute<wxString>( aSymbol, "name" );
urn = parseOptionalAttribute<wxString>( aSymbol, "urn" );
urn = parseOptionalAttribute<EURN>( aSymbol, "urn" );
locally_modified = parseOptionalAttribute<bool>( aSymbol, "locally_modified" );
library_version = parseOptionalAttribute<int>( aSymbol, "library_version" );
library_locally_modified = parseOptionalAttribute<bool>( aSymbol, "library_locally_modified" );
@@ -2420,7 +2475,7 @@ ELIBRARY::ELIBRARY( wxXmlNode* aLibrary, IO_BASE* aIo ) :
if( parentNodeName == "libraries" )
{
name = parseRequiredAttribute<wxString>( aLibrary, "name" );
urn = parseOptionalAttribute<wxString>( aLibrary, "urn" );
urn = parseOptionalAttribute<EURN>( aLibrary, "urn" );
}
for( wxXmlNode* child = aLibrary->GetChildren(); child; child = child->GetNext() )
@@ -2491,6 +2546,24 @@ ELIBRARY::ELIBRARY( wxXmlNode* aLibrary, IO_BASE* aIo ) :
}
wxString ELIBRARY::GetName() const
{
wxString libName = name;
// Use the name when no library urn exists.
if( !urn )
return libName;
// Suffix the library name with the urn library identifier. Eagle schematics can have
// mulitple libraries with the same name. The urn library identifier is used to prevent
// library name clashes.
if( urn->IsValid() )
libName += wxS( "_" ) + urn->assetId;
return libName;
}
EAPPROVED::EAPPROVED( wxXmlNode* aApproved, IO_BASE* aIo ) :
EAGLE_BASE( aIo )
{
@@ -2533,7 +2606,34 @@ ESCHEMATIC::ESCHEMATIC( wxXmlNode* aSchematic, IO_BASE* aIo ) :
if( library->GetName() == "library" )
{
std::unique_ptr<ELIBRARY> tmp = std::make_unique<ELIBRARY>( library, aIo );
libraries[ tmp->name ] = std::move( tmp );
wxString libName = tmp->GetName();
// Prevent duplicate library names. This should only happen if the Eagle
// file has an invalid format.
if( libraries.find( libName ) != libraries.end() )
{
wxString uniqueName;
std::set<wxString> usedNames;
for( const auto& [setName, setLibrary] : libraries )
usedNames.emplace( setName );
if( usedNames.find( libName ) != usedNames.end() )
{
int i = 1;
do
{
uniqueName.Format( wxS( "%s_%d" ), libName, i );
i += 1;
} while( usedNames.find( uniqueName ) != usedNames.end() );
}
libName = uniqueName;
}
libraries[ libName ] = std::move( tmp );
}
}
+59 -12
View File
@@ -386,13 +386,15 @@ VECTOR2I ConvertArcCenter( const VECTOR2I& aStart, const VECTOR2I& aEnd, double
// Pre-declare for typedefs
struct EROT;
struct ECOORD;
struct EURN;
typedef OPTIONAL_XML_ATTRIBUTE<wxString> opt_wxString;
typedef OPTIONAL_XML_ATTRIBUTE<int> opt_int;
typedef OPTIONAL_XML_ATTRIBUTE<double> opt_double;
typedef OPTIONAL_XML_ATTRIBUTE<bool> opt_bool;
typedef OPTIONAL_XML_ATTRIBUTE<EROT> opt_erot;
typedef OPTIONAL_XML_ATTRIBUTE<ECOORD> opt_ecoord;
typedef OPTIONAL_XML_ATTRIBUTE<int> opt_int;
typedef OPTIONAL_XML_ATTRIBUTE<double> opt_double;
typedef OPTIONAL_XML_ATTRIBUTE<bool> opt_bool;
typedef OPTIONAL_XML_ATTRIBUTE<EROT> opt_erot;
typedef OPTIONAL_XML_ATTRIBUTE<ECOORD> opt_ecoord;
typedef OPTIONAL_XML_ATTRIBUTE<EURN> opt_eurn;
struct EAGLE_BASE
@@ -413,6 +415,45 @@ struct EAGLE_BASE
};
/**
* Container that parses Eagle library file "urn" definitions.
*
* According to the eagle.dtd, the "urn" definition is as follows:
*
* <!ENTITY % Urn "%String;"> <!-- of the form "urn:adsk.eagle:<ASSET_TYPE>:<ASSET_ID>/<VERSION>"
* - <ASSET_TYPE> is "symbol", "footprint", "package", "component", or "library"
* - <ASSET_ID> is an integer
* - <VERSION> is an integer
*
* The "/<VERSION>" is omitted when referencing the asset without specifying a particular version.
* For example, "urn:adsk.eagle:component:60986/2" references version 2 of component 60986 and
* "urn:adsk.eagle:library:60968" references library 60986 without specifying a version.
*/
struct EURN : public EAGLE_BASE
{
EURN() {}
/// Parse an Eagle "urn" string.
EURN( const wxString& aUrn );
void Parse( const wxString& aUrn );
/**
* Check if the string passed to the ctor was a valid Eagle urn.
*
* @retval true if the urn string is valid.
* @retval false if the urn string is not valid.
*/
bool IsValid() const;
wxString host; ///< Should always be "urn".
wxString path; ///< Path to the asset type below.
wxString assetType; ///< Must be "symbol", "footprint", "package", "component", or "library".
wxString assetId; ///< The unique asset identifier for the asset type.
wxString assetVersion; ///< May be empty depending on the asset type.
};
// All of the 'E'STRUCTS below merely hold Eagle XML information verbatim, in binary.
// For maintenance and troubleshooting purposes, it was thought that we'd need to
// separate the conversion process into distinct steps. There is no intent to have KiCad
@@ -1282,7 +1323,7 @@ struct EELEMENT : public EAGLE_BASE
wxString name;
wxString library;
opt_wxString library_urn;
opt_eurn library_urn;
wxString package;
opt_wxString package3d_urn;
opt_wxString override_package3d_urn;
@@ -1455,7 +1496,7 @@ struct EPART : public EAGLE_BASE
wxString name;
wxString library;
opt_wxString libraryUrn;
opt_eurn libraryUrn;
wxString deviceset;
wxString device;
opt_wxString package3d_urn;
@@ -1588,7 +1629,7 @@ struct EDEVICE_SET : public EAGLE_BASE
*/
wxString name;
opt_wxString urn;
opt_eurn urn;
opt_bool locally_modified;
opt_wxString prefix;
opt_bool uservalue;
@@ -2005,7 +2046,7 @@ struct EPACKAGE : public EAGLE_BASE
* inside boards or schematics -->
*/
wxString name;
opt_wxString urn;
opt_eurn urn;
opt_bool locally_modified;
opt_int library_version;
opt_bool library_locally_modified;
@@ -2055,7 +2096,7 @@ struct EPACKAGE3D : public EAGLE_BASE
* inside boards or schematics -->
*/
wxString name;
wxString urn;
EURN urn;
wxString type;
opt_int library_version;
opt_bool library_locally_modified;
@@ -2084,7 +2125,7 @@ struct ESYMBOL : public EAGLE_BASE
*/
wxString name;
opt_wxString urn;
opt_eurn urn;
opt_bool locally_modified;
opt_int library_version;
opt_bool library_locally_modified;
@@ -2115,7 +2156,7 @@ struct ELIBRARY : public EAGLE_BASE
* <!-- urn: Only in online libraries used inside boards or schematics -->
*/
wxString name;
opt_wxString urn;
opt_eurn urn;
std::optional<EDESCRIPTION> description;
std::map<wxString, std::unique_ptr<EPACKAGE>> packages;
@@ -2123,6 +2164,12 @@ struct ELIBRARY : public EAGLE_BASE
std::map<wxString, std::unique_ptr<ESYMBOL>> symbols;
std::map<wxString, std::unique_ptr<EDEVICE_SET>> devicesets;
/**
* Fetch the fully unique library name.
*
* @return the unique library name.
*/
wxString GetName() const;
ELIBRARY( wxXmlNode* aLibrary, IO_BASE* aIo = nullptr );
};
+30 -1
View File
@@ -17,10 +17,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "io/kicad/kicad_io_utils.h"
// For some reason wxWidgets is built with wxUSE_BASE64 unset so expose the wxWidgets
// base64 code.
#define wxUSE_BASE64 1
#include <wx/base64.h>
#include <fmt/format.h>
#include <kiid.h>
#include <io/kicad/kicad_io_utils.h>
#include <richio.h>
#include <string_utils.h>
@@ -37,6 +43,29 @@ void FormatUuid( OUTPUTFORMATTER* aOut, const KIID& aUuid )
aOut->Print( "(uuid %s)", aOut->Quotew( aUuid.AsString() ).c_str() );
}
void FormatStreamData( OUTPUTFORMATTER& aOut, const wxStreamBuffer& aStream )
{
aOut.Print( "(data" );
const wxString out = wxBase64Encode( aStream.GetBufferStart(), aStream.GetBufferSize() );
// Apparently the MIME standard character width for base64 encoding is 76 (unconfirmed)
// so use it in a vein attempt to be standard like.
static constexpr unsigned MIME_BASE64_LENGTH = 76;
size_t first = 0;
while( first < out.Length() )
{
aOut.Print( "\n\"%s\"", TO_UTF8( out( first, MIME_BASE64_LENGTH ) ) );
first += MIME_BASE64_LENGTH;
}
aOut.Print( ")" ); // Closes data token.
}
/*
* Formatting rules:
* - All extra (non-indentation) whitespace is trimmed
+1 -1
View File
@@ -51,9 +51,9 @@ JOB_EXPORT_PCB_POS::JOB_EXPORT_PCB_POS() :
m_excludeFootprintsWithTh( false ),
m_excludeDNP( false ),
m_negateBottomX( false ),
m_side( SIDE::BOTH ),
m_singleFile( false ),
m_nakedFilename( false ),
m_side( SIDE::BOTH ),
m_units( UNITS::MILLIMETERS ),
m_format( FORMAT::ASCII ),
m_gerberBoardEdge( true )
+2 -7
View File
@@ -120,7 +120,8 @@ static int progressinfo( void* aProgress, double aDLtotal, double aDLnow, double
KICAD_CURL_EASY::KICAD_CURL_EASY() :
m_headers( nullptr )
m_headers( nullptr ),
m_curlSharedLock( KICAD_CURL::Mutex() )
{
m_CURL = curl_easy_init();
@@ -200,12 +201,6 @@ KICAD_CURL_EASY::~KICAD_CURL_EASY()
int KICAD_CURL_EASY::Perform()
{
std::shared_lock lock( KICAD_CURL::Mutex(), std::try_to_lock );
// If can't lock, we should be in the process of tearing down.
if( !lock )
return CURLE_ABORTED_BY_CALLBACK;
if( m_headers )
curl_easy_setopt( m_CURL, CURLOPT_HTTPHEADER, m_headers );
+3 -3
View File
@@ -614,7 +614,7 @@ void KIWAY::SetLanguage( int aLanguage )
}
void KIWAY::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
void KIWAY::CommonSettingsChanged( int aFlags )
{
if( m_ctl & KFCTL_CPP_PROJECT_SUITE )
{
@@ -624,7 +624,7 @@ void KIWAY::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
EDA_BASE_FRAME* top = static_cast<EDA_BASE_FRAME*>( m_top );
if( top )
top->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
top->CommonSettingsChanged( aFlags );
}
for( unsigned i=0; i < KIWAY_PLAYER_COUNT; ++i )
@@ -632,7 +632,7 @@ void KIWAY::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged )
KIWAY_PLAYER* frame = GetPlayerFrame( ( FRAME_T )i );
if( frame )
frame->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged );
frame->CommonSettingsChanged( aFlags );
}
}
+5 -46
View File
@@ -37,36 +37,6 @@ wxString LayerName( int aLayer )
// Copper
case PCB_LAYER_ID::F_Cu: return wxT( "F.Cu" );
case PCB_LAYER_ID::In1_Cu: return wxT( "In1.Cu" );
case PCB_LAYER_ID::In2_Cu: return wxT( "In2.Cu" );
case PCB_LAYER_ID::In3_Cu: return wxT( "In3.Cu" );
case PCB_LAYER_ID::In4_Cu: return wxT( "In4.Cu" );
case PCB_LAYER_ID::In5_Cu: return wxT( "In5.Cu" );
case PCB_LAYER_ID::In6_Cu: return wxT( "In6.Cu" );
case PCB_LAYER_ID::In7_Cu: return wxT( "In7.Cu" );
case PCB_LAYER_ID::In8_Cu: return wxT( "In8.Cu" );
case PCB_LAYER_ID::In9_Cu: return wxT( "In9.Cu" );
case PCB_LAYER_ID::In10_Cu: return wxT( "In10.Cu" );
case PCB_LAYER_ID::In11_Cu: return wxT( "In11.Cu" );
case PCB_LAYER_ID::In12_Cu: return wxT( "In12.Cu" );
case PCB_LAYER_ID::In13_Cu: return wxT( "In13.Cu" );
case PCB_LAYER_ID::In14_Cu: return wxT( "In14.Cu" );
case PCB_LAYER_ID::In15_Cu: return wxT( "In15.Cu" );
case PCB_LAYER_ID::In16_Cu: return wxT( "In16.Cu" );
case PCB_LAYER_ID::In17_Cu: return wxT( "In17.Cu" );
case PCB_LAYER_ID::In18_Cu: return wxT( "In18.Cu" );
case PCB_LAYER_ID::In19_Cu: return wxT( "In19.Cu" );
case PCB_LAYER_ID::In20_Cu: return wxT( "In20.Cu" );
case PCB_LAYER_ID::In21_Cu: return wxT( "In21.Cu" );
case PCB_LAYER_ID::In22_Cu: return wxT( "In22.Cu" );
case PCB_LAYER_ID::In23_Cu: return wxT( "In23.Cu" );
case PCB_LAYER_ID::In24_Cu: return wxT( "In24.Cu" );
case PCB_LAYER_ID::In25_Cu: return wxT( "In25.Cu" );
case PCB_LAYER_ID::In26_Cu: return wxT( "In26.Cu" );
case PCB_LAYER_ID::In27_Cu: return wxT( "In27.Cu" );
case PCB_LAYER_ID::In28_Cu: return wxT( "In28.Cu" );
case PCB_LAYER_ID::In29_Cu: return wxT( "In29.Cu" );
case PCB_LAYER_ID::In30_Cu: return wxT( "In30.Cu" );
case PCB_LAYER_ID::B_Cu: return wxT( "B.Cu" );
// Technicals
@@ -93,21 +63,6 @@ wxString LayerName( int aLayer )
case PCB_LAYER_ID::F_Fab: return wxT( "F.Fab" );
case PCB_LAYER_ID::B_Fab: return wxT( "B.Fab" );
// User definable layers.
case PCB_LAYER_ID::User_1: return wxT( "User.1" );
case PCB_LAYER_ID::User_2: return wxT( "User.2" );
case PCB_LAYER_ID::User_3: return wxT( "User.3" );
case PCB_LAYER_ID::User_4: return wxT( "User.4" );
case PCB_LAYER_ID::User_5: return wxT( "User.5" );
case PCB_LAYER_ID::User_6: return wxT( "User.6" );
case PCB_LAYER_ID::User_7: return wxT( "User.7" );
case PCB_LAYER_ID::User_8: return wxT( "User.8" );
case PCB_LAYER_ID::User_9: return wxT( "User.9" );
case 57: return wxT( "User.10" );
case 59: return wxT( "User.11" );
case 61: return wxT( "User.12" );
case 63: return wxT( "User.13" );
// Rescue
case PCB_LAYER_ID::Rescue: return _( "Rescue" );
@@ -202,7 +157,11 @@ wxString LayerName( int aLayer )
case LAYER_VIA_NETNAMES: return _( "Via net names" );
default:
wxCHECK_MSG( false, wxEmptyString, wxString::Format( "Unknown layer ID %d", aLayer ) );
// Catch the general board layers that have numerically increasing names
if( aLayer > 0 && aLayer < PCB_LAYER_ID_COUNT && aLayer & 1 )
return wxString::Format( wxT( "User.%d" ), ( aLayer - PCB_LAYER_ID::User_1 ) / 2 + 1 );
return wxString::Format( wxT( "In%d.Cu" ), ( aLayer - PCB_LAYER_ID::In1_Cu ) / 2 + 1 );
}
}
+3 -3
View File
@@ -168,13 +168,13 @@ void LIB_TABLE_ROW::SetOptions( const wxString& aOptions )
LIB_TABLE::LIB_TABLE( LIB_TABLE* aFallBackTable, std::unique_ptr<LIB_TABLE_IO> aTableIo ) :
m_io( std::move( aTableIo ) ), m_fallBack( aFallBackTable ), m_version( 0 )
m_io( std::move( aTableIo ) ),
m_fallBack( aFallBackTable ),
m_version( 0 )
{
// If not given, use the default file-based I/O.
if( !m_io )
{
m_io = std::make_unique<FILE_LIB_TABLE_IO>();
}
// not copying fall back, simply search aFallBackTable separately
// if "nickName not found".
+18 -11
View File
@@ -87,17 +87,16 @@ bool LIB_TREE_NODE::Compare( LIB_TREE_NODE const& aNode1, LIB_TREE_NODE const& a
return aNode1.m_Type < aNode2.m_Type;
// Recently used sorts at top
if( aNode1.m_Name.StartsWith( wxT( "-- " ) ) )
if( aNode1.m_IsRecentlyUsedGroup )
{
if( aNode2.m_Name.StartsWith( wxT( "-- " ) ) )
if( aNode2.m_IsRecentlyUsedGroup )
{
// Make sure -- Recently Used is always at the top
// Start by checking the name of aNode2, because we
// want to satisfy the irreflexive property of the
// strict weak ordering.
if( aNode2.m_Name.StartsWith( wxT( "-- Recently Used" ) ) )
// Make sure "-- Recently Used" is always at the top
// Start by checking the name of aNode2, because we want to satisfy the irreflexive
// property of the strict weak ordering.
if( aNode2.m_IsRecentlyUsedGroup )
return false;
else if( aNode1.m_Name.StartsWith( wxT( "-- Recently Used" ) ) )
else if( aNode1.m_IsRecentlyUsedGroup )
return true;
return aNode1.m_IntrinsicRank > aNode2.m_IntrinsicRank;
@@ -136,7 +135,9 @@ LIB_TREE_NODE::LIB_TREE_NODE()
m_Pinned( false ),
m_PinCount( 0 ),
m_Unit( 0 ),
m_IsRoot( false )
m_IsRoot( false ),
m_IsRecentlyUsedGroup( false ),
m_IsAlreadyPlacedGroup( false )
{}
@@ -359,12 +360,18 @@ LIB_TREE_NODE_LIBRARY& LIB_TREE_NODE_ROOT::AddLib( wxString const& aName, wxStri
}
void LIB_TREE_NODE_ROOT::RemoveLib( wxString const& aName )
void LIB_TREE_NODE_ROOT::RemoveGroup( bool aRecentlyUsedGroup, bool aAlreadyPlacedGroup )
{
m_Children.erase( std::remove_if( m_Children.begin(), m_Children.end(),
[&]( std::unique_ptr<LIB_TREE_NODE>& aNode )
{
return aNode->m_Name == aName;
if( aRecentlyUsedGroup && aNode->m_IsRecentlyUsedGroup )
return true;
if( aAlreadyPlacedGroup && aNode->m_IsAlreadyPlacedGroup )
return true;
return false;
} ),
m_Children.end() );
}
+30 -13
View File
@@ -127,10 +127,10 @@ LIB_TREE_NODE* LIB_TREE_MODEL_ADAPTER::ToNode( wxDataViewItem aItem )
LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent,
const wxString& aPinnedKey,
APP_SETTINGS_BASE* aCfg ) :
APP_SETTINGS_BASE::LIB_TREE& aSettingsStruct ) :
m_widget( nullptr ),
m_parent( aParent ),
m_cfg( aCfg ),
m_cfg( aSettingsStruct ),
m_sort_mode( BEST_MATCH ),
m_show_units( true ),
m_preselect_unit( 0 ),
@@ -143,10 +143,10 @@ LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent,
m_availableColumns = { _HKI( "Item" ), _HKI( "Description" ) };
for( const std::pair<const wxString, int>& pair : m_cfg->m_LibTree.column_widths )
for( const std::pair<const wxString, int>& pair : m_cfg.column_widths )
m_colWidths[pair.first] = pair.second;
m_shownColumns = m_cfg->m_LibTree.columns;
m_shownColumns = m_cfg.columns;
if( m_shownColumns.empty() )
m_shownColumns = { _HKI( "Item" ), _HKI( "Description" ) };
@@ -196,13 +196,13 @@ void LIB_TREE_MODEL_ADAPTER::SaveSettings()
{
if( m_widget )
{
m_cfg->m_LibTree.columns = GetShownColumns();
m_cfg->m_LibTree.column_widths.clear();
m_cfg.columns = GetShownColumns();
m_cfg.column_widths.clear();
for( const std::pair<const wxString, wxDataViewColumn*>& pair : m_colNameMap )
m_cfg->m_LibTree.column_widths[pair.first] = pair.second->GetWidth();
m_cfg.column_widths[pair.first] = pair.second->GetWidth();
m_cfg->m_LibTree.open_libs = GetOpenLibs();
m_cfg.open_libs = GetOpenLibs();
}
}
@@ -232,9 +232,10 @@ LIB_TREE_NODE_LIBRARY& LIB_TREE_MODEL_ADAPTER::DoAddLibraryNode( const wxString&
}
void LIB_TREE_MODEL_ADAPTER::DoAddLibrary( const wxString& aNodeName, const wxString& aDesc,
const std::vector<LIB_TREE_ITEM*>& aItemList,
bool pinned, bool presorted )
LIB_TREE_NODE_LIBRARY& LIB_TREE_MODEL_ADAPTER::DoAddLibrary( const wxString& aNodeName,
const wxString& aDesc,
const std::vector<LIB_TREE_ITEM*>& aItemList,
bool pinned, bool presorted )
{
LIB_TREE_NODE_LIBRARY& lib_node = DoAddLibraryNode( aNodeName, aDesc, pinned );
@@ -242,12 +243,14 @@ void LIB_TREE_MODEL_ADAPTER::DoAddLibrary( const wxString& aNodeName, const wxSt
lib_node.AddItem( item );
lib_node.AssignIntrinsicRanks( presorted );
return lib_node;
}
void LIB_TREE_MODEL_ADAPTER::DoRemoveLibrary( const wxString& aNodeName )
void LIB_TREE_MODEL_ADAPTER::RemoveGroup( bool aRecentGroup, bool aPlacedGroup )
{
m_tree.RemoveLib( aNodeName );
m_tree.RemoveGroup( aRecentGroup, aPlacedGroup );
}
@@ -409,6 +412,20 @@ void LIB_TREE_MODEL_ADAPTER::UnpinLibrary( LIB_TREE_NODE* aTreeNode )
}
void LIB_TREE_MODEL_ADAPTER::ShowChangedLanguage()
{
recreateColumns();
for( const std::unique_ptr<LIB_TREE_NODE>& lib: m_tree.m_Children )
{
if( lib->m_IsRecentlyUsedGroup )
lib->m_Name = wxT( "-- " ) + _( "Recently Used" ) + wxT( " --" );
else if( lib->m_IsAlreadyPlacedGroup )
lib->m_Name = wxT( "-- " ) + _( "Already Placed" ) + wxT( " --" );
}
}
wxDataViewColumn* LIB_TREE_MODEL_ADAPTER::doAddColumn( const wxString& aHeader, bool aTranslate )
{
wxString translatedHeader = aTranslate ? wxGetTranslation( aHeader ) : aHeader;
+47 -6
View File
@@ -224,7 +224,9 @@ wxString LSET::Name( PCB_LAYER_ID aLayerId )
default:
if( static_cast<int>( aLayerId ) & 1 )
if( aLayerId < 0 )
txt = wxT( "UNDEFINED" );
else if( static_cast<int>( aLayerId ) & 1 )
{
int offset = ( aLayerId - Rescue ) / 2;
txt = wxString::Format( wxT( "User.%d" ), offset );
@@ -572,7 +574,11 @@ LSET LSET::AllCuMask( int aCuLayerCount )
LSET LSET::AllNonCuMask()
{
static const LSET saved = LSET().set() & ~AllCuMask();
LSET saved = LSET().set();
for( auto it = saved.copper_layers_begin(); it != saved.copper_layers_end(); ++it )
saved.reset( *it );
return saved;
}
@@ -648,12 +654,21 @@ LSET LSET::PhysicalLayersMask()
}
LSET LSET::UserDefinedLayers()
LSET LSET::UserDefinedLayersMask( int aUserDefinedLayerCount )
{
static const LSET saved(
{ User_1, User_2, User_3, User_4, User_5, User_6, User_7, User_8, User_9 } );
LSET ret;
size_t layer = User_1;
return saved;
for( int ulayer = 1; ulayer <= aUserDefinedLayerCount; ulayer++ )
{
if( layer > ret.size() )
break;
ret.set( layer );
layer += 2;
}
return ret;
}
@@ -882,4 +897,30 @@ LSET::non_copper_layers_iterator LSET::non_copper_layers_end() const
}
LSET& LSET::ClearCopperLayers()
{
for( size_t ii = 0; ii < size(); ii += 2 )
reset( ii );
return *this;
}
LSET& LSET::ClearNonCopperLayers()
{
for( size_t ii = 1; ii < size(); ii += 2 )
reset( ii );
return *this;
}
LSET& LSET::ClearUserDefinedLayers()
{
for( size_t ii = User_1; ii < size(); ii += 2 )
reset( ii );
return *this;
}
#endif
+60 -53
View File
@@ -31,34 +31,37 @@
#include <wx/settings.h>
#include <wx/stattext.h>
#include <wx/string.h>
#include <wx/time.h>
#include <paths.h>
#include <notifications_manager.h>
#include <widgets/kistatusbar.h>
#include <widgets/ui_common.h>
#include <json_common.h>
#include <kiplatform/ui.h>
#include "core/wx_stl_compat.h"
#include <core/wx_stl_compat.h>
#include <core/json_serializers.h>
#include <core/kicad_algo.h>
#include <algorithm>
#include <fstream>
#include <map>
#include <core/json_serializers.h>
#include <optional>
#include <string>
#include <tuple>
#include <vector>
#include <wx/string.h>
static long long g_last_closed_timer = 0;
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE( NOTIFICATION, title, description, href, key, date )
class NOTIFICATION_PANEL : public wxPanel
{
public:
NOTIFICATION_PANEL( wxWindow* aParent, NOTIFICATIONS_MANAGER* aManager, NOTIFICATION* aNoti ) :
wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxSize( -1, 75 ),
wxBORDER_SIMPLE ),
wxPanel( aParent, wxID_ANY, wxDefaultPosition, wxSize( -1, 75 ), wxBORDER_SIMPLE ),
m_hlDetails( nullptr ),
m_notification( aNoti ),
m_manager( aManager )
@@ -68,17 +71,17 @@ public:
wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxVERTICAL );
SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
wxColour fg, bg;
KIPLATFORM::UI::GetInfoBarColours( fg, bg );
SetBackgroundColour( bg );
SetForegroundColour( fg );
m_stTitle = new wxStaticText( this, wxID_ANY, aNoti->title );
m_stTitle->Wrap( -1 );
m_stTitle->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT,
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false,
wxEmptyString ) );
m_stTitle->SetFont( KIUI::GetControlFont( this ).Bold() );
mainSizer->Add( m_stTitle, 0, wxALL | wxEXPAND, 1 );
m_stDescription = new wxStaticText( this, wxID_ANY, aNoti->description, wxDefaultPosition,
wxDefaultSize, 0 );
m_stDescription = new wxStaticText( this, wxID_ANY, aNoti->description );
m_stDescription->Wrap( -1 );
mainSizer->Add( m_stDescription, 0, wxALL | wxEXPAND, 1 );
@@ -87,22 +90,17 @@ public:
if( !aNoti->href.IsEmpty() )
{
m_hlDetails =
new wxHyperlinkCtrl( this, wxID_ANY, _( "View Details" ), aNoti->href,
wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_hlDetails = new wxHyperlinkCtrl( this, wxID_ANY, _( "View Details" ), aNoti->href );
tailSizer->Add( m_hlDetails, 0, wxALL, 2 );
}
m_hlDismiss = new wxHyperlinkCtrl( this, wxID_ANY, _( "Dismiss" ), aNoti->href,
wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
m_hlDismiss = new wxHyperlinkCtrl( this, wxID_ANY, _( "Dismiss" ), aNoti->href );
tailSizer->Add( m_hlDismiss, 0, wxALL, 2 );
mainSizer->Add( tailSizer, 1, wxEXPAND, 5 );
if( m_hlDetails != nullptr )
{
m_hlDetails->Bind( wxEVT_HYPERLINK, &NOTIFICATION_PANEL::onDetails, this );
}
m_hlDismiss->Bind( wxEVT_HYPERLINK, &NOTIFICATION_PANEL::onDismiss, this );
@@ -140,11 +138,12 @@ private:
} );
}
wxStaticText* m_stTitle;
wxStaticText* m_stDescription;
wxHyperlinkCtrl* m_hlDetails;
wxHyperlinkCtrl* m_hlDismiss;
NOTIFICATION* m_notification;
private:
wxStaticText* m_stTitle;
wxStaticText* m_stDescription;
wxHyperlinkCtrl* m_hlDetails;
wxHyperlinkCtrl* m_hlDismiss;
NOTIFICATION* m_notification;
NOTIFICATIONS_MANAGER* m_manager;
};
@@ -163,7 +162,12 @@ public:
bSizer1 = new wxBoxSizer( wxVERTICAL );
m_scrolledWindow = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition,
wxSize( -1, -1 ), wxVSCROLL );
wxSize( -1, -1 ), wxVSCROLL | wxBORDER_SIMPLE );
wxColour fg, bg;
KIPLATFORM::UI::GetInfoBarColours( fg, bg );
m_scrolledWindow->SetBackgroundColour( bg );
m_scrolledWindow->SetForegroundColour( fg );
m_scrolledWindow->SetScrollRate( 5, 5 );
m_contentSizer = new wxBoxSizer( wxVERTICAL );
@@ -172,9 +176,10 @@ public:
m_contentSizer->Fit( m_scrolledWindow );
bSizer1->Add( m_scrolledWindow, 1, wxEXPAND | wxALL, 0 );
m_noNotificationsText = new wxStaticText(
m_scrolledWindow, wxID_ANY, _( "There are no notifications available" ),
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
m_noNotificationsText = new wxStaticText( m_scrolledWindow, wxID_ANY,
_( "There are no notifications available" ),
wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTER_HORIZONTAL );
m_noNotificationsText->Wrap( -1 );
m_contentSizer->Add( m_noNotificationsText, 1, wxALL | wxEXPAND, 5 );
@@ -190,9 +195,15 @@ public:
void onFocusLoss( wxFocusEvent& aEvent )
{
// check if a child like say, the hyperlink texts got focus
if( !IsDescendant( aEvent.GetWindow() ) )
if( IsDescendant( aEvent.GetWindow() ) )
{
// Child (such as the hyperlink texts) got focus
}
else
{
Close( true );
g_last_closed_timer = wxGetLocalTimeMillis().GetValue();
}
aEvent.Skip();
}
@@ -277,7 +288,7 @@ void NOTIFICATIONS_MANAGER::Load()
if( wxGetEnv( wxT( "KICAD_TEST_NOTI" ), nullptr ) )
{
CreateOrUpdate( wxS( "test" ), wxS( "Test Notification" ), wxS( "Test please ignore" ),
wxS( "https://kicad.org" ) );
wxS( "https://kicad.org" ) );
}
}
@@ -324,15 +335,11 @@ void NOTIFICATIONS_MANAGER::CreateOrUpdate( const wxString& aKey,
{
// update dialogs
for( NOTIFICATIONS_LIST* list : m_shownDialogs )
{
list->Add( &m_notifications.back() );
}
}
for( KISTATUSBAR* statusBar : m_statusBars )
{
statusBar->SetNotificationCount( m_notifications.size() );
}
Save();
}
@@ -347,18 +354,14 @@ void NOTIFICATIONS_MANAGER::Remove( const wxString& aKey )
} );
if( it == m_notifications.end() )
{
return;
}
if( m_shownDialogs.size() > 0 )
{
// update dialogs
for( NOTIFICATIONS_LIST* list : m_shownDialogs )
{
list->Remove( &(*it) );
}
}
m_notifications.erase( it );
@@ -366,9 +369,7 @@ void NOTIFICATIONS_MANAGER::Remove( const wxString& aKey )
Save();
for( KISTATUSBAR* statusBar : m_statusBars )
{
statusBar->SetNotificationCount( m_notifications.size() );
}
}
@@ -376,11 +377,10 @@ void NOTIFICATIONS_MANAGER::onListWindowClosed( wxCloseEvent& aEvent )
{
NOTIFICATIONS_LIST* evtWindow = dynamic_cast<NOTIFICATIONS_LIST*>( aEvent.GetEventObject() );
m_shownDialogs.erase( std::remove_if( m_shownDialogs.begin(), m_shownDialogs.end(),
[&]( NOTIFICATIONS_LIST* dialog )
{
return dialog == evtWindow;
} ) );
alg::delete_if( m_shownDialogs, [&]( NOTIFICATIONS_LIST* dialog )
{
return dialog == evtWindow;
} );
aEvent.Skip();
}
@@ -388,12 +388,19 @@ void NOTIFICATIONS_MANAGER::onListWindowClosed( wxCloseEvent& aEvent )
void NOTIFICATIONS_MANAGER::ShowList( wxWindow* aParent, wxPoint aPos )
{
// Debounce clicking on the icon with a list already showing. The button will get focus
// first, which will cause a focus-loss on the list (thereby closing it), and then we'd open
// it again without this guard.
if( wxGetLocalTimeMillis().GetValue() - g_last_closed_timer < 300 )
{
g_last_closed_timer = 0;
return;
}
NOTIFICATIONS_LIST* list = new NOTIFICATIONS_LIST( this, aParent, aPos );
for( NOTIFICATION& job : m_notifications )
{
list->Add( &job );
}
m_shownDialogs.push_back( list );
@@ -404,6 +411,7 @@ void NOTIFICATIONS_MANAGER::ShowList( wxWindow* aParent, wxPoint aPos )
list->SetPosition( aPos - windowSize );
list->Show();
KIPLATFORM::UI::ForceFocus( list );
}
@@ -418,9 +426,8 @@ void NOTIFICATIONS_MANAGER::RegisterStatusBar( KISTATUSBAR* aStatusBar )
void NOTIFICATIONS_MANAGER::UnregisterStatusBar( KISTATUSBAR* aStatusBar )
{
m_statusBars.erase( std::remove_if( m_statusBars.begin(), m_statusBars.end(),
[&]( KISTATUSBAR* statusBar )
{
return statusBar == aStatusBar;
} ) );
alg::delete_if( m_statusBars, [&]( KISTATUSBAR* statusBar )
{
return statusBar == aStatusBar;
} );
}
+1
View File
@@ -30,6 +30,7 @@ pdf_metadata
pdf_single_document
plotframeref
plotfptext
plot_black_and_white
plotinvisibletext
plotpadnumbers
plotreference
+14 -2
View File
@@ -777,9 +777,21 @@ void PDF_PLOTTER::ClosePage()
auto iuToPdfUserSpace =
[&]( const VECTOR2I& aCoord ) -> VECTOR2D
{
VECTOR2D retval = VECTOR2D( aCoord ) * PTsPERMIL / ( m_IUsPerDecimil * 10 );
VECTOR2D pos = VECTOR2D( aCoord ) * PTsPERMIL / ( m_IUsPerDecimil * 10 );
// PDF y=0 is at bottom of page, invert coordinate
retval.y = psPaperSize.y - retval.y;
VECTOR2D retval( pos.x, psPaperSize.y - pos.y );
// The pdf plot can be mirrored (from left to right). So mirror the
// x coordinate if m_plotMirror is set
if( m_plotMirror )
{
if( m_mirrorIsHorizontal )
retval.x = ( psPaperSize.x - pos.x );
else
retval.y = pos.y;
}
return retval;
};
+3 -1
View File
@@ -164,6 +164,8 @@ void CONSTRUCTION_GEOM::ViewDraw( int aLayer, VIEW* aView ) const
std::vector<int> CONSTRUCTION_GEOM::ViewGetLayers() const
{
std::vector<int> layers{ LAYER_GP_OVERLAY };
// Don't use LAYER_GP_OVERLAY, we need the construction geometry to be visible
// on top of the axis cross
std::vector<int> layers{ LAYER_UI_START };
return layers;
}
+2 -1
View File
@@ -63,6 +63,7 @@ NET_SETTINGS::NET_SETTINGS( JSON_SETTINGS* aParent, const std::string& aPath ) :
{
m_defaultNetClass = std::make_shared<NETCLASS>( NETCLASS::Default, true );
m_defaultNetClass->SetDescription( _( "This is the default net class." ) );
m_defaultNetClass->SetPriority( std::numeric_limits<int>::max() );
auto saveNetclass =
[]( nlohmann::json& json_array, const std::shared_ptr<NETCLASS>& nc )
@@ -670,7 +671,7 @@ std::shared_ptr<NETCLASS> NET_SETTINGS::GetEffectiveNetClass( const wxString& aN
if( ii == m_impicitNetClasses.end() )
{
std::shared_ptr<NETCLASS> nc = std::make_shared<NETCLASS>( netclass, false );
nc->SetPriority( std::numeric_limits<int>().max() - 1 ); // Priority > default netclass
nc->SetPriority( std::numeric_limits<int>::max() - 1 ); // Priority > default netclass
m_impicitNetClasses[netclass] = nc;
return nc;
}
+5 -18
View File
@@ -43,8 +43,7 @@
class PROJECT_ARCHIVER_DIR_ZIP_TRAVERSER : public wxDirTraverser
{
public:
PROJECT_ARCHIVER_DIR_ZIP_TRAVERSER( const std::string& aExtRegex, const wxString& aPrjDir,
wxZipOutputStream& aZipFileOutput,
PROJECT_ARCHIVER_DIR_ZIP_TRAVERSER( const std::string& aExtRegex, const wxString& aPrjDir, wxZipOutputStream& aZipFileOutput,
REPORTER& aReporter, bool aVerbose ) :
m_zipFile( aZipFileOutput ),
m_prjDir( aPrjDir ),
@@ -66,7 +65,6 @@ public:
wxFileName package( aFilename );
package.MakeRelativeTo( m_prjDir );
package.SetExt( wxS( "pkg" ) );
KIPLATFORM::IO::LongPathAdjustment( package );
if( package.Exists() )
addFileToZip( package.GetFullPath() );
@@ -92,21 +90,13 @@ public:
}
private:
void addFileToZip( const wxString& aFilename )
void addFileToZip( const wxString& aFilename)
{
wxString msg;
wxFileSystem fsfile;
wxFileName curr_fn( aFilename );
wxFileName curr_prjdir;
curr_prjdir.AssignDir( m_prjDir );
KIPLATFORM::IO::LongPathAdjustment( curr_fn );
KIPLATFORM::IO::LongPathAdjustment( curr_prjdir );
// Note: MakeRelativeTo() works only if curr_fn and curr_prjdir use the same
// long path adjustment (no long path of both use long path)
curr_fn.MakeRelativeTo( curr_prjdir.GetFullPath() );
curr_fn.MakeRelativeTo( m_prjDir );
wxString currFilename = curr_fn.GetFullPath();
@@ -155,12 +145,10 @@ private:
unsigned long m_uncompressedBytes = 0;
};
PROJECT_ARCHIVER::PROJECT_ARCHIVER()
{
}
bool PROJECT_ARCHIVER::AreZipArchivesIdentical( const wxString& aZipFileA,
const wxString& aZipFileB, REPORTER& aReporter )
{
@@ -250,7 +238,6 @@ bool PROJECT_ARCHIVER::Unarchive( const wxString& aSrcFile, const wxString& aDes
// Now let's set the filetimes based on what's in the zip
wxFileName outputFileName( fullname );
wxDateTime fileTime = entry->GetDateTime();
// For now we set access, mod, create to the same datetime
// create (third arg) is only used on Windows
outputFileName.SetTimes( &fileTime, &fileTime, &fileTime );
@@ -331,7 +318,7 @@ bool PROJECT_ARCHIVER::Archive( const wxString& aSrcDir, const wxString& aDestFi
wxString oldCwd = wxGetCwd();
wxFileName sourceDir( aSrcDir );
KIPLATFORM::IO::LongPathAdjustment( sourceDir );
wxSetWorkingDirectory( sourceDir.GetFullPath() );
wxFFileOutputStream ostream( aDestFile );
@@ -364,7 +351,7 @@ bool PROJECT_ARCHIVER::Archive( const wxString& aSrcDir, const wxString& aDestFi
try
{
PROJECT_ARCHIVER_DIR_ZIP_TRAVERSER traverser( fileExtensionRegex, aSrcDir, zipstream,
aReporter, aVerbose );
aReporter, aVerbose );
projectDir.Traverse( traverser );
@@ -191,8 +191,6 @@ PROJECT_LOCAL_SETTINGS::PROJECT_LOCAL_SETTINGS( PROJECT* aProject, const wxStrin
m_params.emplace_back( new PARAM<wxString>( "git.repo_username", &m_GitRepoUsername, "" ) );
m_params.emplace_back( new PARAM<wxString>( "git.repo_password", &m_GitRepoPassword, "" ) );
m_params.emplace_back( new PARAM<wxString>( "git.repo_type", &m_GitRepoType, "" ) );
m_params.emplace_back( new PARAM<wxString>( "git.ssh_key", &m_GitSSHKey, "" ) );
+6 -2
View File
@@ -605,8 +605,12 @@ wxValidator* PGPROPERTY_ANGLE::DoGetValidator() const
wxSize PGPROPERTY_COLORENUM::OnMeasureImage( int aItem ) const
{
// TODO(JE) calculate size from window metrics?
return wxSize( 16, 12 );
wxSize size( 16, -1 );
if( wxPropertyGrid* pg = GetGrid() )
size = pg->FromDIP( size );
return size;
}
+5 -1
View File
@@ -25,6 +25,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <mutex>
#include <macros.h>
#include <reporter.h>
#include <string_utils.h>
@@ -42,6 +43,8 @@
*/
static const wxChar traceReporter[] = wxT( "KICAD_REPORTER" );
static std::mutex g_logReporterMutex;
REPORTER& REPORTER::Report( const char* aText, SEVERITY aSeverity )
{
@@ -199,6 +202,7 @@ REPORTER& WXLOG_REPORTER::Report( const wxString& aMsg, SEVERITY aSeverity )
REPORTER& WXLOG_REPORTER::GetInstance()
{
static REPORTER* s_wxLogReporter = nullptr;
std::lock_guard lock( g_logReporterMutex );
if( !s_wxLogReporter )
s_wxLogReporter = new WXLOG_REPORTER();
@@ -222,4 +226,4 @@ bool STATUSBAR_REPORTER::HasMessage() const
return !m_statusBar->GetStatusText( m_position ).IsEmpty();
return false;
}
}

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