Compare commits

..

724 Commits

Author SHA1 Message Date
Thomas Pointhuber da418dfe2e Adding Autodesk fusion import (incomplete, and I don't think I will continue there) 2024-06-22 21:59:21 +02:00
Seth Hillbrand 7ea013b96c Altium: Handle footprint vias
These are treated as pads in KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18194
2024-06-14 16:49:56 -07:00
Seth Hillbrand 021f251efd Tented usually means that there is no soldermask
Probably was a typo
2024-06-14 16:49:56 -07:00
Seth Hillbrand d21eba4021 Unselected tree before syncing
On GTK, the selected item is checked for its parent when being
unselected.  This breaks if the parent has been removed by the Sync()
call, so we need to ensure that the unselect all call happens prior
2024-06-14 16:49:56 -07:00
Seth Hillbrand 9f4dfe77cb Freeze the adapter to avoid invalid deref
GTK tries to get the parent item of selected elements when unselecting.
If we don't freeze, we run the risk of crashing if a selected item is
removed before being unselected.  This causes a wx warning but a) this
is suppressed in release and b) warning message is better than crash.
See next commit for fix to avoid common case of the error
2024-06-14 16:49:56 -07:00
Jeff Young db9f0a0358 Report footprint parent of shape when in board editor.
While the user can't select these, we do report them
in DRC messages and the like, where it's handy to
know what they're from.
2024-06-14 23:19:26 +01:00
Jeff Young 8cddd40fc9 Check mask apertures on the mask layer.
(Otherwise testing A:B and B:A will add items to the
m_maskApertureNetMap cache on different layers.)
2024-06-14 22:55:40 +01:00
Jeff Young b2588e0bbf Footprint Editor doesn't have nets.
(Copper shapes, on the other hand, can.  Since we use
GetItemDescription() to report DRC errors and the like,
it's better to have it report the net even when it's
<no net>.)
2024-06-14 22:46:29 +01:00
Jeff Young 0f8d543172 Consistent capitalization. 2024-06-14 22:02:08 +01:00
Jeff Young ac576d7e0a Normalize phase angles. 2024-06-14 19:03:55 +01:00
jean-pierre charras a2cbd1ff21 Fix QA tests compatibility 2024-06-14 19:14:09 +02:00
Jeff Young c633ac26eb Don't lose value of cursor checkboxes when running sim.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young 4eb048bba2 Don't assume AC gains will always be voltages.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young 300313ce73 Correctly write phase/gain signals to workbook.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young 5a3bad51d0 Don't use SI prefixes with degrees when auto-ranging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
Jeff Young 7b63429fe1 Current gain is the first Y axis, not the second.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18205
2024-06-14 16:37:49 +01:00
jean-pierre charras d778cb6647 Schematic editor: fix some issues that can crash the editor on closing.
- Add a test to be sure a SCHEMATIC exists before trying to use it
- Delete items in Repeat list and undo/redo list before deleting the schematic
- Delete also these items when loading a new schematic (the repeat list was
not cleaned previously)
Before these fixes I see a use after delete issue due to dangling pointers
stored in Repeat list.
2024-06-14 16:57:57 +02:00
Jeff Young 7fef6e8d83 Use view's RTree for redrawing netnames. 2024-06-14 00:20:37 +01:00
Jeff Young c9ddcd618d Make sure to reset the cached viewport. 2024-06-12 23:35:06 +01:00
Jon Evans ccc76aad2f Fix typo loading legacy tenting setting 2024-06-12 17:42:44 -04:00
Alex Shvartzkop 44a33eedf4 Update only visible track segments in redrawNetnames.
RequestRefresh doesn't seem to be needed.
2024-06-13 00:28:37 +03:00
Alex Shvartzkop f0e9f9f15a Optimize PAD LoD calculation. 2024-06-12 23:05:33 +03:00
Alex Shvartzkop 52daf14c78 Optimize VIA LoD calculation. 2024-06-12 23:05:33 +03:00
Alex Shvartzkop 9d0ee029bc Add a upper >= lower check to Clamp.
Similar to std::clamp.
2024-06-12 23:05:33 +03:00
Alex Shvartzkop e49d233923 Move BOX2I_MINMAX to separate header. 2024-06-12 23:05:33 +03:00
Mike Williams a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e7122.
2024-06-12 13:30:29 -04:00
Mike Williams 0c45f85bc0 Revert "sch_symbol: use fail message fall back to dummy symbol when passed null"
This reverts commit e0e837189d.
2024-06-12 13:30:29 -04:00
Jeff Young 0ca7a81181 Deferred redraw for netnames. 2024-06-12 17:20:20 +01:00
Jeff Young b7161181e8 Hidden footprint libraries are not yet supported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18183
2024-06-12 16:59:20 +01:00
Alex Shvartzkop 73a3b880a6 Slightly optimize GPU_CACHED_MANAGER::DrawIndices. 2024-06-12 16:04:47 +03:00
Jeff Young 694a7db457 Performance improvements.
Don't construct a wxString or a LSEQ when you don't
have to.  They're both more expensive than you might
think.
2024-06-12 11:06:10 +01:00
Jon Evans 63cd110720 Make verbiage more clear 2024-06-11 22:19:33 -04:00
Jon Evans 896f56772f Fix warnings 2024-06-11 22:01:06 -04:00
Jon Evans 5fc0f1f51e ADDED: Independent control of front/back via tenting 2024-06-11 21:50:25 -04:00
Jon Evans 4aab9f59aa ADDED: Support tenting control of individual vias
REMOVED: Tenting option from plot dialog (tenting is now
         controlled from Board Setup and via properties)

See https://gitlab.com/kicad/code/kicad/-/issues/2402
2024-06-11 21:25:02 -04:00
jean-pierre charras 2a37580839 Symbol editor: ensure the left panel is correctly refreshed when hiding a pane. 2024-06-11 17:48:25 +02:00
Jeff Young d865bda4f2 Cache display netnames.
Also changes the redraw behaviour to not try and redraw
only when things entered the view (this didn't work
because it may be the netname that's entering the view,
not the whole track).  Instead we only process a finite
number of tracks on each idle event (in order to avoid
#12436).

Note that we don't need the timer at all anymore as the
netnames are in fixed locations on the track and never
make the track look like it's being dragged.

Also improves performance by avoiding sqrt.
2024-06-11 16:30:52 +01:00
Wayne Stambaugh 74070afbc6 Fix a bunch of GCC build warnings compiling the schematic editor.
Apparently GCC does not like competing definitions of the == operator.
The recent refactoring away of all LIB_ITEM objects created a conflict
with the SCH_ITEM == operator definition.  This change required some
rather ugly comparison changes.  There were no unit test failures but
that doesn't mean something didn't get broken.
2024-06-11 08:07:32 -04:00
jean-pierre charras 9bf0b479ed fix a compil issue on msys2 2024-06-11 10:58:21 +02:00
Alex Shvartzkop 44fd13af47 Slight optimization for PCB_PAINTER when drawing vias/tracks. 2024-06-11 05:30:02 +03:00
Seth Hillbrand 8dd93501cf Add additional VECTOR2 tests
Check overflow, addition using alternate value representations and
clamping
2024-06-10 15:21:44 -07:00
Seth Hillbrand 37191720ca Add common VECTOR2 test cases 2024-06-10 15:12:57 -07:00
Seth Hillbrand 439c25fca9 Altium schematic parser: Add fraction pin placement
In the schematic libaries, pin positions that are off 10mil spacing need
fractional elements stored in a different location
2024-06-10 15:02:18 -07:00
Alex Shvartzkop 35d60598d5 Fix build error on MSVC. 2024-06-11 00:06:32 +03:00
Seth Hillbrand 9d9028c979 Handle unsigned VECTOR2 casts
The previous overflow handling code casted the int_min value into an
unsigned, meaning that the min value and max value were almost the same,
clamping the output to unreasonable values.

Updated code handles floating points first, then does integer casting
through int64_t
2024-06-10 12:40:01 -07:00
Seth Hillbrand 1325701956 Altium SCH Lib updates
- Use pin-compatible line widths for symbols
- Handle circular arcs as circles, not elliptical arcs
2024-06-10 12:40:01 -07:00
Jeff Young de2fbbd11a Fix stack address escaping routine. 2024-06-10 20:23:36 +01:00
Jeff Young 4e133ae83b Cleanup. 2024-06-10 20:23:36 +01:00
Jeff Young a02cb75656 Cleanup. 2024-06-10 20:23:36 +01:00
JamesJCode 0826c10a20 Don't re-add deleted netclass assignments in incremental connectivity
Ensures that if moving or deleting a netclass directive label, the
netclass on the previously-assigned net doesn't have the stale
netclass re-applied.
2024-06-10 20:19:07 +01:00
Alex Shvartzkop d40bbed591 Cairo GAL: improve alignment between arcs and segments and of odd-width lines.
(cherry picked from commit f60b76696a)
2024-06-10 21:26:17 +03:00
Wayne Stambaugh 5e048bc64c Fix several Eagle schematic import issues.
Fix broken arc angle polarity due to library symbol changes.

Fix broken wire and text Y axis coordinate polarity due to library symbol
changes.

Fix broken field visibility and position on library symbols with multiple
units that have fields with different visibility and positions.  Because
KiCad does not support this, when parsing the Eagle schematic file, the
last library symbol unit parsed ends up being the field visibility and
position for all units in the symbol.
2024-06-10 11:28:20 -04:00
Wayne Stambaugh 889931505b Eagle schematic importer improvements.
Change Eagle file importer to use a two pass import.  The first pass
parses the entire Eagle file into an associated E* object.  The second
pass converts the parsed E* objects into the appropriate KiCad objects.

Improve handling of Eagle versioned libraries.

Add helpers to IO_BASE to ease handling of PROGRESS_REPORTER and REPORTER
objects.

ADDED: Support for importing Eagle schematic modules.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1813
2024-06-10 11:28:20 -04:00
Mike Williams e0e837189d sch_symbol: use fail message fall back to dummy symbol when passed null 2024-06-10 11:24:58 -04:00
Wayne Stambaugh 012d3f098f Fix build error caused by commit 82c2bda52b. 2024-06-10 10:56:02 -04:00
Jeff Young 2e38fa84bf Don't allow writing "//" to spice netlist.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18161
2024-06-10 15:36:20 +01:00
Alex Shvartzkop 0d2838518b Altium PCB import: don't add thickness to Solid style fills.
(cherry picked from commit b34dbf58c5)
2024-06-10 17:33:26 +03:00
Alex Shvartzkop 82c2bda52b Altium PCB import: make sure Polygon fill is contained within the outline. 2024-06-10 17:21:41 +03:00
Mike Williams 0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young aa1fb0604a Fix KeepUpright settings in Eagle gold files. 2024-06-09 23:38:54 +01:00
Alex Shvartzkop 43dab2a8b5 Altium PCB import: avoid integer overflows when rotating rectangular fills.
Fixes artifacts seen in https://gitlab.com/kicad/code/kicad/-/issues/18156

(cherry picked from commit 3ea314cb9f)
2024-06-10 01:01:32 +03:00
Jeff Young ca54eb422b Don't default KeepUpright to true in Eagle importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18175
2024-06-09 22:19:26 +01:00
Alex Shvartzkop ee8b74d688 QA: update golden data for Altium "Tracks" PcbLib.
(cherry picked from commit c6b483acb9)
2024-06-09 23:03:33 +03:00
Jon Evans 74517856ca Make touchscreen events Windows-only
They break things on macOS and probably also on GTK
according to the wxWidgets documentation.
2024-06-09 13:18:32 -04:00
Alex Shvartzkop 76b2741a92 Make sure to add start points to arcs in TransformOvalToPolygon.
Otherwise the long line segments can be non-parallel to the centerline.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-09 20:04:27 +03:00
Alex Shvartzkop 80b7f5fcbf Revert "Pcbnew, Altium import: Fix issues with hatched zones."
This removed the hatch fill import functionality,
and is no longer needed now that the root cause was found.

This reverts commit 616510aca2.
2024-06-09 20:04:27 +03:00
Alex Shvartzkop 7bca6cdea7 Make crosshair follow view movement when using pan/zoom gestures. 2024-06-09 18:46:42 +03:00
jean-pierre charras fb3730a9c0 STEP export: fix missing zones (they were added too late in code)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18177
2024-06-09 17:32:34 +02:00
Jon Evans 3bb7b3722c Fix MSVC not understanding operator== anymore 2024-06-08 17:27:34 -04:00
Jon Evans f5e7c705db Move custom shapes to PADSTACK; support in API 2024-06-08 14:26:36 -04:00
jean-pierre charras b20a32f2fd bitmap_info.xxx: add comments to try to avoid issues like 8b1e971f
No actual code change
2024-06-08 20:18:11 +02:00
Alex Shvartzkop 4b96bb5d8f Support touchscreen gestures (zoom/pan/rotate) in 3D viewer.
Though rotate doesn't work yet on MSW due to a wxWidgets bug.
2024-06-08 21:13:16 +03:00
Jeff Young ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
Alex Shvartzkop 832393b07c Remove debug line. 2024-06-08 17:25:49 +03:00
Alex Shvartzkop 8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop 8e90063258 Support hidpi in Cairo GAL canvas; performance improvements.
We now draw onto wxBitmap directly, reducing the amount of copying.
Also moves the bitmap blit into paint event handler.
Modifies ClearScreen to work universally between Cairo/OpenGL backends.
2024-06-08 12:51:27 +03:00
Seth Hillbrand 31a0652c58 Force VECTOR2 templates to use standard promotion rules
This forces the operators -, +, * to use standard promotion rules when
operating on vectors of two different types.  Previously, this depended
on the order in which the operator was called, so subtracting a VECTOR2D
from a VECTOR2I could have a different result than negating the result
of subtracting the same vectors in the opposite order
2024-06-07 15:32:07 -07:00
Jeff Young 90652a741d Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
2024-06-07 23:08:15 +01:00
Seth Hillbrand ff188450e6 Handle degenerate arcs
Arcs with their centers too far away are effectively straight lines, so
draw them as such

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18170
2024-06-07 11:28:34 -07:00
jean-pierre charras d7b743a896 MAINTAIN_PNGS option: fix missing entries in CMakeLists.txt.
The commit 16de0a66 should have added these icons in list, but unfortunately
they are missing, thus creating a broken (missing entries) auto-generated file
bitmap_info.cpp when rebuilding png icons.
2024-06-07 16:15:48 +02:00
Jeff Young cb7d51dbe4 Formatting. 2024-06-07 12:10:41 +01:00
Jeff Young d8c2929163 SCH_SHEET_PATH::IsContainedWithin() didn't do what I thought it did.... 2024-06-07 12:09:58 +01:00
Jeff Young c0ee987e8b Fix typo. 2024-06-07 10:52:11 +01:00
jean-pierre charras dc6b211227 better tool tips 2024-06-07 11:19:56 +02:00
jean-pierre charras 8b1e971f29 bitmap_info.cpp: fix a crash when opening the simulator frame.
It was due to missing bitmaps, used in simulator frame horizontal toolbar.
They were removed probably by mistake in commit 0e66adbc
2024-06-07 11:13:58 +02:00
Wayne Stambaugh 360d185e3b Clear parent symbol references when flattening derived library symbols.
Broken parent symbols could lead to invalid return values and flattened
library symbols cannot be derived from a parent symbol.
2024-06-06 18:53:27 -04:00
Seth Hillbrand 6dcb9bb664 Do not allow trailing/leading whitespace in mandatory fields
Reference, Value, Footprint and Datasheet all reference elements that
should not use trailing/leading whitespace or similar hidden charaters.
Other fields may utilize leading/trailing whitespace for obscure
purposes but won't break functionality as they are display only
2024-06-06 11:48:20 -07:00
Jeff Young edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
jean-pierre charras 616510aca2 Pcbnew, Altium import: Fix issues with hatched zones.
- Filled zones using the hatch pattern cannot use the primitives from Altium.
the filled shapes must be rebuilt.
_ Filled zones using the hatch pattern with a very small gap are now converted
to a polygon pattern. Otherwise the calculation time can be very big.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-06 16:37:28 +02:00
Jeff Young cbfc692e24 Performance for large hierarchies: symbol fields table
Don't bother to sort sheet list when we're going to
sort the symbols anyway.
2024-06-06 11:53:01 +01:00
Jeff Young 758974f5aa Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.
2024-06-06 11:53:01 +01:00
Jeff Young a6e8cfe35f Performance for large hierarchies: avoid sorting
Don't sort SCH_SHEET_LISTs if we're just scanning the doc.
2024-06-06 11:53:01 +01:00
Jeff Young 44c588f122 Performance for large hierarchies: lazy eval
Don't create SCH_SHEET_LISTs until we have to, and then
only create them once.
2024-06-06 11:53:01 +01:00
Jeff Young e543ff0578 Performance for large hierarchies: lookups
Don't bother to sort sheet lists when we're just looking
up a UUID, sheet count, other symbol units, etc.
2024-06-06 11:52:57 +01:00
Jeff Young 68fbe98b1d Performance for large hierarchies: ERC
Share constructs between ERC tests.

Large SCH_SHEET_LISTs, in particular, can be very
expensive to construct.
2024-06-06 11:41:37 +01:00
Jeff Young 9b8f1109e6 Formatting. 2024-06-06 11:41:37 +01:00
Jon Evans 10922a194c Remove extraneous cache fill per row
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18159


(cherry picked from commit 64da49f22e)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-06-05 16:08:45 +00:00
Mike Williams f3d2f4af01 PCB: add fields checkbox to Edit Text and Graphics
Also add missing saves for dimensions checkboxes.
2024-06-05 11:50:17 -04:00
Wayne Stambaugh 82b310f666 Do not update schematic editor net navigator when it's not shown.
Since the addition of all nets to the net navigator, performance on very
complex designs is unacceptable.  Not updating the net navigator is a
cheap and dirty short term fix.  Users with complex designs will not be
able to use the net navigator.  A better fix to resolve the performance
issues needs to be implemented.
2024-06-05 11:46:19 -04:00
Jeff Young 9fb07d886e PCB_GENERATOR_Ts are PCB_GROUP_Ts too.
Also, an item must already be in a commit to add it to a group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17595
2024-06-05 10:51:24 +01:00
Marek Roszko 944835eefc Add PCB_VIA equality operator overload 2024-06-04 21:34:14 -04:00
dsa-t 34f0fb8f21 Revert "Don't reset the view controls state just because we are setting the already active tool state again"
This reverts commit e914c0c1a0

(cherry picked from commit 6b7b6fa3e3)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-06-04 18:03:41 +00:00
Jeff Young 8e855156c8 Import child sheets relative to project, not parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17785
2024-06-04 17:47:55 +01:00
Seth Hillbrand 08f181115b Use KiROUND for consistency
Ensure that it is clear we are rounding to nearest point
2024-06-04 08:55:42 -07:00
Mike Williams 7679f40b2b SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 10:03:00 -04:00
Jon Evans 0b0a37aaf7 Move padstack serialization to PADSTACK
Also move a few more things from pad/via
2024-06-04 09:28:24 -04:00
Jeff Young 4f4311ba57 Use consistent positive rotation direction.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17580
2024-06-04 13:25:57 +01:00
Jeff Young 42caceb799 Tidy incorrect column width (and fix some formatting). 2024-06-04 13:00:02 +01:00
Jeff Young e5bad195b6 Fix a bunch of failures to resolve text variables. 2024-06-04 12:46:34 +01:00
Jeff Young 26fc2bd071 Reduce compiler warnings. 2024-06-04 11:18:45 +01:00
Jeff Young a74e834b33 Formatting. 2024-06-04 11:16:11 +01:00
Jeff Young 855c972156 Add regression test and example rule.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18142
2024-06-04 10:58:52 +01:00
dsa-t bc3ae8ca51 Don't construct an arc if we won't need it in pcbnew gfx importer.
(cherry picked from commit d34df3e951)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-04 04:21:06 +00:00
dsa-t ca18112041 Fix ellipse angles when importing DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18121


(cherry picked from commit 044a2305e3)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-04 04:19:51 +00:00
Seth Hillbrand 590bd6237d Fix off-by-one error in distance check for arcs 2024-06-03 16:29:06 -07:00
Jeff Young 18e33a0957 Check drilled holes against other holes, even if laser burned.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18142
2024-06-03 21:53:37 +01:00
Seth Hillbrand 9f2c9636f0 Update conn minor check to use Advanced Config 2024-06-03 11:56:37 -07:00
Seth Hillbrand 74998790e8 Turn off incremental connectivity for small schematics
The benefit of incremental connectivity is only for larger
schematics.  For smaller schematics, the downside of larger bug surface
outweighs the current benefits
2024-06-03 11:33:29 -07:00
Seth Hillbrand d44bf89b98 Update wayland file location
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18141
2024-06-03 10:57:08 -07:00
Mike Williams 32289ffce7 schematic: fix broken undo of sheets, new and changed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11855
2024-06-03 13:45:52 -04:00
Seth Hillbrand 549ea93be2 Fix typo 2024-06-03 10:41:37 -07:00
xx 4dffa6f9e8 Fix equal comparison in BOM_PRESET
Fixes #18097.
2024-06-03 16:33:34 +00:00
Jeff Young ec0fdfffff ADDED: markers for excluded-from-sim items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15382
2024-06-03 17:12:15 +01:00
Jeff Young 5e1a16e821 Regularize DNP printing & plotting with painting. 2024-06-03 12:53:37 +01:00
Jeff Young aca73b699c Fix uninitialized variables. 2024-06-03 11:44:10 +01:00
Jeff Young 6aab0d66c2 Fix uninitialized variables. 2024-06-03 11:44:10 +01:00
Jeff Young 900c7e0257 Centralize exclude-from-sim processing. 2024-06-03 11:44:10 +01:00
Jeff Young 40854cec0e Remove cover types. 2024-06-03 11:44:10 +01:00
Frank Muenstermann 63d828d5ff kicad-cli: The --precision parameter was not recognized, if unit was inch, the export crashed 2024-06-03 09:03:57 +00:00
Jeff Young aee7680a6c ADDED: support for DNP & friends at the sheet level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14387
2024-06-02 22:41:22 +01:00
Jeff Young 1f69680d91 Expose global Field Name Templates to symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2382
2024-06-02 19:31:27 +01:00
Jeff Young efd3cb115b Update Zone Manager for look & feel and coding stds. 2024-06-02 17:41:54 +01:00
charrasjp d163a72d49 French translation update 2024-06-02 15:09:08 +02:00
Jeff Young 14f3a22f3d ADDED: support editing unit in Reference Field Properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17362
2024-06-02 13:42:34 +01:00
Jeff Young 86d7cf5d96 Formatting. 2024-06-02 10:52:18 +01:00
Sven Pauli c7ad5efbed Implemented flip for tuning patterns. 2024-06-02 09:49:41 +00:00
Jeff Young 4a01f322ff Special-case hit-testing of filled schematic rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17879
2024-06-01 22:48:02 +01:00
Jeff Young dc8fd0996d Don't attempt to plot rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18133
2024-06-01 19:17:05 +01:00
Jeff Young 53ec5d2c19 Retain UUIDs where possible when updating footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17451
2024-06-01 13:45:15 +01:00
Jeff Young 11193d2cda Make sure ERC pin-to-pin checks are always in same order.
Comparing U1.pin1 : U2.pin1 will return the same
results as U2.pin1 : U1.pin1, but will result in a
different serialization of any exclusions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17004
2024-06-01 11:37:34 +01:00
Jeff Young 878a795be1 Formatting. 2024-06-01 11:37:34 +01:00
Alex Shvartzkop 5742ba2ef1 Remove gdk header from unix environment.cpp. 2024-06-01 11:37:37 +03:00
Alex Shvartzkop e1a8e53d07 Some CMake fixups for kiplatform. 2024-06-01 07:13:17 +03:00
Alex Shvartzkop 2bc6e5a856 kiplatform: Separate operating systems and wxWidgets ports. 2024-06-01 07:05:19 +03:00
Alex Shvartzkop 5b70983692 Detect wxWidgets port in CMake (KICAD_WX_PORT). 2024-06-01 06:49:52 +03:00
Alex Shvartzkop 6d6f6f384e Fix MSVC warning C4355: 'this': used in base member initializer list. 2024-06-01 06:49:30 +03:00
Alex Shvartzkop cf7ad330e9 Fix some platform ifdef checks. 2024-06-01 06:49:11 +03:00
Alex Shvartzkop 0336fdbd54 Update path finding in FindwxWidgets.cmake (from upstream CMake). 2024-06-01 06:48:56 +03:00
Alex Shvartzkop bc07efc076 Fix a build issue on MSVC with wx 3.3. 2024-06-01 06:48:47 +03:00
Seth Hillbrand b6f1748bb3 Update translations 2024-05-31 17:41:49 -07:00
Mark Hämmerling 3335ab3918 Translated using Weblate (German)
Currently translated at 99.0% (9347 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-06-01 02:40:43 +02:00
Wellington Terumi Uemura 4dece7334e Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9437 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-06-01 02:40:43 +02:00
Nguyễn Ngọc Khánh d66f7da2d7 Translated using Weblate (Vietnamese)
Currently translated at 21.0% (1987 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-06-01 02:40:42 +02:00
Nguyễn Ngọc Khánh 2205149034 Translated using Weblate (Vietnamese)
Currently translated at 20.8% (1969 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-06-01 02:40:42 +02:00
pominglee e685e5ac14 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.4% (9385 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-06-01 02:40:42 +02:00
CloverGit c9e751d896 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.7% (9411 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-06-01 02:40:42 +02:00
Henrik Kauhanen 6704e1a87f Translated using Weblate (Swedish)
Currently translated at 99.9% (9429 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-06-01 02:40:42 +02:00
Henrik Kauhanen 9377241c58 Translated using Weblate (Finnish)
Currently translated at 99.9% (9434 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-06-01 02:40:42 +02:00
CloverGit e704e71ede Translated using Weblate (Chinese (Simplified))
Currently translated at 99.4% (9385 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-06-01 02:40:42 +02:00
Henrik Kauhanen 490d6359b9 Translated using Weblate (Swedish)
Currently translated at 99.4% (9384 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-06-01 02:40:42 +02:00
Jan Straka 2086add8e1 Translated using Weblate (Czech)
Currently translated at 77.9% (7352 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2024-06-01 02:40:42 +02:00
dsa-t 1ae43f5485 Translated using Weblate (Russian)
Currently translated at 95.9% (9053 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-06-01 02:40:42 +02:00
ZbeeGin dfea8b306c Translated using Weblate (Polish)
Currently translated at 100.0% (9437 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-06-01 02:40:42 +02:00
Wellington Terumi Uemura 9ea2c4182a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9437 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-06-01 02:40:42 +02:00
Henrik Kauhanen d686d608c1 Translated using Weblate (Swedish)
Currently translated at 99.4% (9382 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-06-01 02:40:41 +02:00
ZbeeGin 83f32f390c Translated using Weblate (Polish)
Currently translated at 99.9% (9436 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-06-01 02:40:41 +02:00
Laurens Holst 352b73d307 Translated using Weblate (Dutch)
Currently translated at 100.0% (9437 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-06-01 02:40:41 +02:00
ZbeeGin e7526f9a87 Translated using Weblate (Polish)
Currently translated at 99.5% (9398 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-06-01 02:40:41 +02:00
Henrik Kauhanen 5f17993a9f Translated using Weblate (Swedish)
Currently translated at 99.4% (9381 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-06-01 02:40:41 +02:00
Toni Laiho eced442053 Translated using Weblate (Finnish)
Currently translated at 99.9% (9434 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-06-01 02:40:41 +02:00
Pferd O cc80649014 Translated using Weblate (German)
Currently translated at 99.0% (9345 of 9437 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-06-01 02:40:41 +02:00
Seth Hillbrand ae232054f7 Revert "Remove unneeded != operator"
MSVC errors when we don't keep this operator.

This reverts commit c6499cf5db.
2024-05-31 17:38:45 -07:00
Seth Hillbrand e8c96a8a20 Fixups for a9ae86ee
Correcting a couple mistakes and clarifying rounding
2024-05-31 17:31:50 -07:00
Seth Hillbrand 382477c622 Fix sin/cos fixed values 2024-05-31 17:10:36 -07:00
Marek Roszko 8b4253cda4 Drop the first point of an arc when building an outline when there's a previous point that's being changed
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18125
2024-05-31 18:40:16 -04:00
Seth Hillbrand 2f9b10e379 Revert "Add additional 45° shortcuts for sin/cos"
Needs more testing

This reverts commit e83ca5e91d.
2024-05-31 14:40:10 -07:00
Jeff Young 5d62345cbd ADDED checkbox to turn Margin layer on/off.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12493
2024-05-31 22:08:40 +01:00
Seth Hillbrand 79a354bf0e Unify SCH_PIN ambiguity in equality operator
Remove != operator that is not used for C++20 and reworked
SCH_PIN==SCH_ITEM operator that was not reciprocal
2024-05-31 13:42:36 -07:00
Seth Hillbrand c6499cf5db Remove unneeded != operator
C++20 defines these implicitly
2024-05-31 13:29:34 -07:00
Seth Hillbrand e83ca5e91d Add additional 45° shortcuts for sin/cos 2024-05-31 13:27:52 -07:00
Seth Hillbrand a9ae86eefd Cleanup geometry functions
Added Distance(VECTOR2) function that returns a double.  Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints

Also extended the size for arc calculations that get distances to center
points to avoid overflow
2024-05-31 12:26:37 -07:00
Jeff Young 931de12072 Use wxWidgets to track DPI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981
2024-05-31 17:08:43 +01:00
Jeff Young e3f77cd410 Handle DPI_CHANGED events for 3D canvases.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17981
2024-05-31 17:08:43 +01:00
jean-pierre charras 1322e0bc73 symbol editor: allows rotation of fields in derived symbols.
Fields in derived symbols are editable, so the context menu must allow rotations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18003
2024-05-31 17:32:31 +02:00
Jeff Young 3cc653b6ff Revert DPI-change fix.
(Jon has a better one coming.)
2024-05-31 15:46:01 +01:00
Jeff Young f907b58d17 Handle DPI-change for footprint 3D-previews in Footprint Chooser. 2024-05-31 13:48:44 +01:00
Jeff Young 2681461992 Formatting. 2024-05-31 13:35:44 +01:00
Jeff Young f3d5d4afdd Formatting. 2024-05-31 12:35:17 +01:00
Jeff Young 3be6d5c5de Setup 3D canvas for Footprint Chooser previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17910
2024-05-31 12:33:32 +01:00
Jeff Young 6f0a1ade01 Don't add things to the selection that aren't in the commit.
Don't process line-pairs when one has already been deleted.

Clean up created line segments when operation is cancelled.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18122
2024-05-31 11:49:24 +01:00
Jeff Young b567e4d521 Silently interpret 0 as cancel.
No need to interrupt the user's workflow.
2024-05-31 10:54:07 +01:00
Jeff Young c60796aa4f Formatting. 2024-05-31 10:46:34 +01:00
Jeff Young 7151f9a131 Formatting. 2024-05-31 10:36:51 +01:00
Jeff Young 1eb26b439a REMOVED new footprint dialog.
We now just create an "Untitled" footprint.

Also fixes a bug where the preview of new footprints
would zoom in too far.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17573
2024-05-31 10:36:51 +01:00
Seth Hillbrand 015b93b474 Fixup arc check in dp coupled
Handle arcs starting at candidate end point.
Fix total arc size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967
2024-05-30 22:45:33 -07:00
Marek Roszko 0354345963 Fix another spot the logger for boost test is hardcoded 2024-05-30 20:17:55 -04:00
Seth Hillbrand 75ab3d9e8b Handle arcs dp coupling
Calculate coupled arcs and spacing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967
2024-05-30 16:11:12 -07:00
Seth Hillbrand bffbdad9c0 Cleanup track comps 2024-05-30 14:21:51 -07:00
Seth Hillbrand 429625e311 Unify SHAPE_ARC clockwise calc.
We don't really need the extra angle calculations
2024-05-30 14:19:57 -07:00
jean-pierre charras 1c9e96c89a do not flag an empty string as translatable. 2024-05-30 15:50:32 +02:00
Jeff Young f84b66b985 Change 3D Viewer default to follow-plot-settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17060
2024-05-30 14:30:56 +01:00
Jeff Young 652c1d4006 Formatting. 2024-05-30 13:12:53 +01:00
Jeff Young c0635f222d Apply ExportPdf fix to remaining jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863
2024-05-30 09:19:23 +01:00
Marek Roszko 16ae81abb3 Change log level for boost test text log to message 2024-05-29 22:23:59 -04:00
Marek Roszko 4c5b4cd99f Add BOOST_TEST_CONTEXT wrap in one function 2024-05-29 22:23:59 -04:00
Alex Shvartzkop 7a0d75a5c4 Improve GRID_CELL_ICON_TEXT_RENDERER rendering on hidpi monitors. 2024-05-30 03:56:30 +03:00
Jeff Young 3cf424d929 Make sure var overrides get synced to board properties.
Also allow the board properties to override title-block properties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863
2024-05-30 00:09:43 +01:00
Jeff Young ac59a65d8d Resolve variables in LIB_SYMBOLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18099
2024-05-29 22:52:55 +01:00
Jeff Young d82522304c Improve clarity. 2024-05-29 19:53:20 +01:00
Jeff Young c828deee35 Sorting is not implemented on LIB_TREE columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18101
2024-05-29 18:49:11 +01:00
Jeff Young ec89d2c22e Formatting. 2024-05-29 17:56:15 +01:00
Jeff Young 15d4e114e0 Move pad checking to Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102
2024-05-29 15:25:49 +01:00
Mike Williams cc350cf279 symbol fields table: remember includeExcludedFromBOm correctly 2024-05-29 08:41:25 -04:00
Mike Williams a8daa38e83 pcb: grab unconnected needs to ignore same-footprint ratsnets items 2024-05-28 16:46:53 -04:00
jean-pierre charras 8165ec66e9 FOOTPRINT::CheckPads(): better check for hole in PHT pad.
Hole not fully inside the pad copper area is now tested.
2024-05-28 20:00:08 +02:00
Jeff Young f7b971ecb7 Setup Footprint-Editor-specific severities.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102
2024-05-28 18:11:25 +01:00
Alex Shvartzkop 139d356065 Fix scale factors of layer box selectors. 2024-05-28 18:52:03 +03:00
Jeff Young 51004e42f4 Improve comments. 2024-05-28 15:37:11 +01:00
Jeff Young bab97f91cc Tidy up string find API usages. 2024-05-28 15:30:29 +01:00
Jeff Young 11b72c294b ADDED: expose plot-pad-numbers in plot dialog. 2024-05-28 15:30:29 +01:00
Seth Hillbrand 43a622cadf Ensure we are checking all ERC errors
Also, handle the possiblity that we return NULL when calling
DeserializeFromString in the case where we don't handle all cases or the
file is corrupted
2024-05-28 06:55:34 -07:00
Alex Shvartzkop e3e63fb1b8 Disable hidpi cursors on GTK and OSX.
wxCursor scale factors won't be supported before wx 3.3.
MSW doesn't scale cursors, so it works as expected there.
2024-05-28 16:25:01 +03:00
jean-pierre charras 68fa45dea0 Pcbnew, plot drill marks: fix incorrect plot drill mark in some cases.
If a non copper layers is added to a copper layer for plot with drill marks,
the drill mark was not visible (covered by shapes plotted from non copper layer).

Now copper layers are plotted after the non copper layers.
2024-05-28 09:52:30 +02:00
Jeff Young b88d3b13ac ADDED: sketch-pads-on-fab-layers to CLI PDF & SVG export.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18091
2024-05-27 20:59:11 +01:00
Seth Hillbrand 0881fc8aa9 Don't try to convert non-UTF8 strings in plugin
This gives asan fits as the strlen overruns.  These are not UTF-8
strings anyways
2024-05-27 11:30:43 -07:00
Seth Hillbrand 54efd32f7a Ensure nets are referenced to main board
We set new elements to the temporary board's netlist.  These need to be
updated when moving the fooprint to the main board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17242
2024-05-27 11:30:43 -07:00
xx 5ff61ae561 Add rectangle height and width to properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17181
2024-05-27 17:28:32 +00:00
Jeff Young 513e68a04a Trim punctuation from end of URLs. 2024-05-27 17:06:09 +01:00
Jeff Young 4901ffd935 Formatting. 2024-05-27 17:06:09 +01:00
Seth Hillbrand 9c24a39156 Handle 2581 knockout text with multiple outlines
Previous commit removed the handling of multiple outlines.  This
restores Jeff's initial, correct handling, only minus the "UserSpecial"
nest

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18042
2024-05-27 07:29:52 -07:00
Jeff Young f3b57c20af Trim trailing punctionation from doc URLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18089
2024-05-27 14:17:13 +01:00
Jeff Young bc14a841cb Check for drilled hole errors in Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18093
2024-05-27 13:51:21 +01:00
Jeff Young 2925d63c44 Formatting. 2024-05-27 13:04:20 +01:00
Jeff Young e9a1c3032d Update commenting following a bit of research into commit history. 2024-05-27 12:23:56 +01:00
Jeff Young 233ebb3e09 Add commenting regarding double-output of text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18090
2024-05-27 12:14:08 +01:00
Alex Shvartzkop 20e2dddc0b Make project manager text aligned with icons, also make it scrollable. 2024-05-27 11:49:16 +03:00
Alex Shvartzkop 41b30e6ac6 Use logical size to center the bitmap in bitmap button. 2024-05-27 11:25:55 +03:00
Alex Shvartzkop d451d2f548 Make board stackup page usable on hidpi. 2024-05-27 01:44:42 +03:00
Alex Shvartzkop b6aa01a572 Accept bitmap bundles for menu items (but don't use it yet). 2024-05-27 01:02:12 +03:00
Alex Shvartzkop 284cda1fca Improve copper zone dialog layer list checkbox alignment on hidpi. 2024-05-27 01:02:12 +03:00
Alex Shvartzkop 07470efc0b Autosize bitmap buttons in wxFB. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop c401e3d24b Prefer wxFB sizes in bitmap buttons. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop 2c73f74112 Use bitmap bundles in 3D viewer toolbar. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop 5e64bd6256 Center bitmaps in bitmap buttons by default. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop 2a5903cd9b More universal way of scaling indicator icon bitmaps. 2024-05-26 22:14:52 +03:00
Jeff Young df3eaf0e03 Trim before sorting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17046
2024-05-26 19:28:24 +01:00
Jeff Young e400d49af6 Trim covered region to bounding hull.
Otherwise a long track crossing a footprint will look
like it covers most of it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17299
2024-05-26 18:45:58 +01:00
Jeff Young 8204577fba Throw duplicate pin error as it prevents other checks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14761
2024-05-26 16:18:54 +01:00
Seth Hillbrand becc0232b4 Fixup IPC2581 knockout text
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18042
2024-05-26 08:04:06 -07:00
Seth Hillbrand ab0426d620 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16231
2024-05-26 07:51:15 -07:00
Seth Hillbrand b2e0c2606f Avoid referencing parents after deletion
We look at the parent when deleting EDA_ITEMs but when clearing the test
sheet, we delete the sheet before the pin, causing a use-after-free.
Avoid this by setting parents to null in this case

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17961
2024-05-26 07:35:46 -07:00
Jeff Young aeadec40b7 Select starting track items before expanding selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17432
2024-05-26 15:23:31 +01:00
Jeff Young 30b5adde17 Fix spacing/scaling of indicators on MacOS.
Also pushes indicator scaling improvements to GerbView.
2024-05-26 14:37:05 +01:00
Alex Shvartzkop 7774a43762 Fix project tree icons on Windows. 2024-05-26 13:54:12 +03:00
Alex Shvartzkop b64a30f44b Fix color swatches and color picker dialog on GTK with window scaling. 2024-05-26 13:02:37 +03:00
Alex Shvartzkop 296630d484 Allow using higher resolution bitmaps in bitmap buttons on GTK. 2024-05-26 09:23:43 +03:00
Alex Shvartzkop 72bd0c583f Fix project tree icons on GTK with 2x scaling. 2024-05-26 09:15:54 +03:00
Alex Shvartzkop e55da55e04 Remove debugging code from STEP exporter. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop eff4b899bb Use bitmap bundles in launcher panel. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop 1afbcb04db Improve WX_GRID col label height to avoid clipping on hidpi. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop 696b86ab7d Show higher resolution icons on hidpi in project tree. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop 6eb8bf3d39 Add hidpi PCM icons for launcher panel. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop 0e66adbca1 Generate hidpi variants for mid size (_24) application icons. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop 1ae9749429 Use bitmap bundle for auto track width button. 2024-05-26 03:56:58 +03:00
Alex Shvartzkop 067e9c308d Improve sizing in color picker dialog. 2024-05-26 03:56:58 +03:00
Alex Shvartzkop 0b4ff7b859 Improve indicator icons in hidpi monitors. 2024-05-26 01:16:47 +03:00
Jeff Young f1aea810cb Add knockout text support to IPC2581.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18042
2024-05-25 22:30:41 +01:00
Jeff Young b0dddb6d95 Formatting. 2024-05-25 22:06:38 +01:00
Jeff Young 34dbee0693 Show text item anchor locations in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17668
2024-05-25 21:40:37 +01:00
dsa-t 9a1b3471fd Revert "Improve toolbar bitmap redraw performance on Windows."
This reverts commit 6170151cbc
2024-05-25 20:32:48 +00:00
Alex Shvartzkop b89d4a7f20 3D model export improvements:
- Option to export pads separately from tracks+vias
- Options export silkscreen and soldermask as flat faces
- Improve 3D model export dialog layout
- Use VisMaterialTool to specify metallic-roughness for glTF.
- Less OCCT boolean operations (faster, less bugs)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2072
2024-05-25 22:27:01 +03:00
Alex Shvartzkop 6170151cbc Improve toolbar bitmap redraw performance on Windows.
Especially noticeable on high dpi.
2024-05-25 21:47:51 +03:00
Marek Roszko 7dee29f70a Hackfix some cases the IME on windows locks up
Asking the IME to cancel when the canvas takes focus fixes the case where:

- Windows input lang set to Chinese
- Input mode set to english instead of chinese
- You spam the M key while launching a sch/pcb from the kicad.exe until the editor opens
- The windows would then normally be frozen
2024-05-25 13:25:10 -04:00
jean-pierre charras 3065ae1f01 PANEL_EESCHEMA_COLOR_SETTINGS: fix incorrect symbol drawing.
Graphics items were not modified when the LIB_SYMBOL Y axis orientation was
modified, making the symbol body not visible in panel canvas.
2024-05-25 18:01:51 +02:00
Marek Roszko 808517dd74 Remove no longer needed hack on msw with wx 3.2.5
wxButton::GetDefaultSize was fixed and returns the correct size now
2024-05-25 10:45:27 -04:00
Marek Roszko ba65231f6b Move vcpkg to wx 3.2.5 2024-05-25 10:29:02 -04:00
Jeff Young 1c77e087a7 Add a sprinkling of GetPixelScaleFactor() for MacOs. 2024-05-25 14:26:43 +01:00
Jeff Young 17308e821f Formatting. 2024-05-25 12:05:13 +01:00
Jeff Young 26fe4c05e1 CmpNoCase() returns 0 for a match (which evals to false as a bool).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18087
2024-05-25 12:05:13 +01:00
Jeff Young 89fa83bcc2 Formatting. 2024-05-25 12:05:13 +01:00
Alex Shvartzkop 894bf45480 Make color picker dialog usable on hidpi monitors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17860
2024-05-25 04:13:13 +03:00
Marek Roszko e9fde0051f Don't let CaptureCursor fight modal dialog 2024-05-24 18:57:24 -04:00
Alex Shvartzkop 1971faa81e Fix very tall Plot dialog on GTK.
Some scrollable controls need wxFIXED_MINSIZE, on some platforms, apparently.

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

8.0 commit: f9a9db6503
2024-05-24 23:42:10 +03:00
Jeff Young bda0a73c63 Set swatch background colors.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17564
2024-05-24 21:26:20 +01:00
Jeff Young a678d0d710 Delete tuning patterns in Unroute Selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18065
2024-05-24 19:24:09 +01:00
Jeff Young ecb7cd6b84 Fix color-swatch sizing on MacOS.
Also fixes BITMAP_BUTTON sizing.
2024-05-24 18:27:15 +01:00
dsa-t 6baceedea4 Switch length tuner settings action scope to global to make the hotkey work.
(cherry picked from commit 8d001a8031)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-05-24 14:47:48 +00:00
Jeff Young 397ae3bafd Support wildcards and regEx's in Net Inspector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18071
2024-05-24 12:24:05 +01:00
Marek Roszko 132ecee665 Don't reset the view controls state just because we are setting the already active tool state again 2024-05-23 22:23:34 -04:00
Jeff Young 032b5a6d65 Fetch board finish before exporting stackup to clipboard.
Also fixes some backward logic in setting modified flag.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17089
2024-05-23 18:30:58 +01:00
Alex Shvartzkop 884051fae1 Update status bar widths on DPI change. 2024-05-23 20:22:13 +03:00
Jeff Young f7c7791b6c Honour shift-key for spin buttons in 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17541
2024-05-23 17:01:27 +01:00
Jeff Young 98496dfa60 Formatting. 2024-05-23 16:31:53 +01:00
Jeff Young d5c3a4036c Process clearance rules for plated holes in router.
Also makes sure the clearance is shown for a collision,
even if the preference for showing clearances is off.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18078
2024-05-23 16:26:43 +01:00
Jon Evans 81efc7778a Fix bad clearance logic in cecc1a2f
(cherry picked from commit a1cd73e730)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-23 15:21:40 +00:00
Mike Williams 3f4c82b39b annotate: cleanup Annote event name to match button 2024-05-23 09:47:30 -04:00
Mike Williams 8d8fa155f7 annotate: remove dead code
Never gets called as we will always have a message.
2024-05-23 09:47:30 -04:00
Mike Williams 39f355e71d annotation: also report cleared annotations 2024-05-23 09:47:30 -04:00
Jon Evans 5b3b0ff836 Use true arc collision for segment<>arc
Using an approximation here results in different collision
results for segment<>arc than point<>arc, which
can cause odd behavior in the router.
2024-05-23 08:56:10 -04:00
Wayne Stambaugh 795a9eea60 Coding policy fixes.
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped.  The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
2024-05-23 07:59:45 -04:00
Jeff Young edae328ca6 Push multi-sweep traces down into MathPlot.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17215
2024-05-23 12:24:56 +01:00
John Beard 0bcd5e5795 Eeschema: Also make 'note' backgrounds translucent on selection
For the same reason as device backgrounds - it obscures everything
else while moving a filled shape.
2024-05-23 16:51:06 +08:00
John Beard 5a69b163a3 Fix translucency when selecting a filled shape in the symbol editor
Overriding the color in draw() throws away the alpha that was set
due to aItem->IsSelected() in getRenderColor().

Instead, get the layer BG fill color in getRenderColor() before
the translucency is applied.
2024-05-23 16:51:06 +08:00
Alex Shvartzkop e817f68f8e Remove unused header. 2024-05-23 08:30:55 +03:00
Alex Shvartzkop ef148d372d Set current scale factor for generated bitmaps in color swatch.
Therefore, the bitmaps will be drawn as-is.
2024-05-23 08:30:55 +03:00
John Beard fd4c15517f Eeschema: Fix selection of items inside filled shapes
The selection heuristic broke down when one item was a filled
shape. Because all hit tests would succeed with distance 0 for
these shapes, they would always be considered the closest item
to the exclusion of all else, which made it very hard to
click on a graphic inside a filled shape.

Now, recognise when an item would be "dominating" and
decline to promote it to the "closet" spot. It will still
be selectable if there are no other items nearby, or if
there are multiple shapes.
2024-05-23 12:53:09 +08:00
Alex Shvartzkop cd83666b72 Draw x2 and x3 swatch bitmaps in layer selectors. 2024-05-23 05:09:39 +03:00
Alex Shvartzkop c2a80092d7 Draw fp grid layer swatch in proper scaling on hidpi. 2024-05-23 05:09:39 +03:00
Seth Hillbrand f74d1060d4 Ensure that the copper conn check re-adds epsilon
When checking if the particular rule is what is being checked, we rely
on the value of the minimum width.  Since we modified that to allow
width checking, this re-adds it for the comparison
2024-05-22 16:30:09 -07:00
Seth Hillbrand bce560d05f Include DRC Epsilon in connection width checker
Avoids rounding errors flagging connections too small by nanometers
2024-05-22 16:15:51 -07:00
Alex Shvartzkop 85f5b8849e Invalidate control sizes in ACTION_TOOLBAR. 2024-05-23 00:40:47 +03:00
Alex Shvartzkop 492ce600a4 Improve message panel alignment on hidpi monitors. 2024-05-23 00:40:47 +03:00
Alex Shvartzkop 77b285c8ce Improve BITMAP_BUTTON behaviour when changing DPI. 2024-05-23 00:40:47 +03:00
Jeff Young 856d03dbe2 Create signals from .save directives (as well as .probe directives).
(Also fixes a bug where we only looked for a single
token after .probe.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18057
2024-05-22 22:37:57 +01:00
Jeff Young 3944d8abc9 Formatting. 2024-05-22 22:37:57 +01:00
JamesJCode f88f6a053b Cleanup: Remove unused variable 2024-05-22 22:08:07 +01:00
JamesJCode 76cb7cf54a Clear all dirty connectivity flags on symbols
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17984

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

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

Both resulted in dirty state and duplicated items in the
subgraphs during incremental connectivity, which resulted
in essentially corrupted subgraph states.
2024-05-22 21:51:02 +01:00
Seth Hillbrand 47e4ebb32a Re-enable moving of all footprint text in board
Seems like a lot of people really like to be able to modify the text
positions/content of their footprints

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18024
2024-05-22 10:36:12 -07:00
Jeff Young debc94ff49 Rewrite Eagle rotated text algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019
2024-05-22 18:18:47 +01:00
jean-pierre charras 6fc662188f Gerbview: fix a minor issue.
When the option "always hide all layers but active" is set, the active layer
changed using hotkeys or Toolbar layer selector did not update the visible
selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18059
2024-05-22 17:25:01 +02:00
John Beard 882c766493 Always update geometry on dimension property change
Anything that changes the text may also need to change the geometry,
as the text might cause knockouts of the dimension lines.

Resolves several avenues for the property manager to make changes
that 'forget' to update aspects of dimensions.
2024-05-22 22:08:51 +08:00
John Beard af74d2a746 Pcbnew: Fix context menu when moving
The EDIT_TOOL is actually 'co-operating' with the SELECTION_TOOL
by putting its tools into the SELECTION_TOOL's menu. This means
the EDIT_TOOL::m_menu is sad and empty inside, and if you show it,
it either doesn't show at all, or a tiny stub is shown.
2024-05-22 11:15:52 +08:00
Jeff Young f4f3f52fd4 Improve Eagle rotated text importing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18019
2024-05-22 01:16:06 +01:00
Jeff Young 560f6f87e5 Silkscreen clearance tests are run across layer pairs.
(So any rule areas must pretend they're on all the
given side's layers to get expected results.)
2024-05-22 01:16:06 +01:00
Jeff Young ab2fdfb9cc Formatting. 2024-05-22 01:16:06 +01:00
Seth Hillbrand 819bdf4372 Fix qa failure 2024-05-21 16:26:00 -07:00
Roberto Fernandez Bautista ee3533baeb kicad-cli sym export svg: Ensure bounding box is correctly calculated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18062


(cherry picked from commit 3e5ceaa319)

Co-authored-by: Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
2024-05-21 20:00:35 +00:00
jean-pierre charras a53dd998b9 Clipper2: fix a compil warning with gcc 14 (already fixed in Clipper2 repo) 2024-05-21 19:56:49 +02:00
Seth Hillbrand 3aa5c1885f Update translations 2024-05-21 09:38:53 -07:00
Ivan Chuba dbf74a4be1 Translated using Weblate (Ukrainian)
Currently translated at 84.5% (7951 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2024-05-21 18:36:29 +02:00
CloverGit 930c6acb33 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9399 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-05-21 18:36:29 +02:00
Henrik Kauhanen 30a5c8bb55 Translated using Weblate (Swedish)
Currently translated at 99.9% (9400 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-05-21 18:36:28 +02:00
pominglee c249ac0506 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (9405 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-05-21 18:36:28 +02:00
pominglee 3406915b51 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9404 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-05-21 18:36:28 +02:00
pominglee 5087244ca6 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9404 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-05-21 18:36:28 +02:00
pominglee 08a9d66ab3 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9404 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-05-21 18:36:28 +02:00
pominglee 91a71b45a7 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.9% (9404 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-05-21 18:36:28 +02:00
Toni Laiho 81705edb0f Translated using Weblate (Finnish)
Currently translated at 99.9% (9404 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-05-21 18:36:28 +02:00
Ulices bebdc54d24 Translated using Weblate (Spanish (Mexico))
Currently translated at 96.5% (9082 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-05-21 18:36:28 +02:00
Nguyễn Ngọc Khánh 3c0d050e97 Translated using Weblate (Vietnamese)
Currently translated at 20.5% (1937 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2024-05-21 18:36:28 +02:00
2tama3 3fe8851e29 Translated using Weblate (Japanese)
Currently translated at 97.1% (9141 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:28 +02:00
Pferd O cbd39e65e2 Translated using Weblate (German)
Currently translated at 99.6% (9371 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-05-21 18:36:28 +02:00
2tama3 44e9a173e6 Translated using Weblate (Japanese)
Currently translated at 97.1% (9141 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:28 +02:00
Tokita, Hiroshi c697aa450b Translated using Weblate (Japanese)
Currently translated at 97.1% (9141 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:28 +02:00
Ettore Atalan f9871a21ad Translated using Weblate (German)
Currently translated at 99.5% (9360 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-05-21 18:36:28 +02:00
Tokita, Hiroshi 975034486c Translated using Weblate (Japanese)
Currently translated at 96.9% (9118 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:28 +02:00
Yutaro Urata2 f865a0ae23 Translated using Weblate (Japanese)
Currently translated at 96.9% (9118 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:27 +02:00
Tokita, Hiroshi 99e8eac2c1 Translated using Weblate (Japanese)
Currently translated at 96.9% (9118 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-05-21 18:36:27 +02:00
Toni Laiho 1c9a7250a4 Translated using Weblate (Finnish)
Currently translated at 99.9% (9403 of 9405 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-05-21 18:36:27 +02:00
pominglee 528f59e188 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.5% (9361 of 9405 strings)

Co-authored-by: pominglee <pominglee@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
Andrew a70ed9c644 Translated using Weblate (Chinese (Traditional))
Currently translated at 99.5% (9361 of 9405 strings)

Co-authored-by: Andrew <yenchang.lin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
zly20129 6952016bf9 Translated using Weblate (Chinese (Simplified))
Currently translated at 99.7% (9384 of 9405 strings)

Co-authored-by: zly20129 <zly20129@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
Laurens Holst 024c4d357a Translated using Weblate (Dutch)
Currently translated at 99.1% (9328 of 9405 strings)

Co-authored-by: Laurens Holst <laurens@grauw.nl>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
Tokita, Hiroshi 35f9b79f87 Translated using Weblate (Japanese)
Currently translated at 96.9% (9117 of 9405 strings)

Co-authored-by: Tokita, Hiroshi <tokita.hiroshi@fujitsu.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
Henrik Kauhanen 1ecb58058a Translated using Weblate (Finnish)
Currently translated at 97.9% (9212 of 9405 strings)

Translated using Weblate (Swedish)

Currently translated at 99.9% (9399 of 9405 strings)

Translated using Weblate (Finnish)

Currently translated at 97.9% (9211 of 9405 strings)

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

Co-authored-by: Wellington Terumi Uemura <wellingtonuemura@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
ZbeeGin 5d1a2ed968 Translated using Weblate (Polish)
Currently translated at 100.0% (9405 of 9405 strings)

Translated using Weblate (Polish)

Currently translated at 99.8% (9394 of 9405 strings)

Co-authored-by: ZbeeGin <zbeegin@op.pl>
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
Translation: KiCad EDA/master source
2024-05-21 18:36:27 +02:00
Seth Hillbrand e097f88d56 Avoid snapping to edge cuts when routing
Snapping happens to elements on copper layers but edge cuts is only
_virtually_ on copper layers.  We need to set its routable flag off to
ensure we don't force-snap to the snap points

(cherry picked from commit c248993a84)
2024-05-21 09:34:45 -07:00
Seth Hillbrand 4a800adffc Avoid int overflow in collisions
When calculating arc collisions, avoid overflowing the integer distance,
which gives a false nearest point

(cherry picked from commit 0a227ea916)
2024-05-21 09:34:45 -07:00
Seth Hillbrand 64e3e17143 Reserve shift for grid modification
(cherry picked from commit f75e6dae84)
2024-05-21 09:34:45 -07:00
Seth Hillbrand f22c904352 Ensure that arc closest positions are matched
We switch from squared to absolute calcualtion when calling into the arc
collision so be sure to catch the new positions and distances

(cherry picked from commit 160a493885)
2024-05-21 09:34:45 -07:00
Seth Hillbrand 8147527437 Optimize SHAPE_ARC collisions
Handle arcs that are actually circles

Ensure that we get a good clearance value even inside arcs
2024-05-21 09:34:45 -07:00
Seth Hillbrand be0e058807 Optimize ARC hulls in PNS
If we can't route through the arc opening, then it is effectively a
circle and we can treat it as such.
2024-05-21 09:34:45 -07:00
Seth Hillbrand 83ad0d5fad Honor Ctrl+Shift combo when starting routing
We want to be able to start routing at an arbitrary point if we
explicitly disable the snapping and grid together
2024-05-21 09:34:45 -07:00
Seth Hillbrand 57c0953c39 Return closest point on line-circle intersection
Don't only look for the segment endpoints when asking the closest point.
If we have a collision, we need to get the collision point
2024-05-21 09:34:45 -07:00
Jeff Young a5436c92d1 Fix build issue. 2024-05-21 17:16:21 +01:00
John Beard ee81d1d880 Temporarily disable dimension angle property access to fix build 2024-05-21 22:11:28 +08:00
John Beard c36efec4b2 Remove evil const that breaks non-Windows compilers 2024-05-21 21:49:49 +08:00
Jeff Young e332320108 Handle font when reading render cache.
(Also fixes a bug where the cache's triangulation wasn't
cached.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17666
2024-05-21 11:31:35 +01:00
Alex Shvartzkop 4cc29184c2 Improve Layer field spacing in footprint properties. 2024-05-21 04:11:59 +03:00
Alex Shvartzkop ba5e4b613f Don't show hotkeys in grid layer selector. 2024-05-21 04:11:59 +03:00
John Beard f941123519 Fix dimension orientation properties
Move text orientation to the text properties section (the
dimension IS an EDA_TEXT, but the user doesn't know that!)

Add the "keep aligned" checkbox, and make sure knockouts and
alignments are recomputed correctly.
2024-05-21 08:56:28 +08:00
Alex Shvartzkop 73e0498768 Improve hidpi color swatch sizes in layer selectors on MSW. 2024-05-21 03:46:09 +03:00
Alex Shvartzkop 5f153eef7f Vertically center the color swatch in grid layer selector. 2024-05-21 03:46:09 +03:00
Alex Shvartzkop 4e306a7d76 Remove useless method (ResyncBitmapOnly) 2024-05-21 03:46:09 +03:00
Jeff Young cb76ad3206 Add unit & body style property access.
(It had gotten lost in SCH_ITEM/LIB_ITEM collapse, but
then again the old version didn't work right
anyway.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18049
2024-05-20 23:37:59 +01:00
jean-pierre charras 59a2de7408 Dialog Export step: fix an issue when exorting a modified board file.
the DIALOG_EXPORT_STEP uses a auto saved copy of the current board to
create the step file (using kicad_cli).
But this file is not associated to a corresponding .kicad_pro file, and
this can create some issues (like the KIPRJMOD not defined)
So create a copy of the current board to export associated to the auto saved board file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16973
2024-05-20 21:04:33 +02:00
Jeff Young 0ff59bc60e We can only knockout a pad if we're plotting the pad shape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17166
2024-05-20 19:48:06 +01:00
Jeff Young 826b72c499 Don't suppress hole plotting for utility layers.
Also simplifies the handling of DXF outline plotting.

Also removes some comments which were no longer accurate.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17166
2024-05-20 19:48:06 +01:00
Mike Williams 52f9060b3b Symbol Fields Table: make sure power symbols don't get added by commits
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17544
2024-05-20 14:11:38 -04:00
Mike Williams a81891053e Schematic: add Power tab to searcher 2024-05-20 13:59:42 -04:00
Mike Williams 8e286d44fc Update Footprint: add checkbox for text content
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17935
2024-05-20 09:16:04 -04:00
Mike Williams 21022b4fa4 Symbol Fields Table: better handle variable fields with attributes
Attributes need to be checked first since we do some internally hackery
to make the checkboxes work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18005
2024-05-20 08:52:00 -04:00
John Beard ce758adca3 Enable horizontal scroll panning
Allow a horizontal scroll event to fall through to the panning branch.

This still restricts zooming to use only the vertical axis, but it
(re-?)enables the horizontal pan function that currently doesn't work
even if the user has set "allow horizontal panning", as the horizontal
scroll doesn't have a modifier, which is the default for vertical scroll
zoom, and thus it skips over the whole panning branch.

If the user has not set horizontal panning, the earlier early return
means that there is no handling of any horizontal scroll event, so this
won't change anything for these users.
2024-05-20 19:23:23 +08:00
John Beard caee430761 No longer auto-set the Footprint field when setting the FPID
This avoids forcing the field to the footprint name in the
library editor, which gets in the way. This doesn't specifically
inhibit the use of the field, and doesn't interfere with fields
users may have set manually (it can be cleared manually if
wished).

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

(cherry picked from commit 44b0ef64e8)

Cherry-picking forward to master to at least keep things consistent
for the time being.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/17998
2024-05-20 17:32:02 +08:00
John Beard 6992afeb38 Consider a bus entry hitting a wire corner or tee to be dot-worthy
This doesn't change the connectivity, it just makes putting the
dot more closely match what the connectivity already does.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18046
2024-05-20 12:40:29 +08:00
John Beard 6313b58ad6 Break out junction analysis so it can be tested in isolation
There are some corner cases with bus entries that could do with
care and it's a bit tricky to keep all the cases in mind at once!
2024-05-20 12:40:29 +08:00
John Beard d3e03c51bf Bus unfold: snap the entry to the bus, even if the cursor isn't right on the bus
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18011
2024-05-20 12:40:06 +08:00
Alex Shvartzkop 615f216ef6 STEP export: don't double-check the wire. 2024-05-19 04:08:43 +03:00
Alex Shvartzkop 1a0ce67155 STEP export: reverse Wire when adding it to Face as a hole.
Better fix for https://gitlab.com/kicad/code/kicad/-/issues/17446

(cherry picked from commit 1264230973)
2024-05-19 04:02:35 +03:00
Alex Shvartzkop 6dd5c7d733 Make IBIS errors visible / more obvious.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18041

(cherry picked from commit 6dfd417767)
2024-05-19 01:44:56 +03:00
Jon Evans 90ee5e097a Clear undo/redo lists when removing board layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17613
2024-05-18 18:16:07 -04:00
Jon Evans 7a3db2d176 Don't drag multiple coincident vias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17915
2024-05-18 17:50:52 -04:00
Alex Shvartzkop 3f704cb1f1 Fix an assert in isCopperOutside.
(cherry picked from commit dfd8aa402d)
2024-05-18 22:52:41 +03:00
Alex Shvartzkop e00219f459 STEP export: allow closing (and constructing) the wire with 1nm edges.
This is ok (and required) because we don't mess with BRepBuilderAPI::Precision nowadays.

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

(cherry picked from commit 5b1c84b5dd)
2024-05-18 22:52:41 +03:00
Jon Evans aaf3142e9a Fix broken hit test for arcs in via placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17844
2024-05-18 13:12:12 -04:00
Jeff Young d82b149f29 Make hole-to-hole report tag match constraint name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18040
2024-05-18 15:44:03 +01:00
Jon Evans 4f3117aea0 Altium: avoid crash when imported zone has no fill
Fix https://gitlab.com/kicad/code/kicad/-/issues/18025
2024-05-17 20:16:01 -04:00
Jeff Young af5ed5a118 Reset zone offsets when exporting footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17794
2024-05-17 21:28:30 +01:00
Jeff Young ea72beb2f7 Remove & then re-add undo items to parent group.
Removing the item from the board will also remove it
from any parent group, which then wasn't getting
restored.  This makes it more clear that we need to
remove and then re-add.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18017
2024-05-17 19:34:21 +01:00
Jon Evans 7f03666f96 Support LIB_ID queries in searchFootprints too
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18039


(cherry picked from commit fee0028ee9)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-17 17:57:42 +00:00
Jeff Young 25bb3f77fa Fix keep-upright algo for footprint text.
Also removes PCB_FIELDs from rotation centre calc in
footprint editor if there is other stuff selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16896
2024-05-17 18:34:44 +01:00
Alex Shvartzkop 0772739cf1 3D model export: Improve 3D layer placement calculation algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18035
2024-05-17 18:20:24 +03:00
Jon Evans 4c42f5dae0 Remove extra NeedRIGHT in textbox parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18033
2024-05-17 09:05:04 -04:00
Jeff Young 26906f383c Expose violation severity for co-located holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18028
2024-05-17 11:15:44 +01:00
Jeff Young c5162f5483 Fix PEGTL flagParam grammar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16393
2024-05-17 11:15:44 +01:00
John Beard 7e02f1254e Remember the bus unfold label orientation between invocations 2024-05-17 09:55:40 +08:00
Jon Evans 2836025402 Clear field listener when quitting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18016
2024-05-16 20:49:27 -04:00
Alex Shvartzkop fd438cb8e0 VRML to XCAFDoc reader is only available in OCCT 7.7.0+ 2024-05-16 22:52:19 +03:00
Alex Shvartzkop 8fd12d8b7e Allow reading VRML models for glTF export.
Note that some VRML 2.0 models fill fail until our patches are integrated into OCCT 7.9.0.
2024-05-16 21:57:48 +03:00
Seth Hillbrand 5e5741edd3 Minor optimizations
Most of the lines in KiCad are on 45° angles.  We can avoid sqrts by
recognizing that this implies the x/y values are the same.  Therefore,
the length of the hypotenuse is sqrt(2) * x.
2024-05-16 11:50:48 -07:00
Seth Hillbrand 9fbda137cb Free item memory when closing schematic window
This fires the dtor for each item on the screen, allowing us to properly
close and remove them from the connection graph

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17961
2024-05-16 09:59:10 -07:00
Seth Hillbrand f61ee3ff4b Remove unused code generation path
After 11 years, I doubt we're making this file format
2024-05-16 09:19:06 -07:00
Jeff Young f7bef5e09b Generalize EnhanceAttr() function.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17735
2024-05-16 16:28:13 +01:00
jean-pierre charras 87d3d38552 Eeschema, Pin helpers: fix wrong label orientation if the symbol is rotated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18012
2024-05-16 17:15:06 +02:00
Jeff Young ea013f3ca3 Fill device colour on foreground layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18002
2024-05-16 15:24:11 +01:00
Alex Shvartzkop 2179685dd2 STEP export: Use TDocStd_XLinkTool to copy model with colors instead of our DIY routine.
Now supports older OCCT versions.
Also puts components at a higher level in the hierarchy.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17549
2024-05-16 13:01:40 +03:00
Jeff Young a4583fdbc1 Separate out selection processing for dragging footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18010
2024-05-16 10:27:54 +01:00
dsa-t e2294a769a Revert "STEP export: Use TDocStd_XLinkTool to copy model with colors instead of our DIY routine."
This reverts commit f735c9bdc2
2024-05-15 22:55:19 +00:00
Jeff Young 98f4e60b90 Contour cache must be sensitive to size.
(While we scale the contours afterwards, font hint
data is size-sensitive so the contours are already
size-specific.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18014
2024-05-15 23:36:57 +01:00
Alex Shvartzkop f735c9bdc2 STEP export: Use TDocStd_XLinkTool to copy model with colors instead of our DIY routine.
Also puts components at a higher level in the hierarchy.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17549
2024-05-16 01:33:06 +03:00
jean-pierre charras f17b13655b DIALOG_SYMBOL_FIELDS_TABLE::syncBomPresetSelection(): fix not working comparison
for non English languages.

The main issue was the function compared a English string to a translated string.
However, even with this fix, the code, although working, is not very good:
It compare 2 members (BOM_PRESET .sortField string) that are not very significant
and can be or not translated.
2024-05-15 16:25:05 +02:00
Jeff Young 498d2c9db1 Lazily re-evaluate worst-clearance cache.
This prevents crashes when trying to re-evaluate
during destruction, etc. and is a cleaner solution
than trying to keep a flag updated.

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

Also implements proper threadlocking for the cache.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17950
2024-05-15 14:11:11 +01:00
Jeff Young e0e9321ea9 Consistency in command names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17314
2024-05-15 13:50:42 +01:00
Alex Shvartzkop 18fde2b9cb Fix background transparency option in kicad-cli pcb render.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17865
2024-05-15 14:46:53 +03:00
Jeff Young 20b2e11f21 Only toggle net selection when coming from hotkey.
(The context menu has separate commands for highlight
and clear highlight.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17709
2024-05-15 12:44:33 +01:00
Jeff Young 02bc093b55 Use consistent sorting for footprint libs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17731
2024-05-15 10:56:09 +01:00
Jeff Young 9e1330184c Patch another dynamic_cast-across-compile-unit-boundaries issue. 2024-05-15 10:55:51 +01:00
Jeff Young fa78c24a16 Formatting. 2024-05-15 10:55:51 +01:00
Jon Evans ea4ade7350 Fix broken setter 2024-05-14 23:13:31 -04:00
Jon Evans e16130a02c Move pad and via properties into PADSTACK 2024-05-14 20:57:56 -04:00
Jon Evans c800fb790d Start unifying padstack properties 2024-05-14 20:57:56 -04:00
Alex Shvartzkop 0e58f1bad4 Improve approximateLineChainWithArcs algorithm. 2024-05-14 18:07:53 +03:00
Alex Shvartzkop e71789bab0 Minor alignment fixes in Plot dialog and Common settings. 2024-05-14 17:44:16 +03:00
Wayne Stambaugh c3360d8c43 Fix Eagle schematic arc orientation and field visibility issues.
This does not fix all field visibility and position issues.  This is due
to LIB_SYMBOL objects not supporting per unit field properties.  The
current Eagle importer sets multiple unit symbol field properties to the
last unit parsed in the Eagle schematic file.  The upcoming two pass
importer will resolve this issue.
2024-05-14 10:13:08 -04:00
Alex Shvartzkop 798db3b5c7 Improve "Selected file contains multiple footprints" string. 2024-05-14 16:04:05 +03:00
Jeff Young 8aaca0509c More PEGTL tomfoolery. 2024-05-13 21:41:58 +01:00
Petri Hodju 4920c6b00b remove item from schematic's connection graph on destruction
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17961
2024-05-13 20:41:31 +00:00
Jeff Young 086e609c3d Reimplement bracedExpr and token lists for CPL models only.
This prevents the incompatibility between token lists
and single-token param-value pairs.
2024-05-13 21:28:24 +01:00
Jeff Young 2921d47fb3 Tighter control over braced-expression list separators. 2024-05-13 21:19:23 +01:00
Jeff Young 8bb807f170 Remove support for multiple token values for CPL models.
It breaks param lists which contain single-token params
(ie: those without the "=<value>" part).
2024-05-13 21:10:02 +01:00
Jeff Young 3e0c598500 Honour LAYER, SHEETNAME and SHEETPATH variable overrides on CLI.
Also allows the LAYER variable to work automatically
if you're plotting/exporting a single layer.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17680
2024-05-13 20:04:00 +01:00
Jeff Young c659b46d5e Formatting. 2024-05-13 19:21:20 +01:00
Jeff Young 255a7d6f06 ADDED: ability to remove ignored tests from ERC/DRC list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17681
2024-05-13 17:09:54 +01:00
Jeff Young b934914c59 Allow .ends to be preceeded by whitespace.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16560
2024-05-13 13:36:35 +01:00
jean-pierre charras cae3be6bac Fix minor compil warnings 2024-05-13 11:50:35 +02:00
Jeff Young d9a6b2aec2 Use display titles for axes in CSV output.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17324
2024-05-13 00:36:18 +01:00
Jeff Young 667fedd9a9 Formatting; include cleanup. 2024-05-12 23:56:59 +01:00
Jeff Young c8d1c1f1a4 Repair variable resolution recursion guard. 2024-05-12 23:47:44 +01:00
Jeff Young 662a6d24e7 Improve robustness. 2024-05-12 23:30:29 +01:00
Jeff Young 6cc534182a Simplify rotation code. 2024-05-12 23:22:13 +01:00
Jeff Young 20cde51b43 Fix numerous bugs in schematic item rotation.
(This will probably introduce some new ones too, but
it was so broken it's hard to know where to start.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17921
2024-05-12 20:43:08 +01:00
Jeff Young e73d2a32dc ADDED checkbox for saving SPICE digital event data.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17828
2024-05-12 18:24:53 +01:00
Jeff Young 0008991f02 Support multiple brace-expressions for CPL model lines.
(Nested brace-expressions, on the other hand, are *not*
an ngspice thing.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17824
2024-05-12 18:24:53 +01:00
Thomas Pointhuber a44c106f62 Migrate Altium pcblib test to BOOST_DATA_TEST_CASE and use FootprintNeedsUpdate for equality checking 2024-05-12 18:41:31 +02:00
Thomas Pointhuber 21b6b5efbb Do not rely on the existence of a BOARD* object in padNeedsUpdate
This allows us to use this check in unit-tests without a board attached
2024-05-12 18:30:49 +02:00
Thomas Pointhuber 3ade85bc8d Fix compilation error caused by trying to include boost/test/data/test_case.hpp by default 2024-05-12 17:29:40 +02:00
Thomas Pointhuber 0890594f75 Altium: migrate test_altium_parser_utils.cpp to use BOOST_DATA_TEST_CASE 2024-05-12 17:10:45 +02:00
Thomas Pointhuber 01892ab98f Altium: extend tests to handle new cases introduced with commit b7460f29b4 2024-05-12 17:01:30 +02:00
Thomas Pointhuber 4aca6ba294 Change test_altium_parser.cpp to use BOOST_DATA_TEST_CASE for parameterized tests 2024-05-12 16:58:25 +02:00
Mark Roszko 3a2b960f62 Update file doxygen.yml 2024-05-12 02:53:42 +00:00
Mark Roszko 03459723b3 Use our docker runner for doxygen
docker tag for shared gitlab runners was removed by gitlab
2024-05-12 01:09:26 +00:00
Jeff Young d9ff3c4485 Maintain selection when sorting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17983
2024-05-11 16:20:34 +01:00
Jeff Young 5ba4900170 Fix typo. 2024-05-11 13:01:43 +01:00
jean-pierre charras e51316a932 Fix a 100% CPU core usage is some editing cases.
In commit 7cb754dd a call to wxMilliSleep(50) was removed (because it created
lag in editing) but this removal created a 100% CPU core usage.
Using a much small sleep time (1ms) fixes these issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17979
2024-05-11 12:53:04 +02:00
jean-pierre charras 814e54af9b Fix minor compil warnings 2024-05-11 08:07:11 +02:00
Jeff Young 05ee635420 Implement mirror for groups.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17644
2024-05-10 21:44:15 +01:00
Jeff Young 29360b1aef Raw spice models don't have pin names. 2024-05-10 20:58:13 +01:00
Seth Hillbrand 6537f9fa15 Hookup footprint reload to redraw icon
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7195
2024-05-10 08:42:28 -07:00
Jeff Young a0a368f47b Fix bogus value field in spice test source. 2024-05-10 15:58:48 +01:00
Jeff Young d9f0c8e1f3 Remove accidentally committed lines. 2024-05-10 15:58:48 +01:00
jean-pierre charras 93bd2c73ff Gerbview: rename diff mode by forced opacity display mode and make opacity adjustable.
The diff mode (option in left toolbar) was never a differential display mode.
It is actually an option to force the alpha channel (opacity) of layer colors
to a given value.
So change the name and tool tips to force opacity mode, and make the opacity
parameter adjustable in preferences.

Gerbview: cleanup: remove a old and dead code.
2024-05-10 16:22:55 +02:00
Jeff Young 55b2c4dbf4 Update signals & measurements when netlist might have changed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17616
2024-05-10 12:02:56 +01:00
Jeff Young 737a4ce925 Don't double up ac and ph params.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-10 11:35:49 +01:00
Jeff Young a20a6e0787 Don't add duplicate SIM fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17970
2024-05-10 11:35:49 +01:00
Seth Hillbrand 7aa3892ba3 Move log into UNIX ifdef 2024-05-09 19:29:01 -07:00
Mark Roszko 695493fc3d Remove the kicad-vcpkg xz override 2024-05-10 01:42:24 +00:00
Seth Hillbrand 42ebf0eca5 Limit FSWatcher
Library watches only need a single directory or immediate children.  The
project watcher should have a sensible limit to the total number of
files it tries to track.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
2024-05-09 15:42:25 -07:00
jean-pierre charras 68c0be1097 Gerbview: cleanup: remove a old and dead code. 2024-05-09 17:54:05 +02:00
Wayne Stambaugh 7acd057c86 Fix broken library symbol links when importing CADSTAR schematics.
Under certain circumstances, the library symbol links were missing
the library nickname causing the schematic symbols to appear as if
the library symbol was missing.

Added a helper function to create the symbol library name to avoid
code duplication.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17143
2024-05-09 10:23:28 -04:00
Seth Hillbrand 3024a7c569 Add layer remapping ability to Altium imports
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17987
2024-05-08 15:36:33 -07:00
Seth Hillbrand 4218664d88 Cleanup on 2581 header 2024-05-08 15:36:33 -07:00
Alex Shvartzkop 81281f7e74 Send project path to ngspice for code model input files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16527

(cherry picked from commit eb7e781bec)
2024-05-08 23:41:05 +03:00
Jeff Young a99377c1ec The user can cancel the opening of many editors.
Don't play dice with the devil.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17989
2024-05-08 18:21:42 +01:00
Alex Shvartzkop dc8822b421 Don't hide symbol/footprint preview widgets on scroll. 2024-05-08 19:40:01 +03:00
Alex Shvartzkop 0f06d9c9e8 Fix arcs in legacy symbol libs. 2024-05-08 19:39:02 +03:00
Alex Shvartzkop 8d13e0ea78 Fix arcs in legacy symbol libs. 2024-05-08 18:25:54 +03:00
Alex Shvartzkop 1bde100ff7 Fix symbol field positions in legacy schematics. 2024-05-08 18:06:05 +03:00
Mike Williams 482cf659a7 IDFv3: control whether DNP/unspecified components are exported 2024-05-08 10:24:50 -04:00
Alex Shvartzkop d22d32697f Some fixes for legacy schematic/symbol import after symbol Y inversion. 2024-05-08 15:57:58 +03:00
Alex Shvartzkop 546b2e3b91 Fix text justification in Altium schematic importer. 2024-05-08 15:13:15 +03:00
Jeff Young 20bb82a011 Remove vestigial coord flip code. 2024-05-08 11:27:57 +01:00
Marek Roszko 25ebf99b9a Add note about armasm64 workaround 2024-05-07 21:36:49 -04:00
Seth Hillbrand 72eee002aa Add effective display for fields 2024-05-07 17:59:13 -07:00
Marek Roszko f87bd91d61 Move libeval to kicommon 2024-05-07 20:44:19 -04:00
Wayne Stambaugh f1e8495dc9 Fix QA DRC regression test issue. 2024-05-07 16:22:09 -04:00
JamesJCode 9e1a5eb1bd Eeschema: Only assign nets with resolved netclasses to the label map
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.
2024-05-07 20:16:17 +01:00
Mark Roszko d3f69a11f2 Add policy for CMAKE_MSVC_DEBUG_INFORMATION_FORMAT 2024-05-07 18:35:30 +00:00
Jon Evans e1f6d82a34 Fix lifetime of markers in DRCFalseNegativeRegressions 2024-05-07 12:21:06 -04:00
Maciej Suminski 67f717b56a Fix pin rotation parsing in the legacy symbol library plugin
Commit 352463df removes char values for PIN_ORIENTATION, so
magic_enum::enum_cast can no longer do its magic.
2024-05-07 15:39:43 +00:00
Mark Roszko 87ba1e18bf Prepend ccache as it should be first 2024-05-07 15:14:54 +00:00
Jeff Young 8aab764c33 Handle m_alternates in operator= and copy c'tor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17966
2024-05-07 15:07:33 +01:00
Jeff Young b425c54071 Default parameters for Python. 2024-05-07 14:45:57 +01:00
Mark Roszko ebbfaeaeb7 Alter the pdb mode for ccache 2024-05-07 13:24:11 +00:00
Mark Roszko eda65f5fa8 Fix ccache and distcc setup
RULE_LAUNCH_COMPILE is not meant for use. It's meant for internal ctest use only per the documentation.
2024-05-07 13:08:11 +00:00
Wayne Stambaugh 0402c03468 Do not test for effective annular width when it's already within limits. 2024-05-07 08:04:17 -04:00
Wayne Stambaugh a508f2e716 Fix false annular ring width DRC test failure.
The DRC annular ring width test failed to take into account that a pad
could be contained inside another pad having the same number (thermal
vias for example) which changes the effective annular width of the pad
contained within another pad.  A test was added to calculate the effective
annular ring width in this case.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17485
2024-05-07 08:04:17 -04:00
jean-pierre charras 59e34dcbec Fix a compil issue on Windows (missing closing brace) 2024-05-07 12:48:41 +02:00
Seth Hillbrand b9b19cb5fb Quiet the warnings when overloaded on file watches 2024-05-06 17:36:50 -07:00
Jon Evans 6c41354da5 DbLib: Prevent uncaught exception creating statement
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.


(cherry picked from commit ddd7c35586)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-06 21:00:13 +00:00
Jeff Young 8184ed64e7 Explicit control over hidden text in bounding boxes.
In particular, don't consider hidden text when plotting,
and only when AsItemCheckboxes is checked for printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17958
2024-05-06 21:36:19 +01:00
Seth Hillbrand 24f02e72d0 Fallback to scientific notation when fixed-point is long
Fixed point output can create arbitrarily long string representations of
floating points.  When this happens, we would like to just represent the
scientific notation to a limited precision

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17890
2024-05-06 13:00:27 -07:00
Seth Hillbrand 91f6c534b9 Subtract all holes in board area calc
When we say "Subtract holes from board area", we should also subtract
those holes in pads and vias

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17905
2024-05-06 12:41:15 -07:00
Seth Hillbrand c8375c151c Launch default URI handler if exists
Otherwise, handle as a normal file

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17902
2024-05-06 12:22:40 -07:00
Jeff Young 73681d08c5 Update names to match current nomenclature.
(Footprints now have PCB_FIELDs, not FP_TEXTs.)
2024-05-06 19:03:20 +01:00
Seth Hillbrand 3620887a22 Optionally use electrical type when shown.
We also need to consider electrical type as an exact hit when we are
showing it.  Otherwise, we get the pin added to our consideration list
but not selected without hitting close neighbors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183
2024-05-06 10:37:23 -07:00
Seth Hillbrand 5156229da7 Fixup previous edit 2024-05-06 10:36:07 -07:00
Seth Hillbrand 8a306eecb6 Cleanup libgit init calls 2024-05-06 10:18:38 -07:00
Seth Hillbrand ba5ad70b68 Add default rotation format 2024-05-06 10:00:19 -07:00
Seth Hillbrand cb71f2f207 Avoid arbitrary string limits
Placing a limit on the number of values that a field is allowed to hold
makes it blank when we set more than this number.  There's not a good
reason to limit the number of digits we allow at the field level (we
round to 4 decimal points in the backend)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17473
2024-05-06 09:59:36 -07:00
Mike Williams 1db236c7fd Legacy Libraries: fix Description field clobbering user field
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17943
2024-05-06 12:54:31 -04:00
Jeff Young 0f3d14df38 Add mirrored column to fields grid table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17956
2024-05-06 15:54:13 +01:00
Stefan 030a251090 Fix help for kicad-cli pcb export pos --side
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15815
2024-05-06 13:36:42 +00:00
dsa-t 05b2b3c26e Fix polygon fill flag in pcbnew graphics (SVG) importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17957


(cherry picked from commit 35c788a332)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-05-06 11:17:40 +00:00
Jeff Young 0e9b547f94 Don't leak output file path between projects.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17846
2024-05-06 11:28:02 +01:00
Jeff Young 39835fe82a Formatting. 2024-05-06 10:58:32 +01:00
jean-pierre charras f6d0e17c8b PCB_IO_KICAD_SEXPR_PARSER::parseEDA_TEXT(): ensure texts are not mirrored
When not specified as mirrored, texts must be not mirrored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17955
2024-05-06 10:53:39 +02:00
Alex Shvartzkop 5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Alex Shvartzkop 4ecca01392 Improve build times by not leaking <filesystem> everywhere. 2024-05-06 02:26:16 +03:00
Marek Roszko 03fa632526 Try and fix ifdef again 2024-05-05 18:51:51 -04:00
Seth Hillbrand a835ba0715 Add "Mechanical" pad property
Prevents mechanical support pads from being used to check pad types.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16747
2024-05-05 21:57:10 +00:00
Marek Roszko e0b0fb27b0 Fix compile errors 2024-05-05 17:44:44 -04:00
Jeff Young 2ad05e34ea Fix symbol editor drawing tool coord system. 2024-05-05 22:21:12 +01:00
Marek Roszko 8e40482451 Fix ifdefs 2024-05-05 16:06:19 -04:00
Marek Roszko a9e4b1c56a Throw "sysinfo" functions into kiplatform for windows. 2024-05-05 15:14:05 -04:00
Jeff Young 1290228fbf Don't modify radius when editing center.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17192
2024-05-05 19:58:01 +01:00
Alex Shvartzkop 5e14ae9698 Add OpenGL info to About. 2024-05-05 21:30:25 +03:00
JamesJCode 658eb1d338 Assert if NESTED_SETTINGS migration is missing for an intermediate version
- Fixes early load during NESTED_SETTINGS construction within
  SCHEMATIC_SETTINGS, now failing due to missing migrations at that
  object construction point
- Adds missing (NOOP) migration for NET_SETTINGS schema versions 1 -> 2
2024-05-05 19:12:01 +01:00
Jeff Young 89433afb47 Handle delete-table undo in Footprint Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17689
2024-05-05 19:08:16 +01:00
Jeff Young 62d4bd7c1d Exercise more care when comparing doubles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17249
2024-05-05 17:32:48 +01:00
Seth Hillbrand 5bd94f118d ADDED: Handle PIECHART in Altium import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16895
2024-05-05 08:39:30 -07:00
Seth Hillbrand 4c0fd6e791 Re-initialize conversion settings on failure
When the conversion fails, it may be the result of the settings values,
so reset them to their original values afterward

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17886
2024-05-05 07:45:30 -07:00
Seth Hillbrand 0476b6c72d Ensure irreflexive property in LIB_TREE_NODE 2024-05-05 07:33:00 -07:00
Jeff Young 0e0432d194 Don't abort on failure to backup file if it was never saved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17810
2024-05-05 14:58:23 +01:00
JamesJCode 39d9aba576 Don't stop migrating JSON_SETTINGS if intermediate migrator missing 2024-05-05 14:22:53 +01:00
Jeff Young 10aec91075 lint reduction 2024-05-05 12:55:38 +01:00
Jeff Young afcdfd85a7 Fix power symbol value field placement. 2024-05-04 23:49:43 +01:00
Jeff Young c2fae3768c Fix knock-on effects from b7f035964f.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17924
2024-05-04 23:49:43 +01:00
John Beard 4dd049ee8f Add action to focus tree searches
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
2024-05-05 04:18:36 +08:00
John Beard f73c190da8 Menu condition: distribute requires at least three items 2024-05-05 03:35:09 +08:00
John Beard fa7e842c8c Rework item distribution
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.

The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.

The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.

This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.

Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
2024-05-05 03:35:09 +08:00
Stefan ce32dfd077 Altium pcbimport: handle various dimension items, fix dimension_kind enum 2024-05-04 16:34:36 +00:00
Jon Evans 6b145b2830 Add optional reporting of non-KiCad design issues
Also add HTML reporter to PCB side to match schematic


(cherry picked from commit b8fa10ab2b)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-04 15:27:52 +00:00
Jeff Young 2d1bcbd222 Repair import of Altium arcs. 2024-05-04 15:47:43 +01:00
Jeff Young 8ec1016ccf Repair Altium importer for coord system change. 2024-05-04 14:19:12 +01:00
Thomas Pointhuber e82b8f6fda Fix small memleak in test_lib_part.cpp 2024-05-04 13:12:25 +02:00
Jeff Young 691c492d1e Revert attempted Altium import fix.
(Like Eagle, Altium's coord system is "upside down" to
start with.)
2024-05-04 11:16:44 +01:00
Jon Evans 0c835b7c30 Get rid of relative position in pad properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17246


(cherry picked from commit 09736ebf2c)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-04 03:32:29 +00:00
Jeff Young c998234dec Restore accidentally deleted text size constraint algo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17284
2024-05-03 22:12:34 +01:00
Jeff Young 65554943e0 lint reduction 2024-05-03 22:12:34 +01:00
Jon Evans 3351da9906 DbLib: Fill entire table if cache is empty when loading one part
The "already placed parts" feature causes a situation where many
single-part queries are placed before the cache is even filled.

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


(cherry picked from commit 3c99a3797e)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-03 21:04:13 +00:00
Jeff Young 94223ca794 Handle orientation when pasting footprint items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17518
2024-05-03 21:31:27 +01:00
Seth Hillbrand ba4974749c Fix renaming sheet check
If we are renaming a sheet that exists only once in the schematic, then
we don't need to warn about case sensitivity.  If the sheet exists
multiple times, we do.  We can't check this using SCREENS because the
screens don't maintain full state information about where they are used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17901
2024-05-03 13:23:03 -07:00
Jeff Young 44717f927c Fix rotation of selection in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17921
2024-05-03 21:14:26 +01:00
Seth Hillbrand 8463bd59b7 ADDED: Optional check for four way junctions
Defaults to off because this is likely contentious

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17870
2024-05-03 12:06:24 -07:00
Seth Hillbrand 2139789c4c Move ERC items to their own directory 2024-05-03 12:06:24 -07:00
Seth Hillbrand 71b020eb14 Special-case copy/paste of footprint fields on board
When editing the board, footprint fields _look_ like text items, so copy
and paste of these items should logically result in a text item, not a
footprint copy.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17937
2024-05-03 10:57:08 -07:00
Jeff Young eb13dec265 pruneItemLayers() is not the right place to filter refdes & value.
(And we already filter all mandatory fields in
pasteFootprintItemsToFootprintEditor() anyway.)

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17937
2024-05-03 18:38:32 +01:00
Seth Hillbrand e3d2f338de DRC: special case circles for annular width check
Circles only use one dimension and we tend to ignore the other in our UI
but it is kept and reflects the previous second dimensional value.  When
checking DRC, we should only be concerned with the single value used
unless the pad has two dimensions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17944
2024-05-03 10:07:02 -07:00
Jeff Young aeb029ea6e const& performance improvements. 2024-05-03 18:03:51 +01:00
Jeff Young 651cc5c838 Improve bounding hull error message.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17886
2024-05-03 18:03:51 +01:00
Seth Hillbrand b8ccaae403 Respect schematic settings for hidden pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17941
2024-05-03 09:58:33 -07:00
Jeff Young 053a764cf2 Adjust LTSPICE parser for inverted coords. 2024-05-03 17:48:22 +01:00
Jeff Young fd44ee6aa6 Adjust CADSTAR importer for coord system flip. 2024-05-03 17:43:11 +01:00
Jeff Young 893d178439 Formatting and minor const& performance enhancements. 2024-05-03 17:43:11 +01:00
Seth Hillbrand 13735050da Use StandardPrimitive library for vias
Some 2581 parsers don't like to consider UserPrimitive even though they
are essentially the same thing and required by the standard.  ¯\_(ツ)_/¯

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16661
2024-05-03 09:11:49 -07:00
Jon Evans eb0708d48d Fix broken cherry-pick 2024-05-03 11:49:58 -04:00
Jon Evans ac8bd587dc Fix deduplication of already-placed symbols
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.

(cherry picked from commit 2ef18ad4ca)
2024-05-03 11:47:21 -04:00
Jon Evans 639f59839e Make sure database library has updated pointer to library table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17903


(cherry picked from commit 1a76fce255)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-03 15:39:33 +00:00
Jeff Young 09c5b9df1d Fix some breakage in Altium parser due to Symbol Editor Y-axis inversion. 2024-05-03 14:52:50 +01:00
Jeff Young e7f4e29dd1 Eagle's coord system matched the old Symbol Editor.
So now we need to invert the Y axis for symbol items
(as well as all the schematic items which we have always done).
2024-05-03 14:48:06 +01:00
Jeff Young 6b0a20eac0 Mostly formatting, but also include shapes with nets when selecting connection. 2024-05-03 13:31:15 +01:00
Jeff Young 3781682a89 We don't need to flip Y of fields anymore. 2024-05-03 13:31:15 +01:00
Jeff Young ce1404df79 Formatting and performance.
(wxString construction is surprisingly expensive.)
2024-05-03 13:31:15 +01:00
Mark Roszko f00a1ab517 Use the new kmb toolchain file for vars 2024-05-03 02:11:54 +00:00
Jeff Young 9f87598772 Fix copy-pasta. 2024-05-03 00:09:38 +01:00
Alex Shvartzkop b5b65d0846 Fix some breakage due to symbol Y axis inversion in EasyEDA parsers. 2024-05-03 01:44:50 +03:00
Marek Roszko 1a1be2d542 Update vcpkg wxpython 2024-05-02 18:31:33 -04:00
Marek Roszko cb81de5a74 Add updated tooltips on update dialog 2024-05-02 18:30:54 -04:00
Seth Hillbrand 022dce2d1b Fix out of bounds access opportunity 2024-05-02 15:12:43 -07:00
Alex Shvartzkop 2a889f03fc EasyEDA Std/Pro: import (some) component metadata for symbols.
Also fixes Reference numbering.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17806
2024-05-03 00:37:59 +03:00
Seth Hillbrand ae610bbe85 ADDED: Reset option for Library tables
This re-shows the option to reset the global library table to its
default, empty or specified state

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2309
2024-05-02 21:31:59 +00:00
Steven A. Falco f8c8dcde13 The upcoming Fedora 41 will use python 3.13
The Fedora folks are currently working on updating python to version
3.13 in Fedora 41.
2024-05-02 20:50:05 +00:00
Seth Hillbrand 60f59ae851 Keep FP chooser on top of KiCad but not system
We don't need to float the window over other programs, so setting to
parental floating keeps it focused just the right amount

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16840
2024-05-02 13:12:00 -07:00
Seth Hillbrand b649932dbf Re-allow moving footprint text
This is a temporary solution until we modify loading to convert existing
text to fields

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17899
2024-05-02 13:00:17 -07:00
Seth Hillbrand b0c9df3ff4 Update QA mock for new PCB_SELECTION 2024-05-02 12:49:56 -07:00
Seth Hillbrand b211625e53 Remove faulty tooltip
Copy-pasta error

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17927
2024-05-02 12:45:49 -07:00
Seth Hillbrand 5bede7bddb Update QA to reflect current correct output
Previously, (v7), the NPTH had a too-large clearance.  This affected the
fill so that there was no island.  In v8, at some point, NPTH had zero
clearance, which was definitely incorrect but also did not create an
island.

Correcting this to have the appropriate clearance between copper and
NPTH results in one almost island that has a neck and is appropriately
caught by the copper connection check.
2024-05-02 12:16:05 -07:00
Seth Hillbrand 416033e8e5 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
2024-05-02 10:57:25 -07:00
Thomas Gambier 1882445b40 Add syntax check for duplicate 'layer' keyword 2024-05-02 04:51:48 +00:00
Jon Evans a95a3fa5c9 Altium: apply power filter to symbol libraries
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17922
2024-05-01 22:47:45 -04:00
Jon Evans d6a54a98b2 Support ortho dragging labels off sheet pins 2024-05-01 21:53:22 -04:00
Jon Evans dffb2c1994 Pin helpers can help sheet pins also
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17923
2024-05-01 21:53:14 -04:00
Marek Roszko 62936b7e01 Remove the disabling of UseNativeColHeader now that we fixed our wx fork 2024-05-01 20:56:27 -04:00
Seth Hillbrand cd74ebe9cc Fix extra tokens 2024-05-01 12:22:42 -07:00
Jeff Young 9a6efd43e1 Don't assume that a SMD pad has copper layers. 2024-05-01 18:16:09 +01:00
John Beard 1280b3d379 Add bash completion for kicad-cli, kicad, pcbnew, eeschema 2024-05-01 23:33:29 +08:00
John Beard 129c61a742 SELECTION::GetItemsSortedByTypeAndXY - minor tweaks
Simplify a little by keeping the positions of A and B in
variables.

Also remove const when returning by value - all that does is
inhibit a (possible, NRVO) move if you assign the result to
a non-const vector.
2024-05-01 23:33:25 +08:00
John Beard 2f3196c18c Fix docset generation 2024-05-01 23:31:21 +08:00
Jeff Young 678a64f97c Update auto-generated file. 2024-05-01 14:42:37 +01:00
Jeff Young 6b797420d5 ADDED allow physical_clearance between courtyards & zone fills.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6966
2024-05-01 13:49:41 +01:00
Jeff Young 58ddffe3dd Improve consistency in free-via ambiguity tests.
Also removes a magic number.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17671
2024-05-01 10:24:34 +01:00
Marek Roszko aaf776db9e Point BEGIN_EVENT_TABLE at the correct base class, fix current lang indication
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17825
2024-04-30 22:47:53 -04:00
Jon Evans e973c15087 Move ALTIUM_PCB to use REPORTER for logging
Change not-yet-supported messages to debug level
2024-04-30 21:21:48 -04:00
Seth Hillbrand 339cf3f2e2 Fix simplify routine for last segment
The last segment of a track could be removed when the iterator does not
correctly loop.  Keeping the ll within bounds and checking for
equivalency instead of comparison works for last point
2024-04-30 16:11:20 -07:00
JamesJ d92db68597 Fix corner editing for schematic rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17909
2024-04-30 16:58:14 +00:00
jean-pierre charras 966051ff4a DIALOG_EXPORT_2581:fix incorrect size of widgets when a very long field name exists
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17911
2024-04-30 18:16:05 +02:00
Rosy 17891f7a1d HTTP Libraries: Add support for descriptions of sublibraries 2024-04-30 11:57:00 +00:00
Stefan 7ed755ac61 Handle piechart case for Altium lib import
This doesn't parse the data but it will let the user know what wasn't properly parsed.
2024-04-30 03:07:14 +00:00
Marek Roszko 2f0ff4e557 Update sentry-native to 0.7.2 2024-04-29 22:05:05 -04:00
Seth Hillbrand 7fdb5e98a2 ADDED: Polygon simplify
Simplifies the polygon for graphical shape, zones and rule areas,
removing duplicate points and making the outline easier to handle

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17883
2024-04-29 17:48:32 -07:00
Seth Hillbrand 8b5564629a Optimize TestSegmentHitFast
Check for co-linear points (common occurence) before using expensive
EuclideanNorm
2024-04-29 17:48:32 -07:00
Seth Hillbrand 9e83a7bcb3 Update SHAPE_LINE_CHAIN::Simplify to better handle small diff
When simplifying, a small difference in successive points would allow a
larger difference than aMaxError to be removed.  This change checks the
intermediate points during removal to ensure we don't get overzelous
2024-04-29 17:48:32 -07:00
dsa-t 10c0bba9cc Fix internal simulation errors when using some IBIS models.
Usage of GC_PWR0 looked like a copy/paste.

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


(cherry picked from commit cff58bae7f)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-29 20:24:58 +00:00
Jeff Young 85a9d9e9ec Don't push commit in DIALOG_TABLE_PROPERTIES if table is new.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17688
2024-04-29 17:10:29 +01:00
jean-pierre charras 15e5eabb91 DIALOG_ZONE_MANAGER: refresh zone display when resizing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17892
2024-04-29 13:44:28 +02:00
Jeff Young e5a17b96a3 Fix more bugs from collapsing LIB_* to SCH_*.
The transform can always be used: it will be the identiy
transform when in the schematic.

Also fixes a bug where textbox borders didn't get
plotted, and a couple others where things were still
expecting an upside-down coordinate system.
2024-04-29 12:19:13 +01:00
Marek Roszko 3d56494652 Add weirdly missing header for msvc 2024-04-28 22:22:24 -04:00
Marek Roszko 9ffa5db667 Delete m_locale in the pgm_base destructor instead of manual destroy method
We need the object in m_locale for a bit more things during program cleanup,
especially on macOS

The destructor of PGM_BASE is sufficient allowance of lifetime.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17369
2024-04-28 22:15:37 -04:00
Alex Shvartzkop 4a60c3b71e 3D viewer: apply OCC colors in order: XCAFDoc_ColorSurf > XCAFDoc_ColorCurv > XCAFDoc_ColorGen
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14906

(cherry picked from commit f15551a6b5)
2024-04-29 01:27:03 +03:00
Jeff Young 43e6006306 Separate Compare Footprints from DRC.
(We want to ignore some of the flags for DRC.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17819
2024-04-28 23:05:54 +01:00
Jeff Young b5fb7b7ace Get rid of Export Symbol.
It can be done with the "New Library" button when doing
a Save copy as (which doesn't lead the user down the
wrong path as Export Symbol can).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17840
2024-04-28 22:05:59 +01:00
Jeff Young a5bd97da11 Improve clarity of Visibility setting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17843
2024-04-28 21:57:55 +01:00
Alex Shvartzkop 7d37cebfdf Fix orientations of some footprint STEP models.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17631
2024-04-28 23:11:26 +03:00
Jeff Young b12043a612 Separate fields from text for boundingBoxes & hit-testing.
We used to have special cases to keep fields from bloating
a footprint's bounding box or being used for hit-testing.
However, now that we can distinguish PCB_FIELD_T from
PCB_TEXT_T, we should not apply these special cases to
PCB_TEXT_T.  Text in footprints should act like graphics.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17854
2024-04-28 18:47:11 +01:00
JamesJ 6c5ac9e269 Check in fbp file for netclass setup panel
Was not added to commit 5f4c7a5
2024-04-28 18:18:42 +01:00
Jeff Young c45c80f083 Fix clang includes. 2024-04-28 16:00:54 +01:00
Jeff Young 352463dfeb Fix pin drawing after removal of upside-down coords. 2024-04-28 15:24:19 +01:00
Jeff Young 67737ea0b2 Restore view_controls include for clang. 2024-04-28 14:03:45 +01:00
Jeff Young a24eada8b1 Cleanup. 2024-04-28 13:52:41 +01:00
Jeff Young 1db8b322da Make pin name/number visibility architecture more clear. 2024-04-28 13:23:24 +01:00
Alex Shvartzkop 6fdeca7c56 Fix build on Linux. 2024-04-28 02:06:12 +03:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
dsa-t 16f3237983 QA: update Altium footprint library golden file.
(cherry picked from commit dd2f15c96d)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-04-27 20:35:00 +00:00
Alex Shvartzkop 11ba59b690 Altium PCB import: pad thermal spoke angle is 90 deg by default. 2024-04-27 20:25:50 +03:00
Marek Roszko a565db58c5 Hackfix crash in configure paths using non-ascii chars in column headers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17743
2024-04-27 10:16:37 -04:00
Jeff Young d8d816236c Save project settings after Schematic Setup.
This prevents data from getting lost if we later crash.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17859
2024-04-27 14:50:47 +01:00
Alex Shvartzkop e26778c599 Require Wayland 1.20 libraries.
KiCad doesn't build with older versions due to missing definitions.
2024-04-27 16:48:49 +03:00
Jeff Young c59ed0bbb7 Flip symbol editor's Y axis to match other editors. 2024-04-27 13:47:56 +01:00
Jeff Young 3b3de58e5e Make sure color settings are saved when modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17864
2024-04-27 13:30:45 +01:00
Jeff Young e478c4db2e Allow resetting of pin visibility overrides.
Also fixes a bug where the .fbp file didn't get checked
in for the "Reset custom power symbols" checkbox addition.

Also adds disabled checkboxes to act as hints for what
is always updated.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17868
2024-04-27 13:30:45 +01:00
Seth Hillbrand 4ad48c79dd Update translations 2024-04-26 19:51:48 -07:00
CloverGit cba8c95c83 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-04-27 04:50:39 +02:00
Tokita, Hiroshi dda71df996 Translated using Weblate (Japanese)
Currently translated at 97.3% (9127 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
2tama3 1edc1e163e Translated using Weblate (Japanese)
Currently translated at 97.3% (9126 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
Ulices 65b1371e5d Translated using Weblate (Spanish (Mexico))
Currently translated at 96.8% (9082 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2024-04-27 04:50:39 +02:00
Tokita, Hiroshi 958d8a0327 Translated using Weblate (Japanese)
Currently translated at 97.3% (9126 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
Yutaro Urata2 8fb550893d Translated using Weblate (Japanese)
Currently translated at 97.3% (9126 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
co8 j df61c99b74 Translated using Weblate (Japanese)
Currently translated at 97.3% (9126 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
CloverGit 8a6c4887fe Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-04-27 04:50:39 +02:00
Henrik Kauhanen 6b63c3bf8c Translated using Weblate (Swedish)
Currently translated at 99.9% (9372 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-04-27 04:50:39 +02:00
Tokita, Hiroshi a556ec328a Translated using Weblate (Japanese)
Currently translated at 97.0% (9099 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:39 +02:00
Henrik Kauhanen 5f0982a345 Translated using Weblate (Finnish)
Currently translated at 98.4% (9226 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2024-04-27 04:50:39 +02:00
Jan Straka 4da1dd67eb Translated using Weblate (Czech)
Currently translated at 78.4% (7360 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2024-04-27 04:50:38 +02:00
Pferd O 7acc21e397 Translated using Weblate (German)
Currently translated at 99.9% (9374 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-04-27 04:50:38 +02:00
Nicoara Alex 5888292e42 Translated using Weblate (Romanian)
Currently translated at 26.2% (2462 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ro/
2024-04-27 04:50:38 +02:00
CloverGit d6fad425c3 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-04-27 04:50:38 +02:00
dsa-t 7583f305fc Translated using Weblate (Russian)
Currently translated at 96.8% (9081 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-04-27 04:50:38 +02:00
ZbeeGin 9f8de0df01 Translated using Weblate (Polish)
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-04-27 04:50:38 +02:00
Laurens Holst edb5d5df47 Translated using Weblate (Dutch)
Currently translated at 99.6% (9343 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nl/
2024-04-27 04:50:38 +02:00
taotieren 9dcd1c7d64 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2024-04-27 04:50:38 +02:00
taotieren b63fab46b4 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (9376 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-04-27 04:50:38 +02:00
ZbeeGin 0f5c561afd Translated using Weblate (Polish)
Currently translated at 99.2% (9305 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2024-04-27 04:50:38 +02:00
Pferd O 86e0315feb Translated using Weblate (German)
Currently translated at 99.7% (9351 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-04-27 04:50:38 +02:00
Henrik Kauhanen ec83776256 Translated using Weblate (Swedish)
Currently translated at 98.5% (9236 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2024-04-27 04:50:38 +02:00
Tokita, Hiroshi 2e5a6123bb Translated using Weblate (Japanese)
Currently translated at 96.9% (9086 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:37 +02:00
Pferd O a8ca5d8e19 Translated using Weblate (German)
Currently translated at 99.2% (9308 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-04-27 04:50:37 +02:00
CloverGit 43feb1d2fd Translated using Weblate (Chinese (Simplified))
Currently translated at 99.9% (9369 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2024-04-27 04:50:37 +02:00
dsa-t 94894b1e30 Translated using Weblate (Russian)
Currently translated at 96.8% (9080 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2024-04-27 04:50:37 +02:00
Pferd O d8ec8bd506 Translated using Weblate (German)
Currently translated at 99.0% (9287 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2024-04-27 04:50:37 +02:00
Wellington Terumi Uemura 3e21d887c1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 99.5% (9331 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2024-04-27 04:50:37 +02:00
Tokita, Hiroshi 7caa9eb9da Translated using Weblate (Japanese)
Currently translated at 96.7% (9067 of 9376 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2024-04-27 04:50:37 +02:00
Jeff Young 615f84e567 SCH_PINs define their own sorting order.
Don't use SCH_ITEM's compare function.

This is required so that SCH_PINs sort in the same
order as their LIB_PIN equivalents in the library.
2024-04-26 23:10:19 +01:00
Jeff Young 02c1eef3be Simplify parsing of alt pin definitions. 2024-04-26 20:11:33 +01:00
Jeff Young 9be60cb45d Gracefully handle DNP & Excl-from-brd components in nets list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17146
2024-04-26 20:11:33 +01:00
Alex Shvartzkop 4596a11da2 Raytracing 3D renderer: don't reflect sky background when reflections are on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17690
2024-04-26 16:01:36 +03:00
Alex Shvartzkop b3bc352c57 Use default stackup if stackup is not defined in STEP/BREP/XAO export. 2024-04-26 15:25:48 +03:00
Alex Shvartzkop 01ce6111ff Fix warning. 2024-04-26 15:25:48 +03:00
jean-pierre charras 28f48cbec1 Eeschema: fix issues related to ERC tests after changes by commit d77eae3e
It also fixes a bug in SCH_FIELD::compare()
2024-04-26 07:23:07 +02:00
Marek Roszko b22bc2737e Hackfix macOS to keep erc/drc on top
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14356
2024-04-26 00:49:22 -04:00
Marek Roszko 60d5780c1c Fix win32 proxy parsing when the old IE options for scheme based configuration was set
If you uncheck in the old IE options "Use the same proxy server for all protocols", then it returns an annoying string
like http=blah:1232;https=blah:1232;ftp=blah:2321 which we have to parse.
2024-04-25 21:24:58 -04:00
Alex Shvartzkop c8db8d087e Remove debug line. 2024-04-26 02:40:22 +03:00
Alex Shvartzkop 9e673bb891 Polyfill GetOneShape from OCCT. 2024-04-26 02:36:17 +03:00
Alex Shvartzkop 1ae9e9b676 ADDED: XAO export for SALOME / Gmsh workflows.
Pad surfaces are assigned as face groups.
2024-04-26 01:53:43 +03:00
Alex Shvartzkop 22c4fa29f1 STEP/BREP export: expose Net Filter option in the UI. 2024-04-25 21:10:34 +03:00
Seth Hillbrand ef62b01dd1 Make import/export flags explicit
IO plugins can import/export or both.  This sets an explicit boolean for
controlling which options are available.
2024-04-25 09:21:15 -07:00
Seth Hillbrand eeee63186d Don't list IPC-2581 import
We don't currently support importing 2581 files.  We need to clear
IO_FILE_DESC to prevent this from accidentally showing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17866
2024-04-25 09:02:38 -07:00
James J be8744176c Add SCH_RULE_AREA shapes to eeschema
Includes:
 - Fix GAL to draw closed polygons in eeschema
 - Add functionality to eeschema to draw arbitary polygons
 - Update polygon item previews to have customisable edge colour
 - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
 - Add SCH_RULE_AREA to paint and plot methods
 - Add new rule area color preference to themes
2024-04-25 14:24:46 +00:00
Alex Shvartzkop da1926d723 STEP/BREP export: ensure pad surface is a separate face.
Useful for FEM simulation.
2024-04-25 15:34:52 +03:00
Ethan Chien d058e12cb5 Fix: Unable to select other items after syncing hierarchical sheet pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17800
2024-04-25 10:49:07 +00:00
Jeff Young cd64630661 Remember shown columns in netclass setup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17852
2024-04-25 08:34:36 +01:00
Rosy 0984af1676 HTTP library reload cache, if the cache is empty, when picking a part
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17569
2024-04-25 00:42:13 +00:00
RosyDev 058b337b00 HTTP library users will now see the generic fields in the components' properties in the correct order as submitted by the API.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17584
2024-04-25 00:23:51 +00:00
Seth Hillbrand 315ad0e071 Replace stale pin references with UNDO copy
When we replace a symbol with one that has fewer pins, the old pins
are released, which leaves points to them in the connection graph
dangling.  This updates the pointer to use the cloned copy in the undo
stack until the connection graph is rebuilt with the new data

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17851
2024-04-24 12:55:02 -07:00
Alex Shvartzkop 5f81e01f43 ADDED: --net-filter option to STEP/BREP export CLI. 2024-04-24 18:28:53 +03:00
Wayne Stambaugh 33869dbb61 Symbol chooser dialog layout improvements. 2024-04-24 11:08:04 -04:00
Miklós Márton 61be2ea048 eeschema: Add option for renaming sheets in the Hierarchy tree view 2024-04-24 12:36:34 +00:00
Wayne Stambaugh 8a1347d2c8 Property grid navigation improvements.
* Do not handle tab key event when committing property changes so the
  property grid tab navigation works correctly.
* Do not call commit property changes on tab key when no changes are
  pending.
* Skip event handling in the base object value change and changing event
  handlers in case they do not get overloaded in derived objects.
* Do not force focus to canvas on property change so arrow and tab key
  grid navigation work properly.  Forcing the user to click the property
  grid control to edit a single property doesn't make sense.
* Pass properties panel show event up the event stack.
* Do not set focus to canvas in tool dispatcher if it already has the
  focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16957
2024-04-24 07:25:19 -04:00
Jeff Young 978ef352d0 Support legacy Length Tuning Settings workflow.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17748
2024-04-24 10:51:25 +01:00
Marek Roszko a8972f54c4 Put idf tools behind a cmake flag that can be turned off 2024-04-23 22:43:10 -04:00
Seth Hillbrand 0cd3e17db7 Ensure that missing pins are added to extraction
When changing from a larger part to a smaller part, the previously
existing pins may be removed from the screen but still linked to
elements in the connection graph because we don't set them dirty unless
the changed element overlaps

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17851
2024-04-23 19:37:27 -07:00
Alex Shvartzkop 1c1bdb4f4a Make mold slightly happier. 2024-04-24 00:43:06 +03:00
Alex Shvartzkop 045f65608a Add VECTOR2L to Swig. 2024-04-23 23:37:45 +03:00
Alex Shvartzkop cf6d30706b More clang build fixes. 2024-04-23 21:50:22 +03:00
Alex Shvartzkop 124b511037 Fix build on clang. 2024-04-23 21:44:55 +03:00
Seth Hillbrand fc93c63a19 Revert "Remove trailing zeros from all values"
This reverts commit abd0388794.
2024-04-23 11:08:14 -07:00
Alex Shvartzkop b1180d9377 Fix some warnings. 2024-04-23 16:34:07 +00:00
Alex Shvartzkop 865e3a9f3c Improvements when working closer to 32-bit integer limits.
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
2024-04-23 16:34:07 +00:00
Alex Shvartzkop 3f32f0c2d8 STEP/BREP export: approximate zone polygons with arcs.
- Speeds up processing significantly
- STEP file size reduction to 30%
2024-04-23 19:25:23 +03:00
Alex Shvartzkop 5e70883ef6 Add self-intersection check algo for arcs in SHAPE_LINE_CHAIN. 2024-04-23 19:25:23 +03:00
Alex Shvartzkop fcdaa4a59e Cache center point and radius along with BBox in SHAPE_ARC. 2024-04-23 19:25:23 +03:00
Jeff Young 9dab855f8d Layer column should be shown by default, not italic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17758
2024-04-22 17:48:21 +01:00
Jeff Young 53a9bdb3af Formatting. 2024-04-22 17:44:59 +01:00
Jeff Young f51d227dc7 Default to target lib when no lib tree sel exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17808
2024-04-22 17:36:38 +01:00
1651 changed files with 381151 additions and 317918 deletions
-2
View File
@@ -17,8 +17,6 @@ include/fp_lib_table_lexer.h
include/lib_table_lexer.h
include/netlist_lexer.h
include/page_layout_reader_lexer.h
eeschema/cmp_library_lexer.h
eeschema/cmp_library_keywords.*
eeschema/dialogs/dialog_bom_cfg_keywords.cpp
eeschema/dialogs/dialog_bom_cfg_lexer.h
common/template_fieldnames_keywords.cpp
+1 -1
View File
@@ -6,7 +6,7 @@ build_doxygen_docker:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB_NAME == "doxygen"
tags:
- docker
- gitlab-org-docker
before_script:
- docker info
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
+1 -19
View File
@@ -15,25 +15,7 @@ macos_build:
- cd build/macos
- cmake
-G Ninja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DDEFAULT_INSTALL_PATH=/Library/Application\ Support /kicad
-DOCC_INCLUDE_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/include/opencascade
-DOCC_LIBRARY_DIR=/opt/homebrew/Cellar/opencascade/7.7.2_2/Lib
-DCMAKE_INSTALL_PREFIX=/Users/ci/kicad-mac-builder/build/kicad-dest
-DCMAKE_C_COMPILER=/usr/bin/clang
-DCMAKE_CXX_COMPILER=/usr/bin/clang++
-DwxWidgets_CONFIG_EXECUTABLE=/Users/ci/kicad-mac-builder/build/wxwidgets-dest/bin/wx-config
-DKICAD_BUILD_I18N=ON
-DKICAD_SCRIPTING_WXPYTHON=ON
-DKICAD_BUILD_PNS_DEBUG_TOOL=ON
-DPYTHON_EXECUTABLE=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/bin/python3
-DPYTHON_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/include/python3.9/
-DPYTHON_LIBRARY=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/libpython3.9.dylib
-DPYTHON_SITE_PACKAGE_PATH=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework/Versions/Current/lib/python3.9/site-packages
-DPYTHON_FRAMEWORK=/Users/ci/kicad-mac-builder/build/python-dest/Library/Frameworks/Python.framework
-DNGSPICE_INCLUDE_DIR=/Users/ci/kicad-mac-builder/build/ngspice-dest/include
-DNGSPICE_LIBRARY=/Users/ci/kicad-mac-builder/build/ngspice-dest/lib/libngspice.dylib
-DKICAD_USE_3DCONNEXION=ON
-DCMAKE_TOOLCHAIN_FILE=/Users/ci/kicad-mac-builder/toolchain/kicad-mac-builder.cmake
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
+1 -1
View File
@@ -18,7 +18,7 @@
stage: test
when: on_success
variables:
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,warning'
BOOST_TEST_LOGGER: 'JUNIT,warning,test_results.${TEST}.xml:HRF,message'
CTEST_OUTPUT_ON_FAILURE: 1
script:
- cd build/linux/qa
+3 -3
View File
@@ -236,7 +236,7 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
char const* cp = pp->GetFileFilter( i );
if( cp )
addFilterString( wxString::FromUTF8Unchecked( cp ) );
addFilterString( cp );
}
addExtensionMap( pp );
@@ -328,7 +328,7 @@ void S3D_PLUGIN_MANAGER::checkPluginName( const wxString& aPath,
++bl;
}
// prevent loading non-plugin dlls
// prevent loading non-plugin dlls
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
if( !path.GetName().StartsWith( "s3d_plugin" )
@@ -416,7 +416,7 @@ void S3D_PLUGIN_MANAGER::addExtensionMap( KICAD_PLUGIN_LDR_3D* aPlugin )
wxString ws;
if( cp )
ws = wxString::FromUTF8Unchecked( cp );
ws = wxString( cp );
if( !ws.empty() )
{
+1 -1
View File
@@ -476,7 +476,7 @@ SGVECTOR S3D::CalcTriNorm( const SGPOINT& p1, const SGPOINT& p2, const SGPOINT&
// normal
tri = glm::cross( pts[1] - pts[0], pts[2] - pts[0] );
glm::normalize( tri );
(void)glm::normalize( tri );
return SGVECTOR( tri.x, tri.y, tri.z );
}
+7 -1
View File
@@ -344,7 +344,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
BOX2I bbbox;
if( m_board )
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline );
bbbox = m_board->ComputeBoundingBox( !m_board->IsFootprintHolder() && haveOutline, false );
// Gives a non null size to avoid issues in zoom / scale calculations
if( ( bbbox.GetWidth() == 0 ) && ( bbbox.GetHeight() == 0 ) )
@@ -698,6 +698,10 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
}
colors[ LAYER_3D_COPPER_BOTTOM ] = colors[ LAYER_3D_COPPER_TOP ];
for( const auto& [layer, val] : m_ColorOverrides )
colors[layer] = val;
return colors;
}
@@ -708,6 +712,8 @@ void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
for( const auto& [ layer, color ] : aColors )
settings->SetColor( layer, color );
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
}
+2
View File
@@ -430,6 +430,8 @@ public:
SFVEC4F m_ECO1Color;
SFVEC4F m_ECO2Color;
std::map<int, COLOR4D> m_ColorOverrides; ///< allows to override color scheme colors
private:
BOARD* m_board;
S3D_CACHE* m_3dModelManager;
@@ -34,6 +34,7 @@
#include "../3d_rendering/raytracing/shapes2D/round_segment_2d.h"
#include "../3d_rendering/raytracing/shapes2D/triangle_2d.h"
#include <board_adapter.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
+7 -4
View File
@@ -36,6 +36,7 @@
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
#include "raytracing/shapes2D/triangle_2d.h"
#include <board_design_settings.h>
#include <board.h>
#include <footprint.h>
#include <pad.h>
#include <pcb_text.h>
@@ -874,14 +875,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
// Add via tech layers
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
if( ( layer == F_Mask || layer == B_Mask ) )
{
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
for( PCB_TRACK* track : m_board->Tracks() )
{
if( track->Type() == PCB_VIA_T
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
{
createViaWithMargin( track, layerContainer, maskExpansion );
}
@@ -965,14 +967,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
// NON-TENTED VIAS
if( ( layer == F_Mask || layer == B_Mask ) && !m_board->GetTentVias() )
if( ( layer == F_Mask || layer == B_Mask ) )
{
int maskExpansion = GetBoard()->GetDesignSettings().m_SolderMaskExpansion;
for( PCB_TRACK* track : m_board->Tracks() )
{
if( track->Type() == PCB_VIA_T
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
{
track->TransformShapeToPolygon( *layerPoly, layer, maskExpansion, maxError,
ERROR_INSIDE );
+82
View File
@@ -33,6 +33,7 @@
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <3d_viewer_id.h>
#include <advanced_config.h>
#include <build_version.h>
#include <board.h>
#include <reporter.h>
#include <gal/opengl/gl_context_mgr.h>
@@ -72,6 +73,11 @@ BEGIN_EVENT_TABLE( EDA_3D_CANVAS, HIDPI_GL_3D_CANVAS )
EVT_MOTION( EDA_3D_CANVAS::OnMouseMove )
EVT_MAGNIFY( EDA_3D_CANVAS::OnMagnify )
// touch gesture events
EVT_GESTURE_ZOOM( wxID_ANY, EDA_3D_CANVAS::OnZoomGesture )
EVT_GESTURE_PAN( wxID_ANY, EDA_3D_CANVAS::OnPanGesture )
EVT_GESTURE_ROTATE( wxID_ANY, EDA_3D_CANVAS::OnRotateGesture )
// other events
EVT_ERASE_BACKGROUND( EDA_3D_CANVAS::OnEraseBackground )
EVT_CUSTOM(wxEVT_REFRESH_CUSTOM_COMMAND, ID_CUSTOM_EVENT_1, EDA_3D_CANVAS::OnRefreshRequest )
@@ -143,6 +149,10 @@ EDA_3D_CANVAS::EDA_3D_CANVAS( wxWindow* aParent, const wxGLAttributes& aGLAttrib
wxASSERT( a3DCachePointer != nullptr );
m_boardAdapter.Set3dCacheManager( a3DCachePointer );
#ifdef __WXMSW__
EnableTouchEvents( wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES | wxTOUCH_ROTATE_GESTURE );
#endif
const wxEventType events[] =
{
// Binding both EVT_CHAR and EVT_CHAR_HOOK ensures that all key events,
@@ -229,6 +239,9 @@ bool EDA_3D_CANVAS::initializeOpenGL()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
wxString version = From_UTF8( (char *) glGetString( GL_VERSION ) );
wxLogTrace( m_logTrace, wxT( "EDA_3D_CANVAS::%s OpenGL version string %s." ),
@@ -627,6 +640,75 @@ void EDA_3D_CANVAS::OnMagnify( wxMouseEvent& event )
}
void EDA_3D_CANVAS::OnZoomGesture( wxZoomGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
{
m_gestureLastZoomFactor = 1.0;
m_camera.SetCurMousePosition( aEvent.GetPosition() );
}
if( m_camera_is_moving )
return;
restart_editingTimeOut_Timer();
m_camera.Pan( aEvent.GetPosition() );
m_camera.SetCurMousePosition( aEvent.GetPosition() );
m_camera.Zoom( aEvent.GetZoomFactor() / m_gestureLastZoomFactor );
m_gestureLastZoomFactor = aEvent.GetZoomFactor();
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnPanGesture( wxPanGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
m_camera.SetCurMousePosition( aEvent.GetPosition() );
if( m_camera_is_moving )
return;
m_camera.Pan( aEvent.GetPosition() );
m_camera.SetCurMousePosition( aEvent.GetPosition() );
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnRotateGesture( wxRotateGestureEvent& aEvent )
{
SetFocus();
if( aEvent.IsGestureStart() )
{
m_gestureLastAngle = 0;
m_camera.SetCurMousePosition( aEvent.GetPosition() );
// We don't want to process the first angle
return;
}
if( m_camera_is_moving )
return;
m_camera.RotateScreen( m_gestureLastAngle - aEvent.GetRotationAngle() );
m_gestureLastAngle = aEvent.GetRotationAngle();
DisplayStatus();
Request_refresh();
}
void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
{
if( m_3d_render && m_3d_render->IsReloadRequestPending() )
+8
View File
@@ -237,6 +237,10 @@ private:
void OnResize( wxSizeEvent& event );
void OnTimerTimeout_Redraw( wxTimerEvent& event );
void OnZoomGesture( wxZoomGestureEvent& event );
void OnPanGesture( wxPanGestureEvent& event );
void OnRotateGesture( wxRotateGestureEvent& event );
DECLARE_EVENT_TABLE()
/**
@@ -324,6 +328,10 @@ private:
bool m_render3dmousePivot = false; // Render the 3dmouse pivot
SFVEC3F m_3dmousePivotPos; // The position of the 3dmouse pivot
///< Used to track gesture events.
double m_gestureLastZoomFactor = 1.0;
double m_gestureLastAngle = 0.0;
/**
* Trace mask used to enable or disable the trace output of this class.
* The debug output can be turned on by setting the WXTRACE environment variable to
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015-2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -35,6 +35,7 @@
#include "../3d_cache/3d_cache.h"
#include <wx/dcclient.h>
#include <base_units.h>
#include <build_version.h>
#include <gal/opengl/gl_context_mgr.h>
#include <settings/common_settings.h>
#include <pgm_base.h>
@@ -102,11 +103,6 @@ EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const wxGLAttribute
m_BiuTo3dUnits = 1.0;
m_glRC = nullptr;
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
SetScaleFactor( dpi.GetScaleFactor() );
}
@@ -200,6 +196,9 @@ void EDA_3D_MODEL_VIEWER::ogl_initialize()
From_UTF8( (char*) glewGetString( GLEW_VERSION ) ) );
}
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
glHint( GL_LINE_SMOOTH_HINT, GL_NICEST );
glHint( GL_POLYGON_SMOOTH_HINT, GL_NICEST );
@@ -30,6 +30,7 @@
#include "render_3d_opengl.h"
#include "opengl_utils.h"
#include "common_ogl/ogl_utils.h"
#include <board.h>
#include <footprint.h>
#include <3d_math.h>
#include <glm/geometric.hpp>
@@ -1570,10 +1570,6 @@ SFVEC4F RENDER_3D_RAYTRACE_BASE::shadeHit( const SFVEC4F& aBgColor, const RAY& a
sum_color += add;
}
else
{
sum_color += aBgColor;
}
}
outColor += (sum_color / SFVEC4F( (float)reflection_number_of_samples) );
@@ -31,6 +31,7 @@
#define _BBOX_3D_H_
#include <plugins/3dapi/xv3d_types.h> // SFVEC2F
#include <glm/mat4x4.hpp>
struct RAY;
+5 -4
View File
@@ -5,7 +5,7 @@
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2023 CERN
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -54,16 +54,17 @@ void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
// Set up toolbar
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
KiScaledBitmap( BITMAPS::import3d, this ), _( "Reload board" ) );
KiBitmapBundle( BITMAPS::import3d ),
_( "Reload board" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
KiScaledBitmap( BITMAPS::copy, this ),
KiBitmapBundle( BITMAPS::copy ),
_( "Copy 3D image to clipboard" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
KiScaledBitmap( BITMAPS::render_mode, this ),
KiBitmapBundle( BITMAPS::render_mode ),
_( "Render current view using Raytracing" ), wxITEM_CHECK );
m_mainToolBar->AddScaledSeparator( this );
+1 -3
View File
@@ -38,6 +38,7 @@
#include <3d_viewer/tools/eda_3d_actions.h>
#include <3d_viewer/tools/eda_3d_controller.h>
#include <3d_viewer/tools/eda_3d_conditions.h>
#include <board.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <board_design_settings.h>
@@ -810,9 +811,6 @@ void EDA_3D_VIEWER_FRAME::loadCommonSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_canvas->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
}
@@ -382,7 +382,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM_LAYER_PRESET_3D( "layer_presets",
&m_LayerPresets ) );
m_params.emplace_back( new PARAM<wxString>( "current_layer_preset",
&m_CurrentPreset, LEGACY_PRESET_FLAG ) );
&m_CurrentPreset, FOLLOW_PLOT_SETTINGS ) );
registerMigration( 0, 1, std::bind( &EDA_3D_VIEWER_SETTINGS::migrateSchema0to1, this ) );
+6 -8
View File
@@ -100,7 +100,6 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
{
DPI_SCALING_COMMON dpi( nullptr, m_frame );
int indicatorSize = ConvertDialogToPixels( wxSize( 6, 6 ) ).x / dpi.GetContentScaleFactor();
int screenHeight = wxSystemSettings::GetMetric( wxSYS_SCREEN_Y );
m_pointSize = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ).GetPointSize();
@@ -153,13 +152,13 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
if( screenHeight <= 900 && m_pointSize >= indicatorSize )
if( screenHeight <= 900 && m_pointSize >= FromDIP( KIUI::c_IndicatorSizeDIP ) )
m_pointSize = m_pointSize * 8 / 10;
m_cbLayerPresets->Bind( wxEVT_CHOICE, &APPEARANCE_CONTROLS_3D::onLayerPresetChanged, this );
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER( KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ) );
m_toggleGridRenderer = new GRID_BITMAP_TOGGLE_RENDERER(
KiBitmapBundle( BITMAPS::visibility ), KiBitmapBundle( BITMAPS::visibility_off ) );
m_frame->Bind( EDA_LANG_CHANGED, &APPEARANCE_CONTROLS_3D::OnLanguageChanged, this );
}
@@ -521,10 +520,9 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
}
else
{
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowLayers, layer,
KiBitmap( BITMAPS::visibility ),
KiBitmap( BITMAPS::visibility_off ),
aSetting->m_Visible );
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE(
m_windowLayers, layer, KiBitmapBundle( BITMAPS::visibility ),
KiBitmapBundle( BITMAPS::visibility_off ), aSetting->m_Visible );
btn_visible->Bind( TOGGLE_CHANGED,
[this]( wxCommandEvent& aEvent )
+38 -17
View File
@@ -192,9 +192,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
COMMON_SETTINGS* settings = Pgm().GetCommonSettings();
const DPI_SCALING_COMMON dpi{ settings, this };
m_previewPane->SetScaleFactor( dpi.GetScaleFactor() );
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
@@ -256,6 +253,10 @@ wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
{
// Sigh. Did we really need differentiated +/- 0.0?
if( aValue == -0.0 )
aValue = 0.0;
return wxString::Format( wxT( "%.2f%s" ),
aValue,
EDA_UNIT_UTILS::GetText( EDA_UNITS::DEGREES ) );
@@ -289,9 +290,11 @@ void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx )
yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
// to match the rest of KiCad
xrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.x ) );
yrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.y ) );
zrot->ChangeValue( formatRotationValue( -modelInfo.m_Rotation.z ) );
xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
@@ -334,9 +337,11 @@ void PANEL_PREVIEW_3D_MODEL::updateOrientation( wxCommandEvent &event )
modelInfo->m_Scale.z = EDA_UNIT_UTILS::UI::DoubleValueFromString(
pcbIUScale, EDA_UNITS::UNSCALED, zscale->GetValue() );
modelInfo->m_Rotation.x = rotationFromString( xrot->GetValue() );
modelInfo->m_Rotation.y = rotationFromString( yrot->GetValue() );
modelInfo->m_Rotation.z = rotationFromString( zrot->GetValue() );
// Rotation is stored in the file as postive-is-CW, but we use postive-is-CCW in the GUI
// to match the rest of KiCad
modelInfo->m_Rotation.x = -rotationFromString( xrot->GetValue() );
modelInfo->m_Rotation.y = -rotationFromString( yrot->GetValue() );
modelInfo->m_Rotation.z = -rotationFromString( zrot->GetValue() );
modelInfo->m_Offset.x = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
xoff->GetValue() )
@@ -426,10 +431,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
double step = SCALE_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = SCALE_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
textCtrl->GetValue() );
curr_value += ( SCALE_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
@@ -447,10 +457,15 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
double step = ROTATION_INCREMENT;
if( wxGetMouseState().ShiftDown( ) )
step = ROTATION_INCREMENT_FINE;
double curr_value = EDA_UNIT_UTILS::UI::DoubleValueFromString( unityScale, EDA_UNITS::DEGREES,
textCtrl->GetValue() );
curr_value += ( ROTATION_INCREMENT * aSign );
curr_value += ( step * aSign );
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
@@ -470,16 +485,22 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
textCtrl = zoff;
double step_mm = OFFSET_INCREMENT_MM;
double curr_value_mm =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
if( wxGetMouseState().ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
if( wxGetMouseState().ShiftDown( ) )
step_mm = 25.4*OFFSET_INCREMENT_MIL_FINE/1000;;
}
double curr_value_mm = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, m_userUnits,
textCtrl->GetValue() )
/ pcbIUScale.IU_PER_MM;
curr_value_mm += ( step_mm * aSign );
curr_value_mm = std::max( -MAX_OFFSET, curr_value_mm );
curr_value_mm = std::min( curr_value_mm, MAX_OFFSET );
@@ -515,10 +536,10 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
double step = ROTATION_INCREMENT_WHEEL;
double step = ROTATION_INCREMENT;
if( event.ShiftDown( ) )
step = ROTATION_INCREMENT_WHEEL_FINE;
step = ROTATION_INCREMENT_FINE;
if( event.GetWheelRotation() >= 0 )
step = -step;
+2 -3
View File
@@ -43,9 +43,8 @@
#define SCALE_INCREMENT_FINE 0.02
#define SCALE_INCREMENT 0.1
#define ROTATION_INCREMENT 90 // in degrees, for spin button command
#define ROTATION_INCREMENT_WHEEL 90 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT_WHEEL_FINE 1 // in degrees, for mouse wheel command
#define ROTATION_INCREMENT 90 // in degrees
#define ROTATION_INCREMENT_FINE 1 // in degrees
#define OFFSET_INCREMENT_MM 0.5
#define OFFSET_INCREMENT_MM_FINE 0.1
+46 -12
View File
@@ -31,6 +31,11 @@ cmake_policy( SET CMP0116 OLD )
# The current structure requires the add_custom_command to get called twice, the NEW behavior deduplicates it
cmake_policy( SET CMP0113 OLD )
# Enable CMAKE_MSVC_DEBUG_INFORMATION_FORMAT to override the cmake pdb flags easily
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
endif (POLICY CMP0141)
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
if( DEFINED CMAKE_BUILD_TYPE )
@@ -262,6 +267,10 @@ option( KICAD_IPC_API
"Enable experimental IPC API"
OFF )
option( KICAD_IDF_TOOLS
"Build additional idf tools"
ON )
# Global setting: exports are explicit
set( CMAKE_CXX_VISIBILITY_PRESET "hidden" )
set( CMAKE_VISIBILITY_INLINES_HIDDEN ON )
@@ -350,13 +359,9 @@ add_compile_definitions( $<$<BOOL:${KICAD_BUILD_ARCH_ARM64}>:KICAD_BUILD_ARCH_AR
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${CCACHE_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
get_property(RULE_LAUNCH_LINK GLOBAL PROPERTY RULE_LAUNCH_LINK)
set(RULE_LAUNCH_LINK "${RULE_LAUNCH_LINK} ${CCACHE_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${RULE_LAUNCH_LINK})
# Set ccache on the actual lang
list(PREPEND CMAKE_C_COMPILER_LAUNCHER ${CCACHE_FOUND})
list(PREPEND CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_FOUND})
message(STATUS "Used ${CCACHE_FOUND} for compilation.")
else(CCACHE_FOUND)
@@ -371,9 +376,9 @@ endif(USE_CCACHE)
if (USE_DISTCC)
find_program(DISTCC_FOUND distcc)
if(DISTCC_FOUND)
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
set(RULE_LAUNCH_COMPILE "${RULE_LAUNCH_COMPILE} ${DISTCC_FOUND}")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${RULE_LAUNCH_COMPILE})
list(APPEND CMAKE_C_COMPILER_LAUNCHER ${DISTCC_FOUND})
list(APPEND CMAKE_CXX_COMPILER_LAUNCHER ${DISTCC_FOUND})
message(STATUS "Using ${DISTCC_FOUND} for distributed build.")
else(DISTCC_FOUND)
message(INFO "Distcc was requested but not found.")
@@ -531,8 +536,18 @@ if( MSVC )
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" )
# /Zi: create PDB
string( APPEND CMAKE_CXX_FLAGS " /Zi" )
# cmake 3.25 or higher requried for MSVC, should be fine
if( USE_CCACHE AND CCACHE_FOUND )
# Equivalent to /Z7, ensures cmake doesn't fight over the default
# ccache may encounter external PDB file write errors due to paralleism
# Using the embedded PDB mode is ok for development use of ccache
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "Embedded")
else()
# Equivalent to /Zi, ensures cmake doesn't fight over the default
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase")
endif()
# /Zc:__cplusplus: define this macro according to C++ standard version
string( APPEND CMAKE_CXX_FLAGS " /Zc:__cplusplus" )
# /GF: enable string pooling
@@ -1043,6 +1058,25 @@ find_package( wxWidgets ${wxWidgets_REQ_VERSION} COMPONENTS gl aui adv html core
# Include wxWidgets macros.
include( ${wxWidgets_USE_FILE} )
# Detect wxWidgets port being used
if( wxWidgets_FIND_STYLE STREQUAL "win32" )
string(REGEX MATCH "^[msw|qt|gtk]*" KICAD_WX_PORT "${WX_CONFIGURATION}")
if( KICAD_WX_PORT STREQUAL "qt" )
add_compile_definitions( __WXQT__ )
elseif( KICAD_WX_PORT STREQUAL "gtk" )
add_compile_definitions( __WXGTK__ )
endif()
elseif( _wx_selected_config )
string(REGEX MATCH "^[msw|qt|gtk|osx]*" KICAD_WX_PORT "${_wx_selected_config}")
endif()
if( KICAD_WX_PORT )
message( STATUS "Detected wxWidgets port: ${KICAD_WX_PORT}")
else()
message( FATAL_ERROR "Unable to detect wxWidgets port")
endif()
if( NOT MSVC )
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.2 )
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
+34 -6
View File
@@ -132,11 +132,19 @@ message Arc
Net net = 8;
}
// What copper layer shape mode the padstack uses
enum PadStackType
{
PST_UNKNOWN = 0;
PST_THROUGH = 1; // Through all layers; same shape on all layers
PST_BLIND_BURIED = 2; // From a start layer to end layer (inclusive); same shape on all included layers
PST_UNKNOWN = 0;
// The same shape is used on all copper layers
PST_NORMAL = 1;
// The padstack uses up to three different shapes (F_Cu, inner layers, B_Cu)
PST_TOP_INNER_BOTTOM = 2;
// The padstack's shape may differ on arbitrary copper layers
PST_CUSTOM = 3;
}
enum UnconnectedLayerRemoval
@@ -189,15 +197,18 @@ message PadStackLayer
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
// Only used for PSS_ROUNDRECT or PSS_CHAMFEREDRECT
float corner_rounding_ratio = 4;
double corner_rounding_ratio = 4;
// How much to round the corners of the shape by, as a fraction of min(size.x, size.y)
// Only used for PSS_CHAMFEREDRECT
float chamfer_ratio = 5;
double chamfer_ratio = 5;
ChamferedRectCorners chamfered_corners = 6;
repeated GraphicShape custom_shapes = 7;
// If shape == PSS_CUSTOM, defines the shape of the anchor (only PSS_CIRCLE and PSS_RECTANGLE supported at present)
PadStackShape custom_anchor_shape = 8;
}
// A pad stack definition for a multilayer pad or via.
@@ -225,6 +236,21 @@ message PadStack
kiapi.common.types.Angle angle = 7;
}
enum ViaType
{
VT_UNKNOWN = 0;
// Through vias always start on F_Cu and end on B_Cu
VT_THROUGH = 1;
// Blind/buried vias can have arbitrary start and end layers
VT_BLIND_BURIED = 2;
// Microvias, blind/buried vias, can have arbitrary start and end layers, but also have different
// size defaults and design rules
VT_MICRO = 3;
}
// Represents a via
message Via
{
@@ -234,12 +260,14 @@ message Via
// The location of the via's center point
kiapi.common.types.Vector2 position = 2;
// The pad stack definition for this via. The via's VIATYPE (blind/buried/normal) is inferred from this.
// The pad stack definition for this via.
PadStack pad_stack = 3;
kiapi.common.types.LockedState locked = 4;
Net net = 5;
ViaType type = 6;
}
message GraphicSegmentAttributes
+2 -1
View File
@@ -138,7 +138,7 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
}
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, EDA_BASE_FRAME )
BEGIN_EVENT_TABLE( BITMAP2CMP_FRAME, KIWAY_PLAYER )
EVT_MENU( wxID_CLOSE, BITMAP2CMP_FRAME::OnExit )
EVT_MENU( wxID_EXIT, BITMAP2CMP_FRAME::OnExit )
@@ -193,6 +193,7 @@ BITMAP2CMP_FRAME::BITMAP2CMP_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_toolManager->InitTools();
ReCreateMenuBar();
setupUIConditions();
GetSizer()->SetSizeHints( this );
+3 -1
View File
@@ -36,7 +36,9 @@ endfunction()
get_kicad_doc_version(KICAD_DOC_VERSION)
# copy and modify the "normal" Doxyfile
file(COPY ${SRC_DOXYFILE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
cmake_path(GET DOCSET_DOXYFILE PARENT_PATH OUTPUT_DIR)
file(MAKE_DIRECTORY ${OUTPUT_DIR})
file(COPY_FILE ${SRC_DOXYFILE} ${DOCSET_DOXYFILE})
file(APPEND ${DOCSET_DOXYFILE} "
# Added for DocSet generation
+3
View File
@@ -53,6 +53,9 @@ if( MSVC )
# This is a workaround borrowed from https://github.com/dotnet/runtime/blob/main/eng/native/configurecompiler.cmake
# CMake currently cannot handle the fact that "armasm" is used in combination with standard MSVC "cl" for ARM targets
# So this is basically a hack (incombination with the MSVCAssemblyHelper.cmake) to make this all work
# This workaround can be removed when https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9326 is finally part of a
# cmake release AND when MSVC ships said cmake release
if(KICAD_BUILD_ARCH_ARM)
message( "Configuring ARM assembler" )
# Explicitly specify the assembler to be used for Arm32 compile
+1
View File
@@ -86,6 +86,7 @@ set( OCC_LIBS_POST_78
TKDEGLTF
TKDESTEP
TKDESTL
TKDEVRML
)
set(OCC_TYPE "OpenCASCADE Standard Edition")
+1 -1
View File
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
# Disabling the "search every possible place" code for now
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
+1 -1
View File
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+5 -1
View File
@@ -523,6 +523,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
if(BUILD_SHARED_LIBS)
find_path(wxWidgets_LIB_DIR
NAMES
qtu/wx/setup.h
qtud/wx/setup.h
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
@@ -540,6 +542,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
else()
find_path(wxWidgets_LIB_DIR
NAMES
qtu/wx/setup.h
qtud/wx/setup.h
msw/wx/setup.h
mswd/wx/setup.h
mswu/wx/setup.h
@@ -571,7 +575,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
endif()
# Search for available configuration types.
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw)
foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw qt qtd qtu qtud)
set(WX_${CFG}_FOUND FALSE)
if(EXISTS ${WX_LIB_DIR}/${CFG})
list(APPEND WX_CONFIGURATION_LIST ${CFG})
+1 -1
View File
@@ -62,7 +62,7 @@ if( KICAD_TEST_XML_OUTPUT )
# Due to Boost issue in 1.62, have to use the --logger parameter, rather than
# separate --log_format, --log_sink, etc parameter
# https://svn.boost.org/trac10/ticket/12507
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,warning)
set(BOOST_TEST_PARAMS --logger=JUNIT,warning,${TEST_NAME}.boost-results.xml:HRF,message)
endif()
# Add the test to the CTest registry
+5 -2
View File
@@ -133,6 +133,7 @@ set( KICOMMON_SRCS
exceptions.cpp
gestfich.cpp
json_conversions.cpp
kidialog.cpp
kiid.cpp
kiway.cpp
kiway_express.cpp
@@ -581,6 +582,7 @@ set( COMMON_SRCS
tool/action_toolbar.cpp
tool/actions.cpp
tool/common_control.cpp
tool/library_editor_control.cpp
tool/common_tools.cpp
tool/conditional_menu.cpp
tool/edit_constraints.cpp
@@ -717,6 +719,7 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netinfo_list.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pad.cpp
${CMAKE_SOURCE_DIR}/pcbnew/padstack.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_target.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_reference_image.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_field.cpp
@@ -814,7 +817,7 @@ add_dependencies( pcbcommon delaunator )
# The lemon grammar for the numeric evaluator
generate_lemon_grammar(
common
kicommon
libeval
libeval/numeric_evaluator.cpp
libeval/grammar.lemon
@@ -822,7 +825,7 @@ generate_lemon_grammar(
# The lemon grammar for the expression compiler
generate_lemon_grammar(
common
kicommon
libeval_compiler
libeval_compiler/libeval_compiler.cpp
libeval_compiler/grammar.lemon
+14
View File
@@ -111,6 +111,8 @@ static const wxChar TriangulateSimplificationLevel[] = wxT( "TriangulateSimplifi
static const wxChar TriangulateMinimumArea[] = wxT( "TriangulateMinimumArea" );
static const wxChar EnableCacheFriendlyFracture[] = wxT( "EnableCacheFriendlyFracture" );
static const wxChar EnableAPILogging[] = wxT( "EnableAPILogging" );
static const wxChar MaxFileSystemWatchers[] = wxT( "MaxFileSystemWatchers" );
static const wxChar MinorSchematicGraphSize[] = wxT( "MinorSchematicGraphSize" );
} // namespace KEYS
@@ -265,6 +267,10 @@ ADVANCED_CFG::ADVANCED_CFG()
m_EnableCacheFriendlyFracture = true;
m_MaxFilesystemWatchers = 16384;
m_MinorSchematicGraphSize = 10000;
loadFromConfigFile();
}
@@ -487,6 +493,14 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_EnableCacheFriendlyFracture,
m_EnableCacheFriendlyFracture ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaxFileSystemWatchers,
&m_MaxFilesystemWatchers, m_MaxFilesystemWatchers,
0, 2147483647 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MinorSchematicGraphSize,
&m_MinorSchematicGraphSize, m_MinorSchematicGraphSize,
0, 2147483647 ) );
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks;
+1 -1
View File
@@ -455,7 +455,7 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONX, resX);
m_image->SetOption( wxIMAGE_OPTION_RESOLUTIONY, resY);
m_rotation += ( aRotateCCW ? -ANGLE_90 : ANGLE_90 );
m_rotation += ( aRotateCCW ? ANGLE_90 : -ANGLE_90 );
rebuildBitmap( false );
UpdateImageDataBuffer();
}
+131 -42
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -17,9 +17,10 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand!
*/
/***************************************************************************************
* This file is auto-generated by CMake when MAINTAIN_PNGS is on. Do not edit by hand! *
* See resources/bitmap.png/CMakeLists.txt to build/see/edit the actual list of icons *
***************************************************************************************/
#include <bitmaps/bitmaps_list.h>
#include <bitmaps/bitmap_info.h>
@@ -446,8 +447,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_24.png" ), 24, wxT( "light" ) );
@@ -524,9 +527,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_24.png" ), 24, wxT( "light" ) );
@@ -852,8 +863,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_24.png" ), 24, wxT( "dark" ) );
@@ -930,9 +943,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_24.png" ), 24, wxT( "dark" ) );
@@ -1258,8 +1279,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_16.png" ), 16, wxT( "light" ) );
@@ -1336,9 +1359,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_16.png" ), 16, wxT( "light" ) );
@@ -1664,8 +1695,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_16.png" ), 16, wxT( "dark" ) );
@@ -1742,9 +1775,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_16.png" ), 16, wxT( "dark" ) );
@@ -2070,8 +2111,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_32.png" ), 32, wxT( "light" ) );
@@ -2148,9 +2191,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_32.png" ), 32, wxT( "light" ) );
@@ -2476,8 +2527,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2554,9 +2607,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_32.png" ), 32, wxT( "dark" ) );
@@ -2882,8 +2943,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_48.png" ), 48, wxT( "light" ) );
@@ -2960,9 +3023,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_48.png" ), 48, wxT( "light" ) );
@@ -3288,8 +3359,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3366,9 +3439,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_48.png" ), 48, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_48.png" ), 48, wxT( "dark" ) );
@@ -3694,8 +3775,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_64.png" ), 64, wxT( "light" ) );
@@ -3772,9 +3855,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_64.png" ), 64, wxT( "light" ) );
@@ -4100,8 +4191,10 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::directory].emplace_back( BITMAPS::directory, wxT( "directory_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_browser].emplace_back( BITMAPS::directory_browser, wxT( "directory_browser_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::directory_open].emplace_back( BITMAPS::directory_open, wxT( "directory_open_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal].emplace_back( BITMAPS::distribute_horizontal, wxT( "distribute_horizontal_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical].emplace_back( BITMAPS::distribute_vertical, wxT( "distribute_vertical_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_centers].emplace_back( BITMAPS::distribute_horizontal_centers, wxT( "distribute_horizontal_centers_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_horizontal_gaps].emplace_back( BITMAPS::distribute_horizontal_gaps, wxT( "distribute_horizontal_gaps_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_centers].emplace_back( BITMAPS::distribute_vertical_centers, wxT( "distribute_vertical_centers_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::distribute_vertical_gaps].emplace_back( BITMAPS::distribute_vertical_gaps, wxT( "distribute_vertical_gaps_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::down].emplace_back( BITMAPS::down, wxT( "down_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag].emplace_back( BITMAPS::drag, wxT( "drag_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::drag_segment].emplace_back( BITMAPS::drag_segment, wxT( "drag_segment_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4178,9 +4271,17 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::hole_to_hole_clearance].emplace_back( BITMAPS::hole_to_hole_clearance, wxT( "hole_to_hole_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hole_to_copper_clearance].emplace_back( BITMAPS::hole_to_copper_clearance, wxT( "hole_to_copper_clearance_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::hv45mode].emplace_back( BITMAPS::hv45mode, wxT( "hv45mode_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb_24].emplace_back( BITMAPS::icon_cvpcb_24, wxT( "icon_cvpcb_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_footprint_browser].emplace_back( BITMAPS::icon_footprint_browser, wxT( "icon_footprint_browser_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm_24].emplace_back( BITMAPS::icon_pcm_24, wxT( "icon_pcm_24_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::import3d].emplace_back( BITMAPS::import3d, wxT( "import3d_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::image].emplace_back( BITMAPS::image, wxT( "image_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4434,24 +4535,6 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_32].emplace_back( BITMAPS::icon_pagelayout_editor_32, wxT( "icon_pagelayout_editor_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_32].emplace_back( BITMAPS::icon_pcbcalculator_32, wxT( "icon_pcbcalculator_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_32].emplace_back( BITMAPS::icon_pcbnew_32, wxT( "icon_pcbnew_32_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_24.png" ), 24, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component_24].emplace_back( BITMAPS::icon_bitmap2component_24, wxT( "icon_bitmap2component_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema_24].emplace_back( BITMAPS::icon_eeschema_24, wxT( "icon_eeschema_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview_24].emplace_back( BITMAPS::icon_gerbview_24, wxT( "icon_gerbview_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_kicad_24].emplace_back( BITMAPS::icon_kicad_24, wxT( "icon_kicad_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_libedit_24].emplace_back( BITMAPS::icon_libedit_24, wxT( "icon_libedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_modedit_24].emplace_back( BITMAPS::icon_modedit_24, wxT( "icon_modedit_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor_24].emplace_back( BITMAPS::icon_pagelayout_editor_24, wxT( "icon_pagelayout_editor_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator_24].emplace_back( BITMAPS::icon_pcbcalculator_24, wxT( "icon_pcbcalculator_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbnew_24].emplace_back( BITMAPS::icon_pcbnew_24, wxT( "icon_pcbnew_24_dark_24.png" ), 24, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_64.png" ), 64, wxT( "light" ) );
@@ -4463,6 +4546,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_64.png" ), 64, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_64.png" ), 64, wxT( "dark" ) );
@@ -4474,6 +4558,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_64.png" ), 64, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_128.png" ), 128, wxT( "light" ) );
@@ -4485,6 +4570,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_128.png" ), 128, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_128.png" ), 128, wxT( "dark" ) );
@@ -4496,6 +4582,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_128.png" ), 128, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_256.png" ), 256, wxT( "light" ) );
@@ -4507,6 +4594,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_256.png" ), 256, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_eeschema].emplace_back( BITMAPS::icon_eeschema, wxT( "icon_eeschema_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_gerbview].emplace_back( BITMAPS::icon_gerbview, wxT( "icon_gerbview_dark_256.png" ), 256, wxT( "dark" ) );
@@ -4518,6 +4606,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::icon_pagelayout_editor].emplace_back( BITMAPS::icon_pagelayout_editor, wxT( "icon_pagelayout_editor_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_bitmap2component].emplace_back( BITMAPS::icon_bitmap2component, wxT( "icon_bitmap2component_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcbcalculator].emplace_back( BITMAPS::icon_pcbcalculator, wxT( "icon_pcbcalculator_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::icon_pcm].emplace_back( BITMAPS::icon_pcm, wxT( "icon_pcm_dark_256.png" ), 256, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::dialog_warning].emplace_back( BITMAPS::dialog_warning, wxT( "dialog_warning_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_3d].emplace_back( BITMAPS::icon_3d, wxT( "icon_3d_48.png" ), 48, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::icon_cvpcb].emplace_back( BITMAPS::icon_cvpcb, wxT( "icon_cvpcb_48.png" ), 48, wxT( "light" ) );
+19
View File
@@ -51,6 +51,19 @@ extern std::string GetCurlLibVersion();
#include <kicad_build_version.h>
#undef INCLUDE_KICAD_VERSION
// Remember OpenGL info
static wxString s_glVendor;
static wxString s_glRenderer;
static wxString s_glVersion;
void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVersion )
{
s_glVendor = wxString::FromUTF8( aVendor );
s_glRenderer = wxString::FromUTF8( aRenderer );
s_glVersion = wxString::FromUTF8( aVersion );
}
wxString GetPlatformGetBitnessName()
{
wxPlatformInfo platform;
@@ -200,6 +213,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
#endif
if( !s_glVendor.empty() || !s_glRenderer.empty() || !s_glVersion.empty() )
{
aMsg << eol;
aMsg << "OpenGL: " << s_glVendor << ", " << s_glRenderer << ", " << s_glVersion;
}
aMsg << eol << eol;
if( !aBrief )
+14 -124
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2023, 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -22,134 +22,23 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <confirm.h>
#include <functional>
#include <wx/app.h>
#include <wx/stockitem.h>
#include <wx/richmsgdlg.h>
#include <wx/msgdlg.h>
#include <wx/choicdlg.h>
#include <wx/crt.h>
#include <confirm.h>
#include <functional>
#include <unordered_map>
// Set of dialogs that have been chosen not to be shown again
static std::unordered_map<unsigned long, int> doNotShowAgainDlgs;
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption,
long aStyle )
: wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ),
m_hash( 0 ),
m_cancelMeansCancel( true )
{
}
KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, KD_TYPE aType,
const wxString& aCaption )
: wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ),
m_hash( 0 ),
m_cancelMeansCancel( true )
{
}
void KIDIALOG::DoNotShowCheckbox( wxString aUniqueId, int line )
{
ShowCheckBox( _( "Do not show again" ), false );
m_hash = std::hash<wxString>{}( aUniqueId ) + line;
}
bool KIDIALOG::DoNotShowAgain() const
{
return doNotShowAgainDlgs.count( m_hash ) > 0;
}
void KIDIALOG::ForceShowAgain()
{
doNotShowAgainDlgs.erase( m_hash );
}
bool KIDIALOG::Show( bool aShow )
{
// We should check the do-not-show-again setting only when the dialog is displayed
if( aShow )
{
// Check if this dialog should be shown to the user
auto it = doNotShowAgainDlgs.find( m_hash );
if( it != doNotShowAgainDlgs.end() )
return it->second;
}
int ret = wxRichMessageDialog::Show( aShow );
// Has the user asked not to show the dialog again?
// Note that we don't save a Cancel value unless the Cancel button is being used for some
// other function (which is actually more common than it being used for Cancel).
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
doNotShowAgainDlgs[m_hash] = ret;
return ret;
}
int KIDIALOG::ShowModal()
{
// Check if this dialog should be shown to the user
auto it = doNotShowAgainDlgs.find( m_hash );
if( it != doNotShowAgainDlgs.end() )
return it->second;
int ret = wxRichMessageDialog::ShowModal();
// Has the user asked not to show the dialog again?
// Note that we don't save a Cancel value unless the Cancel button is being used for some
// other function (which is actually more common than it being used for Cancel).
if( IsCheckBoxChecked() && (!m_cancelMeansCancel || ret != wxID_CANCEL ) )
doNotShowAgainDlgs[m_hash] = ret;
return ret;
}
wxString KIDIALOG::getCaption( KD_TYPE aType, const wxString& aCaption )
{
if( !aCaption.IsEmpty() )
return aCaption;
switch( aType )
{
case KD_NONE: /* fall through */
case KD_INFO: return _( "Message" );
case KD_QUESTION: return _( "Question" );
case KD_WARNING: return _( "Warning" );
case KD_ERROR: return _( "Error" );
}
return wxEmptyString;
}
long KIDIALOG::getStyle( KD_TYPE aType )
{
long style = wxOK | wxCENTRE | wxSTAY_ON_TOP;
switch( aType )
{
case KD_NONE: break;
case KD_INFO: style |= wxICON_INFORMATION; break;
case KD_QUESTION: style |= wxICON_QUESTION; break;
case KD_WARNING: style |= wxICON_WARNING; break;
case KD_ERROR: style |= wxICON_ERROR; break;
}
return style;
}
/**
* Flag to enable confirmation dialog debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceConfirm[] = wxT( "KICAD_CONFIRM" );
bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
@@ -211,7 +100,8 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
// wxMessageDialog on windows invokes TaskDialogIndirect which is a native function for a dialog
// As a result it skips wxWidgets for modal management...and we don't parent frames properly
// among other things for Windows to do the right thing by default
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame and kicad frame at the same time
// Disable all the windows manually to avoid being able to hit this dialog from the tool frame
// and kicad frame at the same time.
wxWindowDisabler disable( true );
#endif
@@ -333,7 +223,7 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
{
if( !wxTheApp || !wxTheApp->GetTopWindow() )
{
wxLogDebug( "%s %s", aMessage, aExtraInfo );
wxLogTrace( traceConfirm, wxS( "%s %s" ), aMessage, aExtraInfo );
return;
}
+86 -51
View File
@@ -347,6 +347,24 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
return true;
}
}
else
{
wxLogTrace( traceDatabase, wxT( "SelectOne: table `%s` not in row cache; will SelectAll" ),
tableName, aWhere.second );
selectAllAndCache( tableName, aWhere.first );
if( m_cache->Get( tableName, cacheEntry ) )
{
if( cacheEntry.count( aWhere.second ) )
{
wxLogTrace( traceDatabase, wxT( "SelectOne: `%s` with parameter `%s` - cache hit" ),
tableName, aWhere.second );
aResult = cacheEntry.at( aWhere.second );
return true;
}
}
}
if( !m_columnCache.count( tableName ) )
{
@@ -372,15 +390,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
columnsFor( tableName ),
m_quoteChar, tableName, m_quoteChar,
m_quoteChar, columnName, m_quoteChar );
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( queryStr );
PROF_TIMER timer;
nanodbc::statement statement;
try
{
statement.prepare( query );
statement.prepare( *m_conn, query );
statement.bind( 0, aWhere.second.c_str() );
}
catch( nanodbc::database_error& e )
@@ -474,44 +491,14 @@ bool DATABASE_CONNECTION::SelectOne( const std::string& aTable,
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
bool DATABASE_CONNECTION::selectAllAndCache( const std::string& aTable, const std::string& aKey )
{
if( !m_conn )
{
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - cache hit" ), aTable );
aResults.reserve( cacheEntry.size() );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
nanodbc::statement statement( *m_conn );
nanodbc::string query = fromUTF8( fmt::format( "SELECT {} FROM {}{}{}", columnsFor( aTable ),
m_quoteChar, aTable, m_quoteChar ) );
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s`" ), toUTF8( query ) );
wxLogTrace( traceDatabase, wxT( "selectAllAndCache: `%s`" ), toUTF8( query ) );
PROF_TIMER timer;
@@ -522,7 +509,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while preparing query for SelectAll: %s" ),
wxLogTrace( traceDatabase,
wxT( "Exception while preparing query for selectAllAndCache: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -540,7 +528,8 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
catch( nanodbc::database_error& e )
{
m_lastError = e.what();
wxLogTrace( traceDatabase, wxT( "Exception while executing query for SelectAll: %s" ),
wxLogTrace( traceDatabase,
wxT( "Exception while executing query for selectAllAndCache: %s" ),
m_lastError );
// Exception may be due to a connection error; nanodbc won't auto-reconnect
@@ -551,15 +540,17 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
timer.Stop();
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
auto handleException =
[&]( std::runtime_error& aException, const std::string& aExtraContext = "" )
{
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from SelectAll: %s%s" ),
aResults.size(), m_lastError, extra );
};
{
m_lastError = aException.what();
std::string extra = aExtraContext.empty() ? "" : ": " + aExtraContext;
wxLogTrace( traceDatabase,
wxT( "Exception while parsing result %d from selectAllAndCache: %s%s" ),
cacheEntry.size(), m_lastError, extra );
};
while( results.next() )
{
@@ -636,20 +627,64 @@ bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::strin
}
}
aResults.emplace_back( std::move( result ) );
wxASSERT( result.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( result.at( aKey ) );
cacheEntry[keyStr] = result;
}
wxLogTrace( traceDatabase, wxT( "SelectAll from %s completed in %0.1f ms" ), aTable,
wxLogTrace( traceDatabase, wxT( "selectAllAndCache from %s completed in %0.1f ms" ), aTable,
timer.msecs() );
for( const ROW& row : aResults )
m_cache->Put( aTable, cacheEntry );
return true;
}
bool DATABASE_CONNECTION::SelectAll( const std::string& aTable, const std::string& aKey,
std::vector<ROW>& aResults )
{
if( !m_conn )
{
wxASSERT( row.count( aKey ) );
std::string keyStr = std::any_cast<std::string>( row.at( aKey ) );
cacheEntry[keyStr] = row;
wxLogTrace( traceDatabase, wxT( "Called SelectAll without valid connection!" ) );
return false;
}
m_cache->Put( aTable, cacheEntry );
auto tableMapIter = m_tables.find( aTable );
if( tableMapIter == m_tables.end() )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: requested table %s not found in cache" ),
aTable );
return false;
}
DB_CACHE_TYPE::CACHE_VALUE cacheEntry;
if( !m_cache->Get( aTable, cacheEntry ) )
{
if( !selectAllAndCache( aTable, aKey ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` cache fill failed" ), aTable );
return false;
}
// Now it should be filled
m_cache->Get( aTable, cacheEntry );
}
if( !m_cache->Get( aTable, cacheEntry ) )
{
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` failed to get results from cache!" ),
aTable );
return false;
}
wxLogTrace( traceDatabase, wxT( "SelectAll: `%s` - returning cached results" ), aTable );
aResults.reserve( cacheEntry.size() );
for( auto &[ key, row ] : cacheEntry )
aResults.emplace_back( row );
return true;
}
+1
View File
@@ -24,6 +24,7 @@
#include <build_version.h>
#include <eda_base_frame.h>
#include <wx/clipbrd.h>
#include <wx/msgdlg.h>
#include <wx/hyperlink.h>
+1 -1
View File
@@ -526,7 +526,7 @@ int DIALOG_SHIM::ShowQuasiModal()
m_qmodal_showing = true;
WX_EVENT_LOOP event_loop;
wxGUIEventLoop event_loop;
m_qmodal_loop = &event_loop;
@@ -26,6 +26,7 @@
#include <project.h>
#include <project/project_file.h>
#include <project/net_settings.h>
#include <eda_base_frame.h>
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
+2 -1
View File
@@ -23,7 +23,8 @@
#include <dialogs/dialog_book_reporter.h>
#include <widgets/wx_html_report_box.h>
#include <wx/wxhtml.h>
#include <wx/event.h>
#include <kiway_player.h>
wxDEFINE_EVENT( EDA_EVT_CLOSE_DIALOG_BOOK_REPORTER, wxCommandEvent );
+76 -31
View File
@@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018-2022 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2018-2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -18,6 +18,7 @@
*/
#include <kiplatform/ui.h>
#include <dialogs/dialog_color_picker.h>
#include <cmath>
#include <algorithm>
@@ -28,6 +29,7 @@
#include <wx/dcmemory.h>
#define ALPHA_MAX 100 // the max value returned by the alpha (opacity) slider
#define SLOPE_AXIS ( bmsize.y / 5.28 ) // was 50 at 264 size
using KIGFX::COLOR4D;
@@ -52,13 +54,19 @@ DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER( wxWindow* aParent, const COLOR4D& aCur
m_allowOpacityCtrl = aAllowOpacityControl;
m_previousColor4D = aCurrentColor;
m_newColor4D = aCurrentColor;
m_cursorsSize = 8; // Size of square cursors drawn on color bitmaps
m_newColor4D.ToHSV( m_hue, m_sat, m_val, true );
m_bitmapRGB = nullptr;
m_bitmapHSV = nullptr;
m_selectedCursor = nullptr;
m_defaultColor = aDefaultColor;
updateHandleSize();
m_OldColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
m_NewColorRect->SetMinSize( FromDIP( wxSize( 20, 20 ) ) );
m_colorValue->SetMinSize( wxSize( GetTextExtent( wxS( "#DDDDDDDD" ) ).x + FromDIP( 8 ), -1 ) );
if( !m_allowOpacityCtrl )
{
m_SizerTransparency->Show( false );
@@ -118,19 +126,22 @@ DIALOG_COLOR_PICKER::~DIALOG_COLOR_PICKER()
void DIALOG_COLOR_PICKER::updatePreview( wxStaticBitmap* aStaticBitmap, COLOR4D& aColor4D )
{
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE, aStaticBitmap->GetSize(),
ConvertDialogToPixels( CHECKERBOARD_SIZE_DU ),
wxSize swatchSize = aStaticBitmap->GetSize();
wxSize checkerboardSize = ConvertDialogToPixels( CHECKERBOARD_SIZE_DU );
wxBitmap newBm = COLOR_SWATCH::MakeBitmap( aColor4D, COLOR4D::WHITE,
ToPhys( swatchSize ),
ToPhys( checkerboardSize ),
aStaticBitmap->GetParent()->GetBackgroundColour() );
newBm.SetScaleFactor( GetDPIScaleFactor() );
aStaticBitmap->SetBitmap( newBm );
}
bool DIALOG_COLOR_PICKER::TransferDataToWindow()
{
// Draw all bitmaps, with colors according to the color 4D
updatePreview( m_OldColorRect, m_previousColor4D );
SetEditVals( ALL_CHANGED, false );
drawAll();
// Configure the spin control sizes
configureSpinCtrl( m_spinCtrlGreen );
@@ -144,6 +155,10 @@ bool DIALOG_COLOR_PICKER::TransferDataToWindow()
finishDialogSettings();
// Draw all bitmaps, with colors according to the color 4D
updatePreview( m_OldColorRect, m_previousColor4D );
drawAll();
return true;
}
@@ -169,8 +184,12 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
auto addSwatch =
[&]( int aId, COLOR4D aColor, const wxString& aColorName )
{
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE, swatchSize,
checkerboardSize, checkboardBackground );
wxBitmap bm = COLOR_SWATCH::MakeBitmap( aColor, COLOR4D::WHITE,
ToPhys( swatchSize ),
ToPhys( checkerboardSize ),
checkboardBackground );
bm.SetScaleFactor( GetDPIScaleFactor() );
wxStaticBitmap* swatch = new wxStaticBitmap( m_panelDefinedColors, aId, bm );
m_fgridColor->Add( swatch, 0, wxALIGN_CENTER_VERTICAL, 5 );
@@ -227,7 +246,7 @@ void DIALOG_COLOR_PICKER::initDefinedColors( CUSTOM_COLORS_LIST* aPredefinedColo
void DIALOG_COLOR_PICKER::createRGBBitmap()
{
wxSize bmsize = m_RgbBitmap->GetSize();
wxSize bmsize = ToPhys( m_RgbBitmap->GetSize() );
int half_size = std::min( bmsize.x, bmsize.y )/2;
// We use here a Y axis from bottom to top and origin to center, So we need to map
@@ -245,7 +264,6 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
// Red blue area in X Z 3d axis
double inc = 255.0 / half_size;
#define SLOPE_AXIS 50.0
double slope = SLOPE_AXIS/half_size;
color.g = 0.0;
@@ -315,13 +333,15 @@ void DIALOG_COLOR_PICKER::createRGBBitmap()
delete m_bitmapRGB;
m_bitmapRGB = new wxBitmap( img, 24 );
m_bitmapRGB->SetScaleFactor( GetDPIScaleFactor() );
m_RgbBitmap->SetBitmap( *m_bitmapRGB );
}
void DIALOG_COLOR_PICKER::createHSVBitmap()
{
wxSize bmsize = m_HsvBitmap->GetSize();
wxSize bmsize = ToPhys( m_HsvBitmap->GetSize() );
int half_size = std::min( bmsize.x, bmsize.y )/2;
// We use here a Y axis from bottom to top and origin to center, So we need to map
@@ -379,19 +399,24 @@ void DIALOG_COLOR_PICKER::createHSVBitmap()
delete m_bitmapHSV;
m_bitmapHSV = new wxBitmap( img, 24 );
m_bitmapHSV->SetScaleFactor( GetDPIScaleFactor() );
m_HsvBitmap->SetBitmap( *m_bitmapHSV );
}
void DIALOG_COLOR_PICKER::drawRGBPalette()
{
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != m_RgbBitmap->GetSize() )
if( !m_bitmapRGB || m_bitmapRGB->GetSize() != ToPhys( m_RgbBitmap->GetSize() ) )
createRGBBitmap();
wxMemoryDC bitmapDC;
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxBitmap newBm( *m_bitmapRGB );
newBm.SetScaleFactor( 1.0 );
bitmapDC.SelectObject( newBm );
// Use Y axis from bottom to top and origin to center
@@ -413,7 +438,6 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
bitmapDC.SetBrush( brush );
int half_csize = m_cursorsSize / 2;
#define SLOPE_AXIS 50.0
double slope = SLOPE_AXIS / half_size;
// Red axis cursor (Z 3Daxis):
@@ -445,6 +469,7 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
bitmapDC.DrawLine( 0, 0, half_size, - half_size*slope ); // Blue axis (X 3D axis)
bitmapDC.DrawLine( 0, 0, -half_size, - half_size*slope ); // green axis (Y 3D axis)
newBm.SetScaleFactor( GetDPIScaleFactor() );
m_RgbBitmap->SetBitmap( newBm );
/* Deselect the Tool Bitmap from DC,
@@ -455,13 +480,16 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
void DIALOG_COLOR_PICKER::drawHSVPalette()
{
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != m_HsvBitmap->GetSize() )
if( !m_bitmapHSV || m_bitmapHSV->GetSize() != ToPhys( m_HsvBitmap->GetSize() ) )
createHSVBitmap();
wxMemoryDC bitmapDC;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxBitmap newBm( *m_bitmapHSV );
newBm.SetScaleFactor( 1.0 );
bitmapDC.SelectObject( newBm );
// Use Y axis from bottom to top and origin to center
@@ -485,11 +513,11 @@ void DIALOG_COLOR_PICKER::drawHSVPalette()
bitmapDC.SetPen( pen );
bitmapDC.SetBrush( brush );
int half_csize = m_cursorsSize/2;
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x- half_csize,
m_cursorBitmapHSV.y-half_csize,
bitmapDC.DrawRectangle( m_cursorBitmapHSV.x - ( m_cursorsSize / 2 ),
m_cursorBitmapHSV.y - ( m_cursorsSize / 2 ),
m_cursorsSize, m_cursorsSize );
newBm.SetScaleFactor( GetDPIScaleFactor() );
m_HsvBitmap->SetBitmap( newBm );
/* Deselect the Tool Bitmap from DC,
@@ -539,8 +567,15 @@ void DIALOG_COLOR_PICKER::SetEditVals( CHANGED_COLOR aChanged, bool aCheckTransp
}
void DIALOG_COLOR_PICKER::updateHandleSize()
{
m_cursorsSize = ToPhys( FromDIP( 8 ) ); // Size of square cursors drawn on color bitmaps
}
void DIALOG_COLOR_PICKER::drawAll()
{
updateHandleSize();
m_NewColorRect->Freeze(); // Avoid flicker
m_HsvBitmap->Freeze();
m_RgbBitmap->Freeze();
@@ -583,11 +618,12 @@ void DIALOG_COLOR_PICKER::buttColorClick( wxMouseEvent& event )
void DIALOG_COLOR_PICKER::onRGBMouseClick( wxMouseEvent& event )
{
m_allowMouseEvents = true;
wxPoint mousePos = event.GetPosition();
// The cursor position is relative to the m_bitmapHSV wxBitmap center
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxPoint mousePos = ToPhys( event.GetPosition() );
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
mousePos.x -= half_size;
mousePos.y -= half_size;
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
@@ -637,9 +673,10 @@ void DIALOG_COLOR_PICKER::onRGBMouseDrag( wxMouseEvent& event )
// Adjust the HSV cursor position to follow the mouse cursor
// The cursor position is relative to the m_bitmapHSV wxBitmap center
wxPoint mousePos = event.GetPosition();
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
wxPoint mousePos = ToPhys( event.GetPosition() );
wxSize bmsize = m_bitmapRGB->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
mousePos.x -= half_size;
mousePos.y -= half_size;
mousePos.y = -mousePos.y; // Use the bottom to top vertical axis
@@ -699,6 +736,14 @@ void DIALOG_COLOR_PICKER::onHSVMouseDrag( wxMouseEvent& event )
}
void DIALOG_COLOR_PICKER::onSize( wxSizeEvent& event )
{
drawAll();
event.Skip();
}
void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
{
if( m_newColor4D.SetFromHexString( m_colorValue->GetValue() ) )
@@ -713,9 +758,9 @@ void DIALOG_COLOR_PICKER::OnColorValueText( wxCommandEvent& event )
bool DIALOG_COLOR_PICKER::setHSvaluesFromCursor( const wxPoint& aMouseCursor )
{
wxPoint mousePos = aMouseCursor;
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y )/2;
wxPoint mousePos = ToPhys( aMouseCursor );
wxSize bmsize = m_bitmapHSV->GetSize();
int half_size = std::min( bmsize.x, bmsize.y ) / 2;
// Make the cursor position relative to the m_bitmapHSV wxBitmap center
mousePos.x -= half_size;
+25 -29
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -33,7 +33,10 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_RgbBitmap = new wxStaticBitmap( sbSizerViewRGB->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
m_RgbBitmap->SetMinSize( wxSize( 264,264 ) );
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
sbSizerViewRGB->Add( m_RgbBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
sbSizerViewRGB->Add( 0, 0, 1, wxEXPAND, 5 );
wxFlexGridSizer* fgSizerRGB;
fgSizerRGB = new wxFlexGridSizer( 0, 3, 0, 0 );
@@ -68,18 +71,18 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
sbSizerViewRGB->Add( fgSizerRGB, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewRGB, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerPanels->Add( sbSizerViewRGB, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
wxStaticBoxSizer* sbSizerViewHSV;
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxHORIZONTAL );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
sbSizerViewHSV = new wxStaticBoxSizer( new wxStaticBox( m_panelFreeColors, wxID_ANY, _("HSV") ), wxVERTICAL );
m_HsvBitmap = new wxStaticBitmap( sbSizerViewHSV->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 264,264 ), 0 );
m_HsvBitmap->SetMinSize( wxSize( 264,264 ) );
bSizer10->Add( m_HsvBitmap, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
sbSizerViewHSV->Add( m_HsvBitmap, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND|wxSHAPED, 5 );
sbSizerViewHSV->Add( 0, 0, 1, wxEXPAND, 5 );
wxFlexGridSizer* fgSizerHSV;
fgSizerHSV = new wxFlexGridSizer( 0, 2, 0, 0 );
@@ -103,26 +106,23 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
fgSizerHSV->Add( m_spinCtrlSaturation, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer10->Add( fgSizerHSV, 0, wxEXPAND, 5 );
sbSizerViewHSV->Add( fgSizerHSV, 0, wxEXPAND, 5 );
sbSizerViewHSV->Add( bSizer10, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewHSV, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerBright;
bSizerBright = new wxBoxSizer( wxVERTICAL );
m_staticTextBright = new wxStaticText( sbSizerViewHSV->GetStaticBox(), wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBright = new wxStaticText( m_panelFreeColors, wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextBright->Wrap( -1 );
bSizerBright->Add( m_staticTextBright, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
m_sliderBrightness = new wxSlider( sbSizerViewHSV->GetStaticBox(), wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
m_sliderBrightness = new wxSlider( m_panelFreeColors, wxID_ANY, 255, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_INVERSE|wxSL_LABELS|wxSL_LEFT|wxSL_VERTICAL );
bSizerBright->Add( m_sliderBrightness, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxTOP, 5 );
sbSizerViewHSV->Add( bSizerBright, 0, wxEXPAND, 5 );
bSizerPanels->Add( sbSizerViewHSV, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
bSizerPanels->Add( bSizerBright, 0, wxALL|wxEXPAND, 5 );
bSizerUpperFreeColors->Add( bSizerPanels, 1, wxEXPAND, 5 );
@@ -153,7 +153,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_SizerDefinedColors->Fit( m_panelDefinedColors );
m_notebook->AddPage( m_panelDefinedColors, _("Defined Colors"), false );
bSizerUpperMain->Add( m_notebook, 0, wxEXPAND | wxALL, 5 );
bSizerUpperMain->Add( m_notebook, 1, wxEXPAND | wxALL, 5 );
m_SizerTransparency = new wxBoxSizer( wxVERTICAL );
@@ -171,35 +171,29 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
bSizerUpperMain->Add( m_SizerTransparency, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerUpperMain->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMain->Add( bSizerUpperMain, 0, wxEXPAND, 5 );
bSizerMain->Add( bSizerUpperMain, 1, wxEXPAND, 5 );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
m_staticTextOldColor = new wxStaticText( this, wxID_ANY, _("Preview (old/new):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOldColor->Wrap( -1 );
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bButtonsSizer->Add( m_staticTextOldColor, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_OldColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_OldColorRect->SetMinSize( wxSize( 24,24 ) );
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bButtonsSizer->Add( m_OldColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
m_NewColorRect = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
m_NewColorRect->SetMinSize( wxSize( 24,24 ) );
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL, 5 );
bButtonsSizer->Add( 10, 0, 0, wxEXPAND, 5 );
bButtonsSizer->Add( m_NewColorRect, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 5 );
m_colorValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_colorValue->SetMinSize( wxSize( 176,-1 ) );
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL, 5 );
bButtonsSizer->Add( m_colorValue, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
@@ -217,7 +211,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
bButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
bSizerMain->Add( bButtonsSizer, 1, wxEXPAND|wxLEFT, 10 );
bSizerMain->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT, 10 );
this->SetSizer( bSizerMain );
@@ -234,6 +228,7 @@ DIALOG_COLOR_PICKER_BASE::DIALOG_COLOR_PICKER_BASE( wxWindow* parent, wxWindowID
m_spinCtrlBlue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
m_HsvBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
m_HsvBitmap->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
m_HsvBitmap->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
m_spinCtrlHue->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
m_spinCtrlSaturation->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
m_sliderBrightness->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
@@ -268,6 +263,7 @@ DIALOG_COLOR_PICKER_BASE::~DIALOG_COLOR_PICKER_BASE()
m_spinCtrlBlue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditBlue ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseClick ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_COLOR_PICKER_BASE::onHSVMouseDrag ), NULL, this );
m_HsvBitmap->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_COLOR_PICKER_BASE::onSize ), NULL, this );
m_spinCtrlHue->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditHue ), NULL, this );
m_spinCtrlSaturation->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeEditSat ), NULL, this );
m_sliderBrightness->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( DIALOG_COLOR_PICKER_BASE::OnChangeBrightness ), NULL, this );
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -81,6 +81,7 @@ class DIALOG_COLOR_PICKER_BASE : public DIALOG_SHIM
virtual void OnChangeEditBlue( wxSpinEvent& event ) { event.Skip(); }
virtual void onHSVMouseClick( wxMouseEvent& event ) { event.Skip(); }
virtual void onHSVMouseDrag( wxMouseEvent& event ) { event.Skip(); }
virtual void onSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnChangeEditHue( wxSpinEvent& event ) { event.Skip(); }
virtual void OnChangeEditSat( wxSpinEvent& event ) { event.Skip(); }
virtual void OnChangeBrightness( wxScrollEvent& event ) { event.Skip(); }
@@ -26,8 +26,10 @@
#include <bitmaps.h>
#include <confirm.h>
#include <kidialog.h>
#include <validators.h>
#include <dialogs/html_message_box.h>
#include <settings/common_settings.h>
#include <filename_resolver.h>
#include <env_vars.h>
#include <grid_tricks.h>
@@ -17,8 +17,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <wx/statline.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <dialogs/dialog_edit_library_tables.h>
@@ -43,6 +43,9 @@ void DIALOG_EDIT_LIBRARY_TABLES::InstallPanel( wxPanel* aPanel )
auto mainSizer = new wxBoxSizer( wxVERTICAL );
SetSizer( mainSizer );
m_infoBar = new WX_INFOBAR( this );
mainSizer->Add( m_infoBar, 0, wxEXPAND, 0 );
mainSizer->Add( m_contentPanel, 1, wxEXPAND|wxLEFT|wxTOP|wxRIGHT, 5 );
m_contentPanel->SetMinSize( FromDIP( wxSize( 1000, 600 ) ) );
+1 -2
View File
@@ -22,8 +22,7 @@
*/
#include <bitmaps.h>
#include <confirm.h>
#include <wx/textdlg.h>
#include <wx/msgdlg.h>
#include <dialogs/dialog_grid_settings.h>
#include <widgets/std_bitmap_button.h>
#include <common.h>
+1
View File
@@ -23,6 +23,7 @@
#include <dialogs/dialog_hotkey_list.h>
#include <kiface_base.h>
#include <eda_base_frame.h>
#include <panel_hotkeys_editor.h>
#include <widgets/ui_common.h>
+1 -1
View File
@@ -22,7 +22,6 @@
#include <bitmaps.h>
#include <base_screen.h>
#include <common.h> // ExpandEnvVarSubstitutions
#include <confirm.h>
#include <core/arraydim.h>
#include <dialogs/dialog_page_settings.h>
#include <eda_draw_frame.h>
@@ -43,6 +42,7 @@
#include <wx/tokenzr.h>
#include <wx/filedlg.h>
#include <wx/dcmemory.h>
#include <wx/msgdlg.h>
#define MAX_PAGE_EXAMPLE_SIZE 200
+1 -1
View File
@@ -19,10 +19,10 @@
#include <dialogs/dialog_print_generic.h>
#include <confirm.h>
#include <eda_draw_frame.h>
#include <printout.h>
#include <pgm_base.h>
#include <confirm.h>
#include <wx/print.h>
#include <wx/printdlg.h>
+6 -7
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -15,17 +15,16 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
m_mainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerContent;
bSizerContent = new wxBoxSizer( wxVERTICAL );
m_ContentSizer = new wxBoxSizer( wxVERTICAL );
m_label = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_label->Wrap( -1 );
bSizerContent->Add( m_label, 0, wxALL|wxEXPAND, 5 );
m_ContentSizer->Add( m_label, 0, wxALL|wxEXPAND, 5 );
m_textCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_textCtrl->SetMinSize( wxSize( 300,-1 ) );
bSizerContent->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_ContentSizer->Add( m_textCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
@@ -44,10 +43,10 @@ WX_TEXT_ENTRY_DIALOG_BASE::WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindow
bSizer3->Add( m_choice, 3, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bSizerContent->Add( bSizer3, 1, wxEXPAND, 5 );
m_ContentSizer->Add( bSizer3, 1, wxEXPAND, 5 );
m_mainSizer->Add( bSizerContent, 1, wxALL|wxEXPAND, 5 );
m_mainSizer->Add( m_ContentSizer, 1, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
+354 -349
View File
@@ -1,357 +1,362 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<FileVersion major="1" minor="17"/>
<object class="Project" expanded="true">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="disconnect_mode">source_name</property>
<property name="disconnect_php_events">0</property>
<property name="disconnect_python_events">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_text_entry_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_text_entry_base</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="true">
<property name="aui_managed">0</property>
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
<property name="bg"></property>
<property name="center">wxBOTH</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">WX_TEXT_ENTRY_DIALOG_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="wxBoxSizer" expanded="1">
<property name="name">m_ContentSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">public</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="name">m_mainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizerContent</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_label</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="0">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">300,-1</property>
<property name="moveable">1</property>
<property name="name">m_textCtrl</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="label">MyLabel</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choiceLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">3</property>
<object class="wxChoice" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">1</property>
<property name="id">wxID_ANY</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_choice</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="selection">0</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStdDialogButtonSizer" expanded="false">
<property name="Apply">0</property>
<property name="Cancel">1</property>
<property name="ContextHelp">0</property>
<property name="Help">0</property>
<property name="No">0</property>
<property name="OK">1</property>
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="permission">protected</property>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
+2 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-4761b0c5)
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -44,6 +44,7 @@ class WX_TEXT_ENTRY_DIALOG_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1Cancel;
public:
wxBoxSizer* m_ContentSizer;
WX_TEXT_ENTRY_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
@@ -18,6 +18,7 @@
*/
#include <algorithm>
#include <set>
#include <bitmaps.h>
#include <string_utils.h>
#include <dialogs/eda_reorderable_list_dialog.h>
+4
View File
@@ -26,9 +26,13 @@
#include <dialog_shim.h>
#include <git2.h>
#include <vector>
class wxCheckBox;
class wxTextCtrl;
class wxListCtrl;
class wxButton;
class DIALOG_GIT_COMMIT : public DIALOG_SHIM
{
public:
+5 -4
View File
@@ -45,8 +45,7 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
m_tested( 0 ),
m_failedTest( false ),
m_testError( wxEmptyString ),
m_tempRepo( false ),
m_repoType( KIGIT_COMMON::GIT_CONN_TYPE::GIT_CONN_LOCAL )
m_tempRepo( false )
{
m_txtURL->SetFocus();
@@ -56,7 +55,8 @@ DIALOG_GIT_REPOSITORY::DIALOG_GIT_REPOSITORY( wxWindow* aParent, git_repository*
m_tempRepo = true;
m_tempPath = wxFileName::CreateTempFileName( "kicadtestrepo" );
git_repository_init_options options = GIT_REPOSITORY_INIT_OPTIONS_INIT;
git_repository_init_options options;
git_repository_init_init_options( &options, GIT_REPOSITORY_INIT_OPTIONS_VERSION );
options.flags = GIT_REPOSITORY_INIT_MKPATH | GIT_REPOSITORY_INIT_NO_REINIT;
git_repository_init_ext( &m_repository, m_tempPath.ToStdString().c_str(), &options );
}
@@ -260,7 +260,8 @@ void DIALOG_GIT_REPOSITORY::updateURLData()
void DIALOG_GIT_REPOSITORY::OnTestClick( wxCommandEvent& event )
{
git_remote* remote = nullptr;
git_remote_callbacks callbacks = GIT_REMOTE_CALLBACKS_INIT;
git_remote_callbacks callbacks;
git_remote_init_callbacks( &callbacks, GIT_REMOTE_CALLBACKS_VERSION );
// We track if we have already tried to connect.
// If we have, the server may come back to offer another connection
@@ -121,8 +121,6 @@ private:
bool m_tempRepo;
wxString m_tempPath;
KIGIT_COMMON::GIT_CONN_TYPE m_repoType;
};
#endif /* DIALOG_GIT_REPOSITORY_H_ */
+1
View File
@@ -29,6 +29,7 @@
#include <wx/listctrl.h>
#include <wx/event.h>
#include <wx/sizer.h>
#include <wx/timer.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
+1 -1
View File
@@ -26,12 +26,12 @@
#define DIALOG_GIT_SWITCH_H
#include <dialog_shim.h>
#include <wx/timer.h>
#include <git2.h>
class wxButton;
class wxListView;
class wxTextCtrl;
class wxTimer;
class wxListEvent;
struct BranchData
+1
View File
@@ -31,6 +31,7 @@
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/log.h>
PANEL_GIT_REPOS::PANEL_GIT_REPOS( wxWindow* aParent ) : PANEL_GIT_REPOS_BASE( aParent)
+1
View File
@@ -27,6 +27,7 @@
#include <eda_view_switcher_base.h>
class EDA_DRAW_FRAME;
class wxTimer;
/**
* Similar to EDA_VIEW_SWITCHER, this dialog is a popup that shows feedback when using a hotkey to
+2
View File
@@ -27,10 +27,12 @@
#include <settings/common_settings.h>
#include <settings/settings_manager.h>
#include <validators.h>
#include <widgets/ui_common.h>
#include <widgets/color_swatch.h>
#include <widgets/wx_panel.h>
#include <wx/msgdlg.h>
#include <wx/menu.h>
#include <wx/textdlg.h>
// Button ID starting point
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -396,7 +396,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticText9->Wrap( -1 );
m_staticText9->SetToolTip( _("How many backup files total to keep (set to 0 for no limit)") );
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
gbSizer3->Add( m_staticText9, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_backupLimitTotalFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitTotalFiles, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -408,7 +408,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
gbSizer3->Add( m_staticText10, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_backupLimitDailyFiles = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
gbSizer3->Add( m_backupLimitDailyFiles, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("Minimum time between backups:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
@@ -427,7 +427,7 @@ PANEL_COMMON_SETTINGS_BASE::PANEL_COMMON_SETTINGS_BASE( wxWindow* parent, wxWind
m_staticText16->Wrap( -1 );
m_staticText16->SetToolTip( _("If the total size of backup files grows above this limit, old backups will be deleted (set to 0 for no limit)") );
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
gbSizer3->Add( m_staticText16, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_backupLimitTotalSize = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1000, 0 );
gbSizer3->Add( m_backupLimitTotalSize, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
@@ -4036,7 +4036,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="row">2</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="false">
@@ -4232,7 +4232,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="row">3</property>
<property name="rowspan">1</property>
<object class="wxSpinCtrl" expanded="false">
@@ -4494,7 +4494,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="false">
+1 -1
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
+1 -1
View File
@@ -22,12 +22,12 @@
*/
#include <bitmaps.h>
#include <confirm.h>
#include <wx/textdlg.h>
#include <dialogs/panel_grid_settings.h>
#include <dialogs/dialog_grid_settings.h>
#include <widgets/std_bitmap_button.h>
#include <common.h>
#include <confirm.h>
#include <settings/app_settings.h>
#include <eda_draw_frame.h>
#include <tool/tool_manager.h>
+2 -1
View File
@@ -23,11 +23,12 @@
*/
#include <wx/dcclient.h>
#include <confirm.h>
#include <wx/msgdlg.h>
#include <bitmap_base.h>
#include <pcb_base_edit_frame.h>
#include <tool/tool_manager.h>
#include <tool/actions.h>
#include <confirm.h>
#include <dialogs/panel_image_editor.h>
+118 -124
View File
@@ -29,7 +29,6 @@
#include <eda_draw_frame.h>
#include <bitmaps.h>
#include <netclass.h>
#include <confirm.h>
#include <gal/painter.h>
#include <grid_tricks.h>
#include <dialogs/panel_setup_netclasses.h>
@@ -43,6 +42,7 @@
#include <widgets/wx_panel.h>
#include <widgets/std_bitmap_button.h>
#include <project/net_settings.h>
#include <confirm.h>
// columns of netclasses grid
@@ -119,6 +119,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_splitter->SetMinimumPaneSize( FromDIP( m_splitter->GetMinimumPaneSize() ) );
wxASSERT( m_netclassGrid->GetNumberCols() == GRID_END );
// Calculate a min best size to handle longest usual numeric values:
int const min_best_width = m_netclassGrid->GetTextExtent( "555,555555 mils" ).x;
@@ -131,37 +133,25 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
int const weighted_min_best_width = ( i == GRID_LINESTYLE ) ? min_best_width * 3 / 2
: min_best_width;
m_netclassGrid->SetColMinimalWidth( i, min_width );
// We use a "best size" >= min_best_width
m_originalColWidths[ i ] = std::max( min_width, weighted_min_best_width );
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
}
for( int i = GRID_FIRST_PCBNEW; i < GRID_END; ++i )
{
if( i >= GRID_FIRST_EESCHEMA )
{
m_netclassGrid->SetUnitsProvider( m_schUnitsProvider.get(), i );
if( !m_isEEschema )
{
m_netclassGrid->HideCol( i );
m_originalColWidths[ i ] = 0;
}
}
else
{
m_netclassGrid->SetUnitsProvider( m_pcbUnitsProvider.get(), i );
if( m_isEEschema )
{
m_netclassGrid->HideCol( i );
m_originalColWidths[ i ] = 0;
}
}
}
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
if( m_isEEschema )
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.eeschema_visible_columns );
else
m_netclassGrid->ShowHideColumns( cfg->m_NetclassPanel.pcbnew_visible_columns );
m_shownColumns = m_netclassGrid->GetShownColumns();
wxGridCellAttr* attr = new wxGridCellAttr;
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ),
@@ -170,8 +160,8 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
attr = new wxGridCellAttr;
attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) );
attr->SetEditor(
new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) );
attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ),
m_netclassGrid ) );
m_netclassGrid->SetColAttr( GRID_PCB_COLOR, attr );
attr = new wxGridCellAttr;
@@ -218,7 +208,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA
m_netclassGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
m_assignmentGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
m_splitter->SetSashPosition( cfg->m_NetclassPanel.sash_pos );
m_addButton->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
@@ -267,6 +256,11 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
cfg->m_NetclassPanel.sash_pos = m_splitter->GetSashPosition();
if( m_isEEschema )
cfg->m_NetclassPanel.eeschema_visible_columns = m_netclassGrid->GetShownColumnsAsString();
else
cfg->m_NetclassPanel.pcbnew_visible_columns = m_netclassGrid->GetShownColumnsAsString();
// Delete the GRID_TRICKS.
m_netclassGrid->PopEventHandler( true );
m_assignmentGrid->PopEventHandler( true );
@@ -282,6 +276,7 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES()
void PANEL_SETUP_NETCLASSES::loadNetclasses()
{
KIGFX::PCB_RENDER_SETTINGS* rs = nullptr;
if( !m_isEEschema )
{
rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
@@ -290,55 +285,53 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses()
int row = 0;
auto netclassToGridRow = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
lineStyleIdx = 0;
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
if( m_isEEschema )
{
colorAsString = nc->GetPcbColor().ToCSSString();
}
if( rs )
{
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
auto netclassToGridRow =
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
colorAsString = netclassColors[nc->GetName()].ToCSSString();
}
}
m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() );
if( isDefault )
{
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
}
m_netclassGrid->SetUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidth() );
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
};
wxString colorAsString = nc->GetSchematicColor().ToCSSString();
m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString );
int lineStyleIdx = std::max( 0, nc->GetLineStyle() );
if( lineStyleIdx >= (int) g_lineStyleNames.size() )
lineStyleIdx = 0;
m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx] );
m_netclassGrid->SetUnitValue( aRow, GRID_CLEARANCE, nc->GetClearance() );
m_netclassGrid->SetUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameter() );
m_netclassGrid->SetUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrill() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidth() );
m_netclassGrid->SetUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGap() );
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
if( m_isEEschema )
colorAsString = nc->GetPcbColor().ToCSSString();
if( rs )
{
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( netclassColors.find( nc->GetName() ) != netclassColors.end() )
colorAsString = netclassColors[nc->GetName()].ToCSSString();
}
if( isDefault )
{
colorAsString = KIGFX::COLOR4D( 0.0, 0.0, 0.0, 0.0 ).ToCSSString();
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
}
m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString );
};
m_netclassGrid->ClearRows();
@@ -444,56 +437,51 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
int row = 0;
auto gridRowToNetclass = [&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
nc->SetSchematicColor( wxColour( color ) );
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
if( !isDefault )
{
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
KIGFX::COLOR4D newPcbColor( color );
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
auto gridRowToNetclass =
[&]( int aRow, const std::shared_ptr<NETCLASS>& nc, bool isDefault )
{
nc->SetPcbColor( newPcbColor );
}
nc->SetName( m_netclassGrid->GetCellValue( aRow, GRID_NAME ) );
if( !m_isEEschema )
{
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
nc->SetWireWidth( m_netclassGrid->GetUnitValue( aRow, GRID_WIREWIDTH ) );
nc->SetBusWidth( m_netclassGrid->GetUnitValue( aRow, GRID_BUSWIDTH ) );
if( newPcbColor != COLOR4D::UNSPECIFIED )
wxString color = m_netclassGrid->GetCellValue( aRow, GRID_SCHEMATIC_COLOR );
nc->SetSchematicColor( wxColour( color ) );
wxString lineStyle = m_netclassGrid->GetCellValue( aRow, GRID_LINESTYLE );
nc->SetLineStyle( g_lineStyleNames.Index( lineStyle ) );
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
nc->SetClearance( m_netclassGrid->GetUnitValue( aRow, GRID_CLEARANCE ) );
nc->SetTrackWidth( m_netclassGrid->GetUnitValue( aRow, GRID_TRACKSIZE ) );
nc->SetViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_VIASIZE ) );
nc->SetViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_VIADRILL ) );
nc->SetuViaDiameter( m_netclassGrid->GetUnitValue( aRow, GRID_uVIASIZE ) );
nc->SetuViaDrill( m_netclassGrid->GetUnitValue( aRow, GRID_uVIADRILL ) );
nc->SetDiffPairWidth( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_WIDTH ) );
nc->SetDiffPairGap( m_netclassGrid->GetUnitValue( aRow, GRID_DIFF_PAIR_GAP ) );
if( !isDefault )
{
netclassColors[nc->GetName()] = newPcbColor;
color = m_netclassGrid->GetCellValue( aRow, GRID_PCB_COLOR );
KIGFX::COLOR4D newPcbColor( color );
if( newPcbColor != KIGFX::COLOR4D::UNSPECIFIED )
nc->SetPcbColor( newPcbColor );
if( !m_isEEschema )
{
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
m_frame->GetCanvas()->GetView()->GetPainter()->GetSettings() );
std::map<wxString, KIGFX::COLOR4D>& netclassColors = rs->GetNetclassColorMap();
if( newPcbColor != COLOR4D::UNSPECIFIED )
netclassColors[nc->GetName()] = newPcbColor;
else
netclassColors.erase( nc->GetName() );
}
}
else
{
netclassColors.erase( nc->GetName() );
}
}
}
};
};
m_netSettings->m_NetClasses.clear();
@@ -516,14 +504,11 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
wxString netclass = m_assignmentGrid->GetCellValue( row, 1 );
m_netSettings->m_NetClassPatternAssignments.push_back(
{
std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ),
netclass
} );
m_netSettings->m_NetClassPatternAssignmentCache.clear();
{ std::make_unique<EDA_COMBINED_MATCHER>( pattern, CTX_NETCLASS ), netclass } );
}
m_netSettings->m_NetClassPatternAssignmentCache.clear();
return true;
}
@@ -707,8 +692,11 @@ void PANEL_SETUP_NETCLASSES::AdjustNetclassGridColumns( int aWidth )
for( int i = 1; i < m_netclassGrid->GetNumberCols(); i++ )
{
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
aWidth -= m_originalColWidths[ i ];
if( m_netclassGrid->GetColSize( i ) > 0 )
{
m_netclassGrid->SetColSize( i, m_originalColWidths[ i ] );
aWidth -= m_originalColWidths[ i ];
}
}
m_netclassGrid->SetColSize( 0, std::max( aWidth - 2, m_originalColWidths[ 0 ] ) );
@@ -806,6 +794,12 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event )
m_netclassesDirty = false;
}
if( m_shownColumns != m_netclassGrid->GetShownColumns() )
{
AdjustNetclassGridColumns( GetSize().x - 1 );
m_shownColumns = m_netclassGrid->GetShownColumns();
}
if( m_assignmentGrid->GetNumberRows() == 0 )
return;
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -89,16 +89,17 @@ PANEL_SETUP_NETCLASSES_BASE::PANEL_SETUP_NETCLASSES_BASE( wxWindow* parent, wxWi
m_removeButton = new STD_BITMAP_BUTTON( m_netclassesPane, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
buttonBoxSizer->Add( m_removeButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
buttonBoxSizer->Add( 60, 0, 1, wxEXPAND, 5 );
m_colorDefaultHelpText = new wxStaticText( m_netclassesPane, wxID_ANY, _("Set color to transparent to use KiCad default color."), wxDefaultPosition, wxDefaultSize, 0 );
m_colorDefaultHelpText->Wrap( -1 );
buttonBoxSizer->Add( m_colorDefaultHelpText, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic") );
m_importColorsButton = new wxButton( m_netclassesPane, wxID_ANY, _("Import colors from schematic"), wxDefaultPosition, wxDefaultSize, 0 );
buttonBoxSizer->Add( m_importColorsButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
bUpperSizer->Add( buttonBoxSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.1.0-3-g43bf300c)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -48,8 +48,8 @@ class PANEL_SETUP_NETCLASSES_BASE : public wxPanel
WX_GRID* m_netclassGrid;
STD_BITMAP_BUTTON* m_addButton;
STD_BITMAP_BUTTON* m_removeButton;
wxButton* m_importColorsButton;
wxStaticText* m_colorDefaultHelpText;
wxButton* m_importColorsButton;
WX_PANEL* m_membershipPane;
wxStaticText* m_staticText5;
WX_GRID* m_assignmentGrid;
@@ -27,6 +27,7 @@
#include <dialogs/panel_setup_severities.h>
#include <wx/radiobut.h>
#include <wx/scrolwin.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include "confirm.h"
+6 -5
View File
@@ -51,7 +51,7 @@ const wxChar* const traceHiDpi = wxT( "KICAD_TRACE_HIGH_DPI" );
static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aConfig )
{
std::optional<double> scale;
double canvas_scale = aConfig.m_Appearance.canvas_scale;
double canvas_scale = aConfig.m_Appearance.canvas_scale;
if( canvas_scale > 0.0 )
{
@@ -70,8 +70,8 @@ static std::optional<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aCo
*/
static std::optional<double> getEnvironmentScale()
{
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
std::optional<double> scale;
const wxPortId port_id = wxPlatformInfo::Get().GetPortId();
std::optional<double> scale;
if( port_id == wxPORT_GTK )
{
@@ -83,8 +83,9 @@ static std::optional<double> getEnvironmentScale()
}
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow )
: m_config( aConfig ), m_window( aWindow )
DPI_SCALING_COMMON::DPI_SCALING_COMMON( COMMON_SETTINGS* aConfig, const wxWindow* aWindow ) :
m_config( aConfig ),
m_window( aWindow )
{
}
+39 -21
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2017 CERN
* Copyright (C) 2013-2023 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2024, 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
* @author Maciej Suminski <maciej.suminski@cern.ch>
@@ -24,7 +24,6 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <confirm.h>
#include <eda_draw_frame.h>
#include <kiface_base.h>
#include <macros.h>
@@ -54,6 +53,16 @@
#include <core/profile.h>
#include <pgm_base.h>
#include <confirm.h>
/**
* Flag to enable drawing panel debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceDrawPanel[] = wxT( "KICAD_DRAW_PANEL" );
EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId,
const wxPoint& aPosition, const wxSize& aSize,
@@ -177,6 +186,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
void EDA_DRAW_PANEL_GAL::SetFocus()
{
KIPLATFORM::UI::ImeNotifyCancelComposition( this );
wxScrolledCanvas::SetFocus();
m_lostFocus = false;
}
@@ -236,6 +246,7 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
bool isDirty = false;
cntTotal.Start();
try
{
cntUpd.Start();
@@ -248,9 +259,7 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
{
// Don't do anything here but don't fail
// This can happen when we don't catch `at()` calls
wxString msg;
msg.Printf( wxT( "Out of Range error: %s" ), err.what() );
wxLogDebug( msg );
wxLogTrace( traceDrawPanel, wxS( "Out of Range error: %s" ), err.what() );
}
cntUpd.Stop();
@@ -272,20 +281,10 @@ bool EDA_DRAW_PANEL_GAL::DoRePaint()
m_gal->SetGridColor( settings->GetGridColor() );
m_gal->SetCursorColor( settings->GetCursorColor() );
// TODO: find why ClearScreen() must be called here in opengl mode
// and only if m_view->IsDirty() in Cairo mode to avoid display artifacts
// when moving the mouse cursor
if( m_backend == GAL_TYPE_OPENGL )
m_gal->ClearScreen();
m_gal->ClearScreen();
if( m_view->IsDirty() )
{
if( m_backend != GAL_TYPE_OPENGL // Already called in opengl
&& m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) )
{
m_gal->ClearScreen();
}
m_view->ClearTargets();
// Grid has to be redrawn only when the NONCACHED target is redrawn
@@ -382,10 +381,16 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
}
void EDA_DRAW_PANEL_GAL::RequestRefresh()
{
m_needIdleRefresh = true;
}
void EDA_DRAW_PANEL_GAL::Refresh( bool aEraseBackground, const wxRect* aRect )
{
if( !DoRePaint() )
m_needIdleRefresh = true;
RequestRefresh();
}
@@ -589,7 +594,7 @@ void EDA_DRAW_PANEL_GAL::OnEvent( wxEvent& aEvent )
if( endDelta > timeLimit )
Refresh();
else
m_needIdleRefresh = true;
RequestRefresh();
}
@@ -648,8 +653,21 @@ void EDA_DRAW_PANEL_GAL::onShowTimer( wxTimerEvent& aEvent )
void EDA_DRAW_PANEL_GAL::SetCurrentCursor( KICURSOR aCursor )
{
if( m_gal )
m_gal->SetNativeCursorStyle( aCursor );
if( !m_gal )
return;
DPI_SCALING_COMMON dpi( nullptr, m_parent );
bool hidpi = false;
// Cursor scaling factor cannot be set for a wxCursor on GTK and OSX (at least before wx 3.3),
// resulting in 4x rendered size on 2x window scale.
// MSW renders the bitmap as-is, without scaling, so this works here.
#ifdef __WXMSW__
hidpi = dpi.GetContentScaleFactor() >= 2.0;
#endif
m_gal->SetNativeCursorStyle( aCursor, hidpi );
}
@@ -697,4 +715,4 @@ KIGFX::VC_SETTINGS EDA_DRAW_PANEL_GAL::GetVcSettings()
vcSettings.m_scrollReversePanH = cfg->m_Input.reverse_scroll_pan_h;
return vcSettings;
}
}
+29
View File
@@ -681,6 +681,35 @@ void DS_DATA_ITEM_TEXT::SetConstrainedTextSize()
if( m_ConstrainedTextSize.y == 0 )
m_ConstrainedTextSize.y = DS_DATA_MODEL::GetTheInstance().m_DefaultTextSize.y;
if( m_BoundingBoxSize.x > 0 || m_BoundingBoxSize.y > 0 )
{
// to know the X and Y size of the line, we should use EDA_TEXT::GetTextBox()
// but this function uses integers
// So, to avoid truncations with our unit in mm, use microns.
VECTOR2I size_micron;
#define FSCALE 1000.0
int linewidth = 0;
size_micron.x = KiROUND( m_ConstrainedTextSize.x * FSCALE );
size_micron.y = KiROUND( m_ConstrainedTextSize.y * FSCALE );
DS_DRAW_ITEM_TEXT dummy( unityScale, this, 0, m_FullText, VECTOR2I( 0, 0 ), size_micron,
linewidth, m_Font, m_Italic, m_Bold, m_TextColor );
dummy.SetMultilineAllowed( true );
dummy.SetHorizJustify( m_Hjustify ) ;
dummy.SetVertJustify( m_Vjustify );
dummy.SetTextAngle( EDA_ANGLE( m_Orient, DEGREES_T ) );
BOX2I rect = dummy.GetTextBox();
VECTOR2D size;
size.x = KiROUND( (int) rect.GetWidth() / FSCALE );
size.y = KiROUND( (int) rect.GetHeight() / FSCALE );
if( m_BoundingBoxSize.x > 0 && size.x > m_BoundingBoxSize.x )
m_ConstrainedTextSize.x *= m_BoundingBoxSize.x / size.x;
if( m_BoundingBoxSize.y > 0 && size.y > m_BoundingBoxSize.y )
m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y;
}
}
+12 -9
View File
@@ -191,14 +191,14 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
const wxString text = GetShownText( true );
BOX2I bbox( GetTextPos() );
bbox.SetWidth( (int) text.length() * attrs.m_Size.x * 1.3 );
bbox.SetWidth( KiROUND( (int) text.length() * attrs.m_Size.x * 1.3 ) );
bbox.SetHeight( attrs.m_Size.y );
switch( attrs.m_Halign )
{
case GR_TEXT_H_ALIGN_LEFT: break;
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( -bbox.GetWidth() / 2, 0 ); break;
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( -bbox.GetWidth(), 0 ); break;
case GR_TEXT_H_ALIGN_LEFT: break;
case GR_TEXT_H_ALIGN_CENTER: bbox.Offset( - (int) bbox.GetWidth() / 2, 0 ); break;
case GR_TEXT_H_ALIGN_RIGHT: bbox.Offset( - (int) bbox.GetWidth(), 0 ); break;
case GR_TEXT_H_ALIGN_INDETERMINATE:
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
break;
@@ -206,9 +206,9 @@ const BOX2I DS_DRAW_ITEM_TEXT::GetApproxBBox()
switch( GetAttributes().m_Valign )
{
case GR_TEXT_V_ALIGN_TOP: break;
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, -bbox.GetHeight() / 2 ); break;
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, -bbox.GetHeight() ); break;
case GR_TEXT_V_ALIGN_TOP: break;
case GR_TEXT_V_ALIGN_CENTER: bbox.Offset( 0, - (int) bbox.GetHeight() / 2 ); break;
case GR_TEXT_V_ALIGN_BOTTOM: bbox.Offset( 0, - (int) bbox.GetHeight() ); break;
case GR_TEXT_V_ALIGN_INDETERMINATE:
wxFAIL_MSG( wxT( "Indeterminate state legal only in dialogs." ) );
break;
@@ -265,7 +265,7 @@ void DS_DRAW_ITEM_POLYPOLYGONS::PrintWsItem( const RENDER_SETTINGS* aSettings,
outline.CPoint( ii ).y + aOffset.y );
}
GRPoly( DC, points_moved.size(), &points_moved[0], true, penWidth, color, color );
GRPoly( DC, (int) points_moved.size(), &points_moved[0], true, penWidth, color, color );
}
}
@@ -371,18 +371,21 @@ bool DS_DRAW_ITEM_RECT::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
// Right line
start = end;
end.y = GetEnd().y;
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
// lower line
start = end;
end.x = GetStart().x;
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
// left line
start = end;
end = GetStart();
if( TestSegmentHit( aPosition, start, end, dist ) )
return true;
@@ -464,7 +467,7 @@ bool DS_DRAW_ITEM_LINE::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
wxString DS_DRAW_ITEM_LINE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Line, length %s" ),
aUnitsProvider->MessageTextFromValue( EuclideanNorm( GetStart() - GetEnd() ) ) );
aUnitsProvider->MessageTextFromValue( GetStart().Distance( GetEnd() ) ) );
}
+1 -1
View File
@@ -104,7 +104,7 @@ void DS_PROXY_VIEW_ITEM::ViewDraw( int aLayer, VIEW* aView ) const
buildDrawList( aView, m_properties, &drawList );
BOX2I viewport( aView->GetViewport().GetOrigin(), aView->GetViewport().GetSize() );
BOX2I viewport = BOX2ISafe( aView->GetViewport() );
// Draw the title block normally even if the view is flipped
bool flipped = gal->IsFlippedX();
+4 -1
View File
@@ -24,6 +24,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <eda_base_frame.h>
#include <advanced_config.h>
#include <bitmaps.h>
#include <bitmap_store.h>
@@ -66,6 +68,7 @@
#include <wx/display.h>
#include <wx/stdpaths.h>
#include <wx/string.h>
#include <wx/msgdlg.h>
#include <kiplatform/app.h>
#include <kiplatform/io.h>
#include <kiplatform/ui.h>
@@ -1608,7 +1611,7 @@ void EDA_BASE_FRAME::onIconize( wxIconizeEvent& aEvent )
}
#ifdef _WIN32
#ifdef __WXMSW__
WXLRESULT EDA_BASE_FRAME::MSWWindowProc( WXUINT message, WXWPARAM wParam, WXLPARAM lParam )
{
// This will help avoid the menu keeping focus when the alt key is released
+9 -19
View File
@@ -28,10 +28,11 @@
#include <gestfich.h>
#include <settings/common_settings.h>
#include <wx/mimetype.h>
#include <wx/filename.h>
#include <wx/uri.h>
#include <wx/filedlg.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/mimetype.h>
#include <wx/uri.h>
// Mime type extensions (PDF files are not considered here)
@@ -65,27 +66,16 @@ bool GetAssociatedDocument( wxWindow* aParent, const wxString& aDocName, PROJECT
wxString command;
bool success = false;
// Is an internet url
static const std::vector<wxString> url_header =
{
wxT( "http:" ),
wxT( "https:" ),
wxT( "ftp:" ),
wxT( "www." ),
wxT( "file:" )
};
// Replace before resolving as we might have a URL in a variable
docname = ResolveUriByEnvVars( aDocName, aProject );
for( const wxString& proc : url_header)
// We don't want the wx error message about not being able to open the URI
{
if( docname.StartsWith( proc ) ) // looks like an internet url
{
wxURI uri( docname );
wxLaunchDefaultBrowser( uri.BuildURI() );
wxURI uri( docname );
wxLogNull logNo; // Disable log messages
if( uri.HasScheme() && wxLaunchDefaultBrowser( docname ) )
return true;
}
}
#ifdef __WINDOWS__
+56 -45
View File
@@ -61,6 +61,7 @@
#include <trace_helpers.h>
#include <view/view.h>
#include <drawing_sheet/ds_draw_item.h>
#include <view/view_controls.h>
#include <widgets/msgpanel.h>
#include <widgets/properties_panel.h>
#include <widgets/net_inspector_panel.h>
@@ -117,7 +118,6 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
m_drawBgColor = COLOR4D( BLACK ); // the background color of the draw canvas:
// BLACK for Pcbnew, BLACK or WHITE for Eeschema
m_colorSettings = nullptr;
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
m_polarCoords = false;
m_findReplaceData = std::make_unique<EDA_SEARCH_DATA>();
m_hotkeyPopup = nullptr;
@@ -132,61 +132,29 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
{
CreateStatusBar( 8 )->SetDoubleBuffered( true );
// set the size of the status bar subwindows:
GetStatusBar()->SetFont( KIUI::GetStatusFont( this ) );
wxWindow* stsbar = GetStatusBar();
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
int dims[] =
{
// remainder of status bar on far left is set to a default or whatever is left over.
-1,
// When using GetTextSize() remember the width of character '1' is not the same
// as the width of '0' unless the font is fixed width, and it usually won't be.
// zoom:
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
// cursor coords
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
// delta distances
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
// grid size
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
// units display, Inches is bigger than mm
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
// Size for the "Current Tool" panel; longest string from SetTool()
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
// constraint mode
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
};
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
dims[ii] += spacer;
SetStatusWidths( arrayDim( dims ), dims );
stsbar->SetFont( KIUI::GetStatusFont( this ) );
// set the size of the status bar subwindows:
updateStatusBarWidths();
}
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ), wxDefaultSize );
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
// Create child subwindows.
GetClientSize( &m_frameSize.x, &m_frameSize.y );
m_framePos.x = m_framePos.y = 0;
m_frameSize.y -= m_msgFrameHeight;
m_messagePanel = new EDA_MSG_PANEL( this, -1, wxPoint( 0, m_frameSize.y ),
wxSize( m_frameSize.x, m_msgFrameHeight ) );
m_messagePanel->SetBackgroundColour( COLOR4D( LIGHTGRAY ).ToColour() );
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
Bind( wxEVT_DPI_CHANGED,
[&]( wxDPIChangedEvent& )
{
if( ( GetWindowStyle() & wxFRAME_NO_TASKBAR ) == 0 )
updateStatusBarWidths();
wxMoveEvent dummy;
OnMove( dummy );
@@ -194,11 +162,13 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame
// especially important even for first launches as the constructor of the window
// here usually doesn't have the correct dpi awareness yet
m_frameSize.y += m_msgFrameHeight;
m_msgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight( this );
m_msgFrameHeight = m_messagePanel->GetBestSize().y;
m_frameSize.y -= m_msgFrameHeight;
m_messagePanel->SetPosition( wxPoint( 0, m_frameSize.y ) );
m_messagePanel->SetSize( m_frameSize.x, m_msgFrameHeight );
// Don't skip, otherwise the frame gets too big
} );
}
@@ -687,6 +657,47 @@ void EDA_DRAW_FRAME::OnSize( wxSizeEvent& SizeEv )
}
void EDA_DRAW_FRAME::updateStatusBarWidths()
{
wxWindow* stsbar = GetStatusBar();
int spacer = KIUI::GetTextSize( wxT( "M" ), stsbar ).x * 2;
int dims[] = {
// remainder of status bar on far left is set to a default or whatever is left over.
-1,
// When using GetTextSize() remember the width of character '1' is not the same
// as the width of '0' unless the font is fixed width, and it usually won't be.
// zoom:
KIUI::GetTextSize( wxT( "Z 762000" ), stsbar ).x,
// cursor coords
KIUI::GetTextSize( wxT( "X 1234.1234 Y 1234.1234" ), stsbar ).x,
// delta distances
KIUI::GetTextSize( wxT( "dx 1234.1234 dy 1234.1234 dist 1234.1234" ), stsbar ).x,
// grid size
KIUI::GetTextSize( wxT( "grid X 1234.1234 Y 1234.1234" ), stsbar ).x,
// units display, Inches is bigger than mm
KIUI::GetTextSize( _( "Inches" ), stsbar ).x,
// Size for the "Current Tool" panel; longest string from SetTool()
KIUI::GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x,
// constraint mode
KIUI::GetTextSize( _( "Constrain to H, V, 45" ), stsbar ).x
};
for( size_t ii = 1; ii < arrayDim( dims ); ii++ )
dims[ii] += spacer;
SetStatusWidths( arrayDim( dims ), dims );
}
void EDA_DRAW_FRAME::UpdateStatusBar()
{
SetStatusText( GetZoomLevelIndicator(), 1 );
+1
View File
@@ -374,6 +374,7 @@ static struct EDA_ITEM_DESC
.Map( SCH_LINE_T, _HKI( "Line" ) )
.Map( SCH_BITMAP_T, _HKI( "Bitmap" ) )
.Map( SCH_SHAPE_T, _HKI( "Graphic" ) )
.Map( SCH_RULE_AREA_T, _HKI( "Rule Area" ) )
.Map( SCH_TEXT_T, _HKI( "Text" ) )
.Map( SCH_TEXTBOX_T, _HKI( "Text Box" ) )
.Map( SCH_TABLE_T, _HKI( "Table" ) )
+6
View File
@@ -401,6 +401,12 @@ EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern,
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NET:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_SUBSTR>() );
break;
case CTX_NETCLASS:
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_REGEX_ANCHORED>() );
AddMatcher( aPattern, std::make_unique<EDA_PATTERN_MATCH_WILDCARD_ANCHORED>() );
+78 -33
View File
@@ -25,6 +25,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <eda_shape.h>
#include <bezier_curves.h>
#include <convert_basic_shapes_to_polygon.h>
#include <eda_draw_frame.h>
@@ -33,7 +35,7 @@
#include <geometry/shape_circle.h>
#include <macros.h>
#include <math/util.h> // for KiROUND
#include <eda_shape.h>
#include <eda_item.h>
#include <plotters/plotter.h>
@@ -126,12 +128,12 @@ double EDA_SHAPE::GetLength() const
{
case SHAPE_T::BEZIER:
for( size_t ii = 1; ii < m_bezierPoints.size(); ++ii )
length += GetLineLength( m_bezierPoints[ ii - 1], m_bezierPoints[ii] );
length += m_bezierPoints[ ii - 1].Distance( m_bezierPoints[ii] );
return length;
case SHAPE_T::SEGMENT:
return GetLineLength( GetStart(), GetEnd() );
return GetStart().Distance( GetEnd() );
case SHAPE_T::POLY:
for( int ii = 0; ii < m_poly.COutline( 0 ).SegmentCount(); ii++ )
@@ -183,6 +185,32 @@ void EDA_SHAPE::SetLength( const double& aLength )
}
}
void EDA_SHAPE::SetRectangleHeight( const int& aHeight )
{
switch ( m_shape )
{
case SHAPE_T::RECTANGLE:
m_rectangleHeight = aHeight;
SetEndY( GetStartY() + m_rectangleHeight );
break;
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
}
}
void EDA_SHAPE::SetRectangleWidth( const int& aWidth )
{
switch ( m_shape )
{
case SHAPE_T::RECTANGLE:
m_rectangleWidth = aWidth;
SetEndX( GetStartX() + m_rectangleWidth );
break;
default: UNIMPLEMENTED_FOR( SHAPE_T_asString() );
}
}
void EDA_SHAPE::SetRectangle( const long long int& aHeight, const long long int& aWidth )
{
switch ( m_shape )
@@ -595,11 +623,11 @@ int EDA_SHAPE::GetRadius() const
switch( m_shape )
{
case SHAPE_T::ARC:
radius = GetLineLength( m_arcCenter, m_start );
radius = m_arcCenter.Distance( m_start );
break;
case SHAPE_T::CIRCLE:
radius = GetLineLength( m_start, m_end );
radius = m_start.Distance( m_end );
break;
default:
@@ -768,7 +796,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
case SHAPE_T::SEGMENT:
{
aList.emplace_back( _( "Length" ),
aFrame->MessageTextFromValue( GetLineLength( GetStart(), GetEnd() ) ));
aFrame->MessageTextFromValue( GetStart().Distance( GetEnd() ) ));
// angle counter-clockwise from 3'o-clock
EDA_ANGLE angle( atan2( (double)( GetStart().y - GetEnd().y ),
@@ -841,21 +869,19 @@ const BOX2I EDA_SHAPE::getBoundingBox() const
bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
{
int maxdist = aAccuracy;
double maxdist = aAccuracy;
if( GetWidth() > 0 )
maxdist += GetWidth() / 2;
maxdist += GetWidth() / 2.0;
switch( m_shape )
{
case SHAPE_T::CIRCLE:
{
int radius = GetRadius();
double radius = GetRadius();
double dist = aPosition.Distance( getCenter() );
VECTOR2I::extended_type dist = KiROUND<double, VECTOR2I::extended_type>(
EuclideanNorm( aPosition - getCenter() ) );
if( IsFilled() )
if( IsFilledForHitTesting() )
return dist <= radius + maxdist; // Filled circle hit-test
else
return abs( radius - dist ) <= maxdist; // Ring hit-test
@@ -863,19 +889,17 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
case SHAPE_T::ARC:
{
if( EuclideanNorm( aPosition - m_start ) <= maxdist )
if( aPosition.Distance( m_start ) <= maxdist )
return true;
if( EuclideanNorm( aPosition - m_end ) <= maxdist )
if( aPosition.Distance( m_end ) <= maxdist )
return true;
VECTOR2I relPos = aPosition - getCenter();
int radius = GetRadius();
double radius = GetRadius();
VECTOR2D relPos( VECTOR2D( aPosition ) - getCenter() );
double dist = relPos.EuclideanNorm();
VECTOR2I::extended_type dist =
KiROUND<double, VECTOR2I::extended_type>( EuclideanNorm( relPos ) );
if( IsFilled() )
if( IsFilledForHitTesting() )
{
// Check distance from arc center
if( dist > radius + maxdist )
@@ -920,7 +944,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
return TestSegmentHit( aPosition, GetStart(), GetEnd(), maxdist );
case SHAPE_T::RECTANGLE:
if( IsProxyItem() || IsFilled() ) // Filled rect hit-test
if( IsProxyItem() || IsFilledForHitTesting() ) // Filled rect hit-test
{
SHAPE_POLY_SET poly;
poly.NewOutline();
@@ -941,7 +965,7 @@ bool EDA_SHAPE::hitTest( const VECTOR2I& aPosition, int aAccuracy ) const
}
case SHAPE_T::POLY:
if( IsFilled() )
if( IsFilledForHitTesting() )
{
if( !m_poly.COutline( 0 ).IsClosed() )
{
@@ -1463,14 +1487,14 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 1:
m_end = aPosition;
radius = sqrt( sq( GetLineLength( m_start, m_end ) ) / 2.0 );
radius = m_start.Distance( m_end ) * M_SQRT1_2;
break;
case 2:
case 3:
{
VECTOR2I v = m_start - m_end;
double chordBefore = sq( v.x ) + sq( v.y );
double chordBefore = v.SquaredEuclideanNorm();
if( m_editState == 2 )
m_start = aPosition;
@@ -1479,7 +1503,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
v = m_start - m_end;
double chordAfter = sq( v.x ) + sq( v.y );
double chordAfter = v.SquaredEuclideanNorm();
double ratio = 0.0;
if( chordBefore > 0 )
@@ -1492,8 +1516,8 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 4:
{
double radialA = GetLineLength( m_start, aPosition );
double radialB = GetLineLength( m_end, aPosition );
double radialA = m_start.Distance( aPosition );
double radialB = m_end.Distance( aPosition );
radius = ( radialA + radialB ) / 2.0;
}
break;
@@ -1506,9 +1530,9 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
// Calculate center based on start, end, and radius
//
// Let 'l' be the length of the chord and 'm' the middle point of the chord
double l = GetLineLength( m_start, m_end );
double l = m_start.Distance( m_end );
VECTOR2D m = ( m_start + m_end ) / 2;
double sqRadDiff = sq( radius ) - sq( l / 2 );
double sqRadDiff = ( radius * radius ) - ( l * l ) / 4.0;
// Calculate 'd', the vector from the chord midpoint to the center
VECTOR2D d;
@@ -1547,7 +1571,7 @@ void EDA_SHAPE::calcEdit( const VECTOR2I& aPosition )
case 4:
// Pick the one closer to the mouse position
m_arcCenter = GetLineLength( c1, aPosition ) < GetLineLength( c2, aPosition ) ? c1 : c2;
m_arcCenter = c1.Distance( aPosition ) < c2.Distance( aPosition ) ? c1 : c2;
break;
}
}
@@ -1970,6 +1994,15 @@ static struct EDA_SHAPE_DESC
return false;
};
auto isRectangle = []( INSPECTABLE* aItem ) -> bool
{
// Polygons, unlike other shapes, have no meaningful start or end coordinates
if( EDA_SHAPE* shape = dynamic_cast<EDA_SHAPE*>( aItem ) )
return shape->GetShape() == SHAPE_T::RECTANGLE;
return false;
};
const wxString shapeProps = _HKI( "Shape Properties" );
auto shape = new PROPERTY_ENUM<EDA_SHAPE, SHAPE_T>( _HKI( "Shape" ),
@@ -1988,13 +2021,13 @@ static struct EDA_SHAPE_DESC
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center X" ),
&EDA_SHAPE::SetStartX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
&EDA_SHAPE::SetCenterX, &EDA_SHAPE::GetStartX, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_X_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Center Y" ),
&EDA_SHAPE::SetStartY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
&EDA_SHAPE::SetCenterY, &EDA_SHAPE::GetStartY, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isCircle );
@@ -2017,6 +2050,18 @@ static struct EDA_SHAPE_DESC
shapeProps )
.SetAvailableFunc( isNotPolygonOrCircle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Width" ),
&EDA_SHAPE::SetRectangleWidth, &EDA_SHAPE::GetRectangleWidth, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isRectangle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Height" ),
&EDA_SHAPE::SetRectangleHeight, &EDA_SHAPE::GetRectangleHeight, PROPERTY_DISPLAY::PT_COORD,
ORIGIN_TRANSFORMS::ABS_Y_COORD ),
shapeProps )
.SetAvailableFunc( isRectangle );
propMgr.AddProperty( new PROPERTY<EDA_SHAPE, int>( _HKI( "Line Width" ),
&EDA_SHAPE::SetWidth, &EDA_SHAPE::GetWidth, PROPERTY_DISPLAY::PT_SIZE ),
shapeProps );
+26 -17
View File
@@ -542,10 +542,13 @@ EDA_TEXT::GetRenderCache( const KIFONT::FONT* aFont, const wxString& forResolved
}
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE& aAngle )
void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const KIFONT::FONT* aFont,
const EDA_ANGLE& aAngle, const VECTOR2I& aOffset )
{
m_render_cache_text = aResolvedText;
m_render_cache_font = aFont;
m_render_cache_angle = aAngle;
m_render_cache_offset = aOffset;
m_render_cache.clear();
}
@@ -553,6 +556,7 @@ void EDA_TEXT::SetupRenderCache( const wxString& aResolvedText, const EDA_ANGLE&
void EDA_TEXT::AddRenderCacheGlyph( const SHAPE_POLY_SET& aPoly )
{
m_render_cache.emplace_back( std::make_unique<KIFONT::OUTLINE_GLYPH>( aPoly ) );
static_cast<KIFONT::OUTLINE_GLYPH*>( m_render_cache.back().get() )->CacheTriangulation();
}
@@ -1083,16 +1087,9 @@ bool EDA_TEXT::ValidateHyperlink( const wxString& aURL )
if( aURL.IsEmpty() || IsGotoPageHref( aURL ) )
return true;
// Limit valid urls to file, http and https for now. Note wxURL doesn't support https
wxURI uri;
if( uri.Create( aURL ) && uri.HasScheme() )
{
const wxString& scheme = uri.GetScheme();
return scheme == wxT( "file" ) || scheme == wxT( "http" ) || scheme == wxT( "https" );
}
return false;
return( uri.Create( aURL ) && uri.HasScheme() );
}
double EDA_TEXT::Levenshtein( const EDA_TEXT& aOther ) const
@@ -1181,14 +1178,26 @@ static struct EDA_TEXT_DESC
{
EDA_TEXT_DESC()
{
ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance()
.Map( GR_TEXT_H_ALIGN_LEFT, _HKI( "Left" ) )
.Map( GR_TEXT_H_ALIGN_CENTER, _HKI( "Center" ) )
.Map( GR_TEXT_H_ALIGN_RIGHT, _HKI( "Right" ) );
ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance()
.Map( GR_TEXT_V_ALIGN_TOP, _HKI( "Top" ) )
.Map( GR_TEXT_V_ALIGN_CENTER, _HKI( "Center" ) )
.Map( GR_TEXT_V_ALIGN_BOTTOM, _HKI( "Bottom" ) );
// These are defined in SCH_FIELD as well but initialization order is
// not defined, so this needs to be conditional. Defining in both
// places leads to duplicate symbols.
auto& h_inst = ENUM_MAP<GR_TEXT_H_ALIGN_T>::Instance();
if( h_inst.Choices().GetCount() == 0)
{
h_inst.Map( GR_TEXT_H_ALIGN_LEFT, _( "Left" ) );
h_inst.Map( GR_TEXT_H_ALIGN_CENTER, _( "Center" ) );
h_inst.Map( GR_TEXT_H_ALIGN_RIGHT, _( "Right" ) );
}
auto& v_inst = ENUM_MAP<GR_TEXT_V_ALIGN_T>::Instance();
if( v_inst.Choices().GetCount() == 0)
{
v_inst.Map( GR_TEXT_V_ALIGN_TOP, _( "Top" ) );
v_inst.Map( GR_TEXT_V_ALIGN_CENTER, _( "Center" ) );
v_inst.Map( GR_TEXT_V_ALIGN_BOTTOM, _( "Bottom" ) );
}
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
REGISTER_TYPE( EDA_TEXT );
+4 -7
View File
@@ -335,6 +335,10 @@ wxString EDA_UNIT_UTILS::UI::StringFromValue( const EDA_IU_SCALE& aIuScale, EDA_
format = is_eeschema ? wxT( "%.6f" ) : wxT( "%.8f" );
break;
case EDA_UNITS::DEGREES:
format = wxT( "%.4f" );
break;
default:
format = wxT( "%.10f" );
break;
@@ -464,13 +468,6 @@ wxString EDA_UNIT_UTILS::UI::MessageTextFromValue( const EDA_IU_SCALE& aIuScale,
}
text.Printf( format, value );
removeTrailingZeros( text );
if( value != 0.0 && ( text == wxS( "0" ) || text == wxS( "-0" ) ) )
{
text.Printf( wxS( "%.10f" ), value );
removeTrailingZeros( text );
}
if( aAddUnitsText )
text += EDA_UNIT_UTILS::GetText( aUnits, aType );
+4 -2
View File
@@ -259,6 +259,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphs( BOX2I* aBBox, std::vector<std::unique_pt
struct GLYPH_CACHE_KEY {
FT_Face face;
hb_codepoint_t codepoint;
double scaler;
bool fakeItalic;
bool fakeBold;
bool mirror;
@@ -266,7 +267,7 @@ struct GLYPH_CACHE_KEY {
bool operator==(const GLYPH_CACHE_KEY& rhs ) const
{
return face == rhs.face && codepoint == rhs.codepoint
return face == rhs.face && codepoint == rhs.codepoint && scaler == rhs.scaler
&& fakeItalic == rhs.fakeItalic && fakeBold == rhs.fakeBold
&& mirror == rhs.mirror && angle == rhs.angle;
}
@@ -280,6 +281,7 @@ namespace std
std::size_t operator()( const GLYPH_CACHE_KEY& k ) const
{
return hash<const void*>()( k.face ) ^ hash<unsigned>()( k.codepoint )
^ hash<double>()( k.scaler )
^ hash<int>()( k.fakeItalic ) ^ hash<int>()( k.fakeBold )
^ hash<int>()( k.mirror ) ^ hash<int>()( k.angle.AsTenthsOfADegree() );
}
@@ -339,7 +341,7 @@ VECTOR2I OUTLINE_FONT::getTextAsGlyphsUnlocked( BOX2I* aBBox,
if( aGlyphs )
{
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, m_fakeItal, m_fakeBold,
GLYPH_CACHE_KEY key = { face, glyphInfo[i].codepoint, scaler, m_fakeItal, m_fakeBold,
aMirror, aAngle };
GLYPH_DATA& glyphData = s_glyphCache[ key ];
+3 -7
View File
@@ -320,10 +320,7 @@ void FP_LIB_TABLE::PrefetchLib( const wxString& aNickname )
const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool aCheckIfEnabled )
{
// Do not optimize this code. Is done this way specifically to fix a runtime
// error with clang 4.0.1.
LIB_TABLE_ROW* ltrow = findRow( aNickname, aCheckIfEnabled );
FP_LIB_TABLE_ROW* row = dynamic_cast< FP_LIB_TABLE_ROW* >( ltrow );
FP_LIB_TABLE_ROW* row = static_cast<FP_LIB_TABLE_ROW*>( findRow( aNickname, aCheckIfEnabled ) );
if( !row )
{
@@ -333,9 +330,8 @@ const FP_LIB_TABLE_ROW* FP_LIB_TABLE::FindRow( const wxString& aNickname, bool a
THROW_IO_ERROR( msg );
}
// We've been 'lazy' up until now, but it cannot be deferred any longer,
// instantiate a PCB_IO of the proper kind if it is not already in this
// FP_LIB_TABLE_ROW.
// We've been 'lazy' up until now, but it cannot be deferred any longer; instantiate a
// PCB_IO of the proper kind if it is not already in this FP_LIB_TABLE_ROW.
if( !row->plugin )
row->setPlugin( PCB_IO_MGR::PluginFind( row->type ) );
+8
View File
@@ -647,6 +647,14 @@ bool CAMERA::Zoom_T1( float aFactor )
}
void CAMERA::RotateScreen( float aAngleInRadians )
{
glm::mat4 matrix = GetRotationMatrix();
SetRotationMatrix( glm::rotate( matrix, aAngleInRadians, GetDir() ) );
updateRotationMatrix();
}
void CAMERA::RotateX( float aAngleInRadians )
{
m_rotate_aux.x += aAngleInRadians;
+97 -61
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017-2018 CERN
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
@@ -29,6 +29,7 @@
#include <wx/image.h>
#include <wx/log.h>
#include <wx/rawbmp.h>
#include <gal/cairo/cairo_gal.h>
#include <gal/cairo/cairo_compositor.h>
@@ -190,7 +191,7 @@ static double roundp( double x )
const VECTOR2D CAIRO_GAL_BASE::roundp( const VECTOR2D& v )
{
if( m_lineWidthIsOdd && m_isStrokeEnabled )
if( m_lineWidthIsOdd )
return VECTOR2D( ::roundp( v.x ), ::roundp( v.y ) );
else
return VECTOR2D( floor( v.x + 0.5 ), floor( v.y + 0.5 ) );
@@ -352,13 +353,18 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius,
double r = xform( aRadius );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
// Adjust center and radius slightly to better match the rounding of endpoints.
VECTOR2D mid = roundp( xform( aCenterPoint ) );
auto mid = roundp( xform( aCenterPoint ) );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
RotatePoint( startPointS, -EDA_ANGLE( startAngle, RADIANS_T ) );
RotatePoint( endPointS, -EDA_ANGLE( endAngle, RADIANS_T ) );
VECTOR2D refStart = roundp( xform( aCenterPoint ) + startPointS );
VECTOR2D refEnd = roundp( xform( aCenterPoint ) + endPointS );
r = ( ( refStart - mid ).EuclideanNorm() + ( refEnd - mid ).EuclideanNorm() ) / 2.0;
cairo_set_line_width( m_currentContext, m_lineWidthInPixels );
cairo_new_sub_path( m_currentContext );
@@ -403,13 +409,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
double r = xform( aRadius );
// N.B. This is backwards. We set this because we want to adjust the center
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
m_lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
VECTOR2D mid = roundp( xform( aCenterPoint ) );
VECTOR2D mid = xform( aCenterPoint );
double width = xform( aWidth / 2.0 );
VECTOR2D startPointS = VECTOR2D( r, 0.0 );
VECTOR2D endPointS = VECTOR2D( r, 0.0 );
@@ -583,6 +583,9 @@ void CAIRO_GAL_BASE::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
void CAIRO_GAL_BASE::ResizeScreen( int aWidth, int aHeight )
{
m_screenSize = VECTOR2I( aWidth, aHeight );
m_bitmapSize = VECTOR2I( std::ceil( m_screenSize.x * getScalingFactor() ),
std::ceil( m_screenSize.y * getScalingFactor() ) );
}
@@ -594,9 +597,9 @@ void CAIRO_GAL_BASE::Flush()
void CAIRO_GAL_BASE::ClearScreen()
{
cairo_set_source_rgb( m_currentContext, m_clearColor.r, m_clearColor.g, m_clearColor.b );
cairo_rectangle( m_currentContext, 0.0, 0.0, m_screenSize.x, m_screenSize.y );
cairo_fill( m_currentContext );
cairo_set_source_rgb( m_context, m_clearColor.r, m_clearColor.g, m_clearColor.b );
cairo_rectangle( m_context, 0.0, 0.0, m_bitmapSize.x, m_bitmapSize.y );
cairo_fill( m_context );
}
@@ -1021,15 +1024,15 @@ void CAIRO_GAL_BASE::resetContext()
m_imageSurfaces.clear();
ClearScreen();
// Compute the world <-> screen transformations
ComputeWorldScreenMatrix();
cairo_matrix_init( &m_cairoWorldScreenMatrix, m_worldScreenMatrix.m_data[0][0],
m_worldScreenMatrix.m_data[1][0], m_worldScreenMatrix.m_data[0][1],
m_worldScreenMatrix.m_data[1][1], m_worldScreenMatrix.m_data[0][2],
m_worldScreenMatrix.m_data[1][2] );
double sf = getScalingFactor();
cairo_matrix_init( &m_cairoWorldScreenMatrix,
m_worldScreenMatrix.m_data[0][0] * sf, m_worldScreenMatrix.m_data[1][0] * sf,
m_worldScreenMatrix.m_data[0][1] * sf, m_worldScreenMatrix.m_data[1][1] * sf,
m_worldScreenMatrix.m_data[0][2] * sf, m_worldScreenMatrix.m_data[1][2] * sf );
// we work in screen-space coordinates and do the transforms outside.
cairo_identity_matrix( m_context );
@@ -1337,8 +1340,10 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
m_currentTarget = TARGET_NONCACHED;
SetTarget( TARGET_NONCACHED );
SetBackgroundStyle( wxBG_STYLE_PAINT );
m_bitmapBuffer = nullptr;
m_wxOutput = nullptr;
m_wxBitmap = nullptr;
m_parentWindow = aParent;
m_mouseListener = aMouseListener;
@@ -1373,11 +1378,10 @@ CAIRO_GAL::CAIRO_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) );
#endif
SetSize( aParent->GetClientSize() );
m_screenSize = ToVECTOR2I( aParent->GetClientSize() );
Bind( wxEVT_GESTURE_ZOOM, &CAIRO_GAL::skipGestureEvent, this );
Bind( wxEVT_GESTURE_PAN, &CAIRO_GAL::skipGestureEvent, this );
// Allocate memory for pixel storage
allocateBitmaps();
SetSize( aParent->GetClientSize() );
m_isInitialized = false;
}
@@ -1413,45 +1417,44 @@ void CAIRO_GAL::EndDrawing()
// Now translate the raw context data from the format stored
// by cairo into a format understood by wxImage.
int height = m_screenSize.y;
int height = m_bitmapSize.y;
int stride = m_stride;
unsigned char* srcRow = m_bitmapBuffer;
unsigned char* dst = m_wxOutput;
wxNativePixelData dstData( *m_wxBitmap );
wxNativePixelData::Iterator di( dstData );
for( int y = 0; y < height; y++ )
{
for( int x = 0; x < stride; x += 4 )
wxNativePixelData::Iterator rowStart = di;
for( int x = 0; x < stride; x += 4, ++di )
{
const unsigned char* src = srcRow + x;
#if defined( __BYTE_ORDER__ ) && ( __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ )
// XRGB
dst[0] = src[1];
dst[1] = src[2];
dst[2] = src[3];
di.Red() = src[1];
di.Green() = src[2];
di.Blue() = src[3];
#else
// BGRX
dst[0] = src[2];
dst[1] = src[1];
dst[2] = src[0];
di.Red() = src[2];
di.Green() = src[1];
di.Blue() = src[0];
#endif
dst += 3;
}
srcRow += stride;
di = rowStart;
di.OffsetY( dstData, 1 );
}
wxImage img( m_wxBufferWidth, m_screenSize.y, m_wxOutput, true );
wxBitmap bmp( img );
wxMemoryDC mdc( bmp );
wxClientDC clientDC( this );
// Now it is the time to blit the mouse cursor
blitCursor( mdc );
clientDC.Blit( 0, 0, m_screenSize.x, m_screenSize.y, &mdc, 0, 0, wxCOPY );
deinitSurface();
Refresh(); // Trigger repaint
}
@@ -1472,7 +1475,7 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight )
allocateBitmaps();
if( m_validCompositor )
m_compositor->Resize( aWidth, aHeight );
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
m_validCompositor = false;
@@ -1563,7 +1566,7 @@ void CAIRO_GAL::initSurface()
return;
m_surface = cairo_image_surface_create_for_data( m_bitmapBuffer, GAL_FORMAT, m_wxBufferWidth,
m_screenSize.y, m_stride );
m_bitmapSize.y, m_stride );
m_context = cairo_create( m_surface );
@@ -1594,17 +1597,18 @@ void CAIRO_GAL::deinitSurface()
void CAIRO_GAL::allocateBitmaps()
{
m_wxBufferWidth = m_screenSize.x;
m_wxBufferWidth = m_bitmapSize.x;
// Create buffer, use the system independent Cairo context backend
m_stride = cairo_format_stride_for_width( GAL_FORMAT, m_wxBufferWidth );
m_bufferSize = m_stride * m_screenSize.y;
m_bufferSize = m_stride * m_bitmapSize.y;
wxASSERT( m_bitmapBuffer == nullptr );
m_bitmapBuffer = new unsigned char[m_bufferSize];
wxASSERT( m_wxOutput == nullptr );
m_wxOutput = new unsigned char[m_wxBufferWidth * 3 * m_screenSize.y];
wxASSERT( m_wxBitmap == nullptr );
m_wxBitmap = new wxBitmap( m_wxBufferWidth, m_bitmapSize.y, 24 );
m_wxBitmap->SetScaleFactor( getScalingFactor() );
}
@@ -1613,8 +1617,8 @@ void CAIRO_GAL::deleteBitmaps()
delete[] m_bitmapBuffer;
m_bitmapBuffer = nullptr;
delete[] m_wxOutput;
m_wxOutput = nullptr;
delete m_wxBitmap;
m_wxBitmap = nullptr;
}
@@ -1622,7 +1626,7 @@ void CAIRO_GAL::setCompositor()
{
// Recreate the compositor with the new Cairo context
m_compositor.reset( new CAIRO_COMPOSITOR( &m_currentContext ) );
m_compositor->Resize( m_screenSize.x, m_screenSize.y );
m_compositor->Resize( m_bitmapSize.x, m_bitmapSize.y );
m_compositor->SetAntialiasingMode( m_options.cairo_antialiasing_mode );
// Prepare buffers
@@ -1636,7 +1640,22 @@ void CAIRO_GAL::setCompositor()
void CAIRO_GAL::onPaint( wxPaintEvent& aEvent )
{
PostPaint( aEvent );
// We should have the rendered image in m_wxBitmap after EDA_DRAW_PANEL_GAL::onPaint
if( !m_wxBitmap )
{
wxLogDebug( "CAIRO_GAL::onPaint null output bitmap buffer" );
return;
}
{
// Now it is the time to blit the mouse cursor
wxMemoryDC mdc( *m_wxBitmap );
blitCursor( mdc );
}
wxPaintDC paintDC( this );
paintDC.DrawBitmap( *m_wxBitmap, 0, 0 );
}
@@ -1648,6 +1667,14 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent )
}
void CAIRO_GAL::skipGestureEvent( wxGestureEvent& aEvent )
{
// Post the gesture event to the event listener registered in constructor, if any
if( m_mouseListener )
wxPostEvent( m_mouseListener, aEvent );
}
bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
{
bool refresh = false;
@@ -1672,13 +1699,22 @@ bool CAIRO_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
}
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor )
double CAIRO_GAL::getScalingFactor()
{
return GetContentScaleFactor();
};
bool CAIRO_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor ) )
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
return false;
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
wxWindow::SetCursor( m_currentwxCursor );
+259 -51
View File
@@ -44,85 +44,76 @@
#include <cursors/cursor-subtract.xpm>
#include <cursors/cursor-text.xpm>
#include <cursors/cursor-xor.xpm>
#include <cursors/cursor-zoom.xpm>
#include <cursors/cursor-zoom-in.xpm>
#include <cursors/cursor-zoom-out.xpm>
#include <cursors/cursor_tune.xpm>
#include <cursors/voltage_probe.xpm>
#include <cursors/current_probe.xpm>
// HiDPI cursor files
#include <cursors/cursor-add64.xpm>
#include <cursors/cursor-component64.xpm>
#include <cursors/cursor-eraser64.xpm>
#include <cursors/cursor-label-global64.xpm>
#include <cursors/cursor-label-hier64.xpm>
#include <cursors/cursor-label-net64.xpm>
#include <cursors/cursor-line-bus64.xpm>
#include <cursors/cursor-line-graphic64.xpm>
#include <cursors/cursor-line-wire64.xpm>
#include <cursors/cursor-line-wire-add64.xpm>
#include <cursors/cursor-measure64.xpm>
#include <cursors/cursor-pencil64.xpm>
#include <cursors/cursor-select-lasso64.xpm>
#include <cursors/cursor-select-window64.xpm>
#include <cursors/cursor-subtract64.xpm>
#include <cursors/cursor-text64.xpm>
#include <cursors/cursor-xor64.xpm>
#include <cursors/cursor-zoom-in64.xpm>
#include <cursors/cursor-zoom-out64.xpm>
#include <cursors/cursor_tune64.xpm>
#include <cursors/voltage_probe64.xpm>
#include <cursors/current_probe64.xpm>
// Under MSW, the standard cursor is white on black. Elsewhere it is black on white
#ifdef __WINDOWS__
#include <cursors/cursor-place.xpm>
#include <cursors/cursor-place64.xpm>
#include <cursors/cursor-select-m.xpm>
#include <cursors/cursor-select-m64.xpm>
#else
#include <cursors/cursor-place-black.xpm>
#include <cursors/cursor-place-black64.xpm>
#include <cursors/cursor-select-m-black.xpm>
#include <cursors/cursor-select-m-black64.xpm>
#endif
#include <wx/bitmap.h>
#include <wx/debug.h>
static const unsigned char voltage_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
0x00, 0x30, 0x06, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x0e, 0x08, 0x00, 0x80, 0x07, 0x08, 0x00,
0xc0, 0x07, 0x18, 0x00, 0xe0, 0x07, 0x30, 0x00, 0xf0, 0x03, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00,
0xfc, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf0,
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static const unsigned char current_probe[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x60, 0x06, 0x00,
0x00, 0x30, 0x0c, 0x00, 0x00, 0x1c, 0x08, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x80, 0x0f, 0x18, 0x00,
0xc0, 0x0f, 0x30, 0x80, 0xe1, 0x07, 0x60, 0x80, 0xf1, 0x03, 0x00, 0x80, 0xf9, 0x01, 0x00, 0x80,
0xfd, 0x00, 0x00, 0x80, 0x7f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0xc0,
0x0f, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x83,
0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0x83, 0x01, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0xfc,
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f, 0x00,
0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00,
0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00,
0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x00,
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x50,
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0a,
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const unsigned char cursor_tune_mask[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xc0, 0x0f,
0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00, 0xf8, 0x0f, 0x00, 0x00, 0xfc, 0x07,
0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x01, 0x00, 0x80, 0xff, 0x00, 0x00, 0xc0, 0x7f, 0x00,
0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x07, 0x00,
0x00, 0xfc, 0x03, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xee, 0x00, 0x00,
0x00, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00,
0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
voltage_probe,
voltage_probe,
nullptr,
nullptr,
voltage_probe_xpm,
{ 32, 32 },
{ 1, 31 },
},
{
KICURSOR::CURRENT_PROBE,
current_probe,
current_probe,
nullptr,
nullptr,
current_probe_xpm,
{ 32, 32 },
{ 4, 27 },
},
{
KICURSOR::TUNE,
cursor_tune,
cursor_tune_mask,
nullptr,
nullptr,
cursor_tune_xpm,
{ 32, 32 },
{ 1, 30 },
},
@@ -198,7 +189,7 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_xpm,
cursor_zoom_in_xpm,
{ 32, 32 },
{ 6, 6 },
},
@@ -305,6 +296,209 @@ static const std::vector<CURSOR_STORE::CURSOR_DEF> standard_cursors = {
};
static const std::vector<CURSOR_STORE::CURSOR_DEF> hidpi_cursors = {
{
KICURSOR::VOLTAGE_PROBE,
nullptr,
nullptr,
voltage_probe64_xpm,
{ 64, 64 },
{ 1, 62 },
},
{
KICURSOR::CURRENT_PROBE,
nullptr,
nullptr,
current_probe64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::TUNE,
nullptr,
nullptr,
cursor_tune64_xpm,
{ 64, 64 },
{ 2, 60 },
},
{
KICURSOR::PENCIL,
nullptr,
nullptr,
cursor_pencil64_xpm,
{ 64, 64 },
{ 8, 54 },
},
{
KICURSOR::MOVING,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_select_m64_xpm,
#else
cursor_select_m_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
{
KICURSOR::REMOVE,
nullptr,
nullptr,
cursor_eraser64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::TEXT,
nullptr,
nullptr,
cursor_text64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::MEASURE,
nullptr,
nullptr,
cursor_measure64_xpm,
{ 64, 64 },
{ 8, 8 },
},
{
KICURSOR::ADD,
nullptr,
nullptr,
cursor_add64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SUBTRACT,
nullptr,
nullptr,
cursor_subtract64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::XOR,
nullptr,
nullptr,
cursor_xor64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::ZOOM_IN,
nullptr,
nullptr,
cursor_zoom_in64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::ZOOM_OUT,
nullptr,
nullptr,
cursor_zoom_out64_xpm,
{ 64, 64 },
{ 12, 12 },
},
{
KICURSOR::LABEL_NET,
nullptr,
nullptr,
cursor_label_net64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::LABEL_GLOBAL,
nullptr,
nullptr,
cursor_label_global64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::COMPONENT,
nullptr,
nullptr,
cursor_component64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_LASSO,
nullptr,
nullptr,
cursor_select_lasso64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::SELECT_WINDOW,
nullptr,
nullptr,
cursor_select_window64_xpm,
{ 64, 64 },
{ 14, 20 },
},
{
KICURSOR::LINE_BUS,
nullptr,
nullptr,
cursor_line_bus64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE,
nullptr,
nullptr,
cursor_line_wire64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_WIRE_ADD,
nullptr,
nullptr,
cursor_line_wire_add64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LINE_GRAPHIC,
nullptr,
nullptr,
cursor_line_graphic64_xpm,
{ 64, 64 },
{ 10, 52 },
},
{
KICURSOR::LABEL_HIER,
nullptr,
nullptr,
cursor_label_hier64_xpm,
{ 64, 64 },
{ 14, 14 },
},
{
KICURSOR::PLACE,
nullptr,
nullptr,
#ifdef __WINDOWS__
cursor_place64_xpm,
#else
cursor_place_black64_xpm,
#endif
{ 64, 64 },
{ 2, 2 },
},
};
/**
* Construct a cursor for the given definition.
*
@@ -393,8 +587,8 @@ const wxCursor& CURSOR_STORE::Get( KICURSOR aIdKey ) const
const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
{
wxStockCursor stock =
GetStockCursor( aCursorType );
wxStockCursor stock = GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
@@ -405,6 +599,20 @@ const wxCursor CURSOR_STORE::GetCursor( KICURSOR aCursorType )
}
const wxCursor CURSOR_STORE::GetHiDPICursor( KICURSOR aCursorType )
{
wxStockCursor stock = GetStockCursor( aCursorType );
if( stock != wxCURSOR_MAX )
{
return wxCursor( stock );
}
static CURSOR_STORE store( hidpi_cursors );
return store.Get( aCursorType );
}
wxStockCursor CURSOR_STORE::GetStockCursor( KICURSOR aCursorType )
{
wxStockCursor stockCursor;
+2 -2
View File
@@ -81,7 +81,7 @@ GAL::GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions ) :
SetCursorEnabled( false );
// Initialize the native widget to an arrow cursor
SetNativeCursorStyle( KICURSOR::ARROW );
SetNativeCursorStyle( KICURSOR::ARROW, false );
// Initialize text properties
ResetTextAttributes();
@@ -277,7 +277,7 @@ void GAL::BitmapText( const wxString& aText, const VECTOR2I& aPosition, const ED
}
bool GAL::SetNativeCursorStyle( KICURSOR aCursor )
bool GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
if( m_currentNativeCursor == aCursor )
return false;
+2 -9
View File
@@ -34,8 +34,7 @@ HIDPI_GL_CANVAS::HIDPI_GL_CANVAS( const KIGFX::VC_SETTINGS& aSettings, wxWindow*
const wxPoint& aPos, const wxSize& aSize, long aStyle,
const wxString& aName, const wxPalette& aPalette ) :
wxGLCanvas( aParent, aGLAttribs, aId, aPos, aSize, aStyle, aName, aPalette ),
m_settings( aSettings ),
m_scale_factor( DPI_SCALING::GetDefaultScaleFactor() )
m_settings( aSettings )
{
}
@@ -64,13 +63,7 @@ wxPoint HIDPI_GL_CANVAS::GetNativePosition( const wxPoint& aPoint ) const
}
void HIDPI_GL_CANVAS::SetScaleFactor( double aNewScaleFactor )
{
m_scale_factor = aNewScaleFactor;
}
double HIDPI_GL_CANVAS::GetScaleFactor() const
{
return m_scale_factor;
return GetContentScaleFactor();
}
+13 -9
View File
@@ -113,26 +113,30 @@ void GPU_CACHED_MANAGER::BeginDrawing()
}
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM *aItem )
void GPU_CACHED_MANAGER::DrawIndices( const VERTEX_ITEM* aItem )
{
wxASSERT( m_isDrawing );
// Hot path: don't use wxASSERT
assert( m_isDrawing );
unsigned int offset = aItem->GetOffset();
unsigned int size = aItem->GetSize();
if( size > 1000 )
if( size == 0 )
return;
if( size <= 1000 )
{
m_totalNormal += size;
m_vranges.emplace_back( offset, offset + size - 1, false );
m_curVrangeSize += size;
}
else
{
m_totalHuge += size;
m_vranges.emplace_back( offset, offset + size - 1, true );
m_indexBufSize = std::max( m_curVrangeSize, m_indexBufSize );
m_curVrangeSize = 0;
}
else if ( size > 0 )
{
m_totalNormal += size;
m_vranges.emplace_back( offset, offset + size - 1, false );
m_curVrangeSize += size;
}
}
+22 -11
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2012-2023 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2012-2024 Kicad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2013-2017 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -33,6 +33,7 @@
#endif
#include <advanced_config.h>
#include <build_version.h>
#include <gal/opengl/opengl_gal.h>
#include <gal/opengl/utils.h>
#include <gal/definitions.h>
@@ -390,6 +391,9 @@ OPENGL_GAL::OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIO
Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) );
#endif
Bind( wxEVT_GESTURE_ZOOM, &OPENGL_GAL::skipGestureEvent, this );
Bind( wxEVT_GESTURE_PAN, &OPENGL_GAL::skipGestureEvent, this );
SetSize( aParent->GetClientSize() );
m_screenSize = ToVECTOR2I( GetNativePixelSize() );
@@ -514,13 +518,6 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
refresh = true;
}
if( m_options.m_scaleFactor != GetScaleFactor() )
{
SetScaleFactor( m_options.m_scaleFactor );
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
refresh = true;
}
if( super::updatedGalDisplayOptions( aOptions ) || refresh )
{
Refresh();
@@ -2149,13 +2146,16 @@ void OPENGL_GAL::EndDiffLayer()
}
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor )
bool OPENGL_GAL::SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI )
{
// Store the current cursor type and get the wxCursor for it
if( !GAL::SetNativeCursorStyle( aCursor ) )
if( !GAL::SetNativeCursorStyle( aCursor, aHiDPI ) )
return false;
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
if( aHiDPI )
m_currentwxCursor = CURSOR_STORE::GetHiDPICursor( m_currentNativeCursor );
else
m_currentwxCursor = CURSOR_STORE::GetCursor( m_currentNativeCursor );
// Update the cursor in the wx control
HIDPI_GL_CANVAS::SetCursor( m_currentwxCursor );
@@ -2623,6 +2623,14 @@ void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent )
}
void OPENGL_GAL::skipGestureEvent( wxGestureEvent& aEvent )
{
// Post the gesture event to the event listener registered in constructor, if any
if( m_mouseListener )
wxPostEvent( m_mouseListener, aEvent );
}
void OPENGL_GAL::blitCursor()
{
if( !IsCursorEnabled() )
@@ -2694,6 +2702,9 @@ void OPENGL_GAL::init()
#endif // KICAD_USE_EGL
SetOpenGLInfo( (const char*) glGetString( GL_VENDOR ), (const char*) glGetString( GL_RENDERER ),
(const char*) glGetString( GL_VERSION ) );
if( GLEW_OK != err )
throw std::runtime_error( (const char*) glewGetErrorString( err ) );
+12 -7
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016-2017 CERN
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -170,13 +170,18 @@ static void GLAPIENTRY debugMsgCallback( GLenum aSource, GLenum aType, GLuint aI
{
switch( aSeverity )
{
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( "OpenGL ERROR: " ); break;
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( "OpenGL WARNING: " ); break;
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( "OpenGL INFO: " ); break;
case GL_DEBUG_SEVERITY_NOTIFICATION: return;
case GL_DEBUG_SEVERITY_HIGH:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL ERROR: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_MEDIUM:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL WARNING: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_LOW:
wxLogTrace( traceGalOpenGlError, wxS( "OpenGL INFO: %s" ), aMessage );
break;
case GL_DEBUG_SEVERITY_NOTIFICATION:
return;
}
wxLogDebug( "%s\n", aMessage );
}
+13 -3
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2013-2016 CERN
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021, 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Maciej Suminski <maciej.suminski@cern.ch>
*
@@ -38,6 +38,15 @@
#include <confirm.h>
#include <wx/log.h>
/**
* Flag to enable #VERTEX_MANAGER debugging output.
*
* @ingroup trace_env_vars
*/
static const wxChar traceVertexManager[] = wxT( "KICAD_VERTEX_MANAGER" );
using namespace KIGFX;
VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) :
@@ -73,7 +82,7 @@ bool VERTEX_MANAGER::Reserve( unsigned int aSize )
return true;
if( m_reservedSpace != 0 || m_reserved )
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
// flag to avoid hanging by calling DisplayError too many times:
static bool show_err = true;
@@ -173,7 +182,7 @@ void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const
void VERTEX_MANAGER::FinishItem() const
{
if( m_reservedSpace != 0 || m_reserved )
wxLogDebug( wxT( "Did not use all previous vertices allocated" ) );
wxLogTrace( traceVertexManager, wxS( "Did not use all previous vertices allocated" ) );
m_container->FinishItem();
}
@@ -295,6 +304,7 @@ void VERTEX_MANAGER::putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat
}
}
void VERTEX_MANAGER::EnableDepthTest( bool aEnabled )
{
m_gpu->EnableDepthTest( aEnabled );
+1
View File
@@ -23,6 +23,7 @@
#include "git_add_to_index_handler.h"
#include <iterator>
#include <wx/string.h>
#include <wx/log.h>

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