Jeff Young
4f0136db3b
Attempt to fix std::initializer_list lifetime issue.
2022-08-21 20:54:41 +01:00
Jeff Young
aa2ad3b44c
Move KICAD_T[] to std::initializer_list<KICAD_T>.
2022-08-20 10:28:11 +01:00
Seth Hillbrand
35ac39844f
Clean up some auto usage
...
Don't make new copies of shared_ptr if we can use references. Keep auto
usage down to hard-to-type-out sequences
2022-08-15 11:29:45 -07:00
Marek Roszko
a8505d9c76
SEARCH_RESULT -> INSPECT_RESULT
...
To fix the name squatting it's doing for future functionality
2022-07-29 20:01:10 -04:00
Mike Williams
aea89a632b
Gerber Viewer: fix high contrast mode, respect high cycle shortcut
2022-07-26 18:42:55 +00:00
Mike Williams
9911f3a943
Gerber Viewer: X2 mode paste layer above mask and silk
2022-07-26 18:42:55 +00:00
Mike Williams
23e2e57e09
Gerber Viewer: put drills/outlines/keep outs on top by default
...
For file extension sorting, this priorities drills/outlines/KOs.
For X2 sorting, this changes the default priority to make
unknown-priority layers on top since if they contain anything that can
be plotted, it's probably drill data.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10598
2022-07-26 18:42:55 +00:00
Mike Williams
75ed6b3ce7
Gerber viewer: move layer colors with layers
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10600
2022-07-26 18:42:55 +00:00
Mike Williams
1460442a80
Gerber viewer: don't go to next layer if on last layer
2022-07-26 18:42:55 +00:00
Mike Williams
4a6ac8ca2f
Gerbview: remove used/unused row indicator
...
No longer relevant as we only show in use layers
2022-07-26 18:42:55 +00:00
Mike Williams
23a4b1001f
Gerbview: change shortcuts for next/prev layer, add for move layer
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11909
2022-07-26 18:42:55 +00:00
jean-pierre charras
4d48376eae
Fix some warnings detected by PVS-STUDIO (not used vars)
2022-07-26 16:00:14 +02:00
Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +01:00
Jeff Young
57acce9e55
Share more code between selection tools.
2022-07-11 19:04:08 -06:00
Seth Hillbrand
03c279ffd4
ADDED: Threadpool
...
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs. This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta. It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00
jean-pierre charras
3fcd959757
Gerbview: minor cosmetic enhancement: show if the file is X1 or X2 format.
2022-06-24 15:44:13 +02:00
Ian McInerney
b51d8c9825
Introduce new CMake variable to store kiface install location
2022-06-22 23:40:25 +01:00
jean-pierre charras
9108404efe
Gerbview: seriously speed up the calculation time to draw polygons on OpenGL.
...
Mainly CacheTriangulation() was creating triangles using partition mode.
But this mode is optimized for Pcbnew and Gerbview and different internal units.
Now CacheTriangulation() is used in no partition, much faster in GERBVIEW_PAINTER.
Fixes #11549
https://gitlab.com/kicad/code/kicad/issues/11549
2022-05-13 18:20:35 +02:00
jean-pierre charras
7eeefdb3c5
Gerbview export to kicad_pcb file: remove calls to Simplify and Fracture.
...
They are not needed to export polygons because they are already fractured,
and these calls are very time consuming.
2022-05-05 19:26:31 +02:00
Marek Roszko
f88e0481c8
Change the behavior of ACTION_MENU::Add to require clones if required outside the function
...
This reverts commit 2a5769607f
.
2022-04-11 19:03:01 -04:00
Seth Hillbrand
2a5769607f
Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
...
This reverts commit 403992a6f4
.
2022-04-11 11:39:03 -07:00
jean-pierre charras
ac8e2d0768
Ensure "Open Recent" and "Clear files" menu titles are updated after language change.
2022-04-11 11:09:05 +02:00
Marek Roszko
403992a6f4
Change the behavior of ACTION_MENU::Add to require clones if required outside the function
...
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:38:13 -04:00
Marek Roszko
5bb2cdf73d
Revert "Stop leaking submenu items"
...
This reverts commit 34c70a51ea
.
2022-04-10 22:33:43 -04:00
Marek Roszko
34c70a51ea
Stop leaking submenu items
...
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
Jeff Young
92a229eec7
ADDED separate user-defined color for page limits.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5271
2022-03-24 14:11:41 +00:00
jean-pierre charras
93066004f1
QA: fix altium qa tests now the altium to pcbnew coordiantes are rounded
...
to the near 10nm value.
2022-03-24 12:36:46 +01:00
jean-pierre charras
e2cda7837f
Gerbview: Fix incorrect rendering of aperture macros combining polygons.
...
A aperture macro can have polygons with holes, and/or many polygons.
When combining polygons holes can be created. So ensure the resulting polygon
is fractured before drawing it.
Fixes #11218
https://gitlab.com/kicad/code/kicad/issues/11218
2022-03-23 20:50:29 +01:00
Jeff Young
65185f53a1
Rotate fp zones before comparing with library versions.
...
Also includes some performance fixes to not copy around triangulation
data when it's not needed.
Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
jean-pierre charras
3a5530d441
Gerbview: fix typo that prevent lo load a .gbrjob file from command line
...
Fixes #10921
https://gitlab.com/kicad/code/kicad/issues/10921
2022-02-21 11:32:36 +01:00
jean-pierre charras
233f86e8cf
Gerbview: fix missing handling of ID_GRID_SETTINGS event.
...
Fixes #10885
https://gitlab.com/kicad/code/kicad/issues/10885
2022-02-18 08:31:32 +01:00
jean-pierre charras
f8d6dd1efd
Gerbview: fix a long standing issue: negative objects are now correctly printed.
2022-02-12 11:44:34 +01:00
Seth Hillbrand
79f5325697
Fix float scaling to use single fn
...
Function `scaletoIU` was updated in a8c275ae5d
but this missed other
conversion points that re-implemented the same routine. This unifies
the scaling for both ReadIJCoord and ReadXYCoord to use the same routine
as calls from am_primitive
Fixes https://gitlab.com/kicad/code/kicad/issues/10800
(cherry picked from commit d937abb5b8
)
2022-02-10 12:36:34 -08:00
jean-pierre charras
c125cb673e
gerbview: fix incorrect render of regions defined by a 360 deg arcd (a circle)
...
these regions were missing.
Fixes #10805
https://gitlab.com/kicad/code/kicad/issues/10805
2022-02-10 09:56:27 +01:00
Seth Hillbrand
c79916b359
Fix relative return with nullptr condition
...
Previous fix for CVE munged return conditions for gerber files in some
cases. This restores the proper order where a nullptr will return 0,0
in the relative case and the current coordinate in others
Also fixes incorrect scale factor for inches/mils conversion to mm
2022-02-10 09:53:55 +01:00
Marek Roszko
41f54349a5
Replace inserts/push_backs with emplace in some spots
2022-02-05 19:53:31 -05:00
Jeff Young
4e3109a633
Wide string decls for gerbview.
2022-02-05 22:34:45 +00:00
Seth Hillbrand
7ed569058c
Review ReadXY/ReadIJ to avoid static char arrays
...
Tighten up the code a bit, removing extra calls and loops. Removes
unchecked use of stack char array
Fixes https://gitlab.com/kicad/code/kicad/issues/10719
(cherry picked from commit 927afe313d
)
2022-02-02 17:18:25 -08:00
Seth Hillbrand
54b20cb049
Fix overflow vulnerability in Gerbview
...
Corrects an unguarded read that could lead to arbitrary code execution
in specifically crafted gerber files.
Fixes https://gitlab.com/kicad/code/kicad/issues/10700
2022-02-01 15:50:27 -08:00
Seth Hillbrand
098e8f7d9b
Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
...
This reverts commit ea9f960cc1
.
Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young
60bcfd1bf1
Bug fixes in arc & textbox printing.
...
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Davide Gerhard
ea9f960cc1
cmake: adding KICAD_MACOSX_APP_BUNDLE option
...
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
jean-pierre charras
f651e31965
Fix minor compil and Coverity warnings.
2022-01-25 12:52:13 +01:00
Mike Williams
20788897ee
Gerbview: display Start and End position of drawable items
...
Originally written by Tarun Johar.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8426
2022-01-24 08:40:49 -05:00
Mike Williams
6ddd5ec37f
Gerbview: Add menu item to open files with autodetection
...
Needs an icon at some point
2022-01-24 08:40:49 -05:00
Mike Williams
8692014691
Gerbview: consolidate some dialog code
...
Preparing also for a third usage where we autodetect the file type
2022-01-24 08:40:49 -05:00
Mike Williams
db407a1c0b
Gerbview: clean up loading files to prepare for more autodetection
2022-01-24 08:40:49 -05:00
Mike Williams
eee20f9f67
Gerbview: reduce redundant file loading code
2022-01-24 08:40:49 -05:00
Mike Williams
4140ab118e
Gerbview: remove extra linebreaks from errors messages
2022-01-24 08:40:49 -05:00
Mike Williams
7043498875
Gerbview: handle unexpected invalid char
...
Attempting to print this as a char was causing wxWidgets to assert since
some input is neither ASCII or valid UTF-8.
Reproducable by trying to open zip files as gerber files from the
command line.
2022-01-24 08:40:49 -05:00