Marek Roszko
87513b4a04
Change the sentry dsn to be build time defined
...
We ultimately don't want people running personal builds to turn on sentry and start sending us crash logs we can't decipher
2023-08-30 22:17:38 -04:00
Mike Williams
b1a388ca69
Grids: Support X and Y for all grids, add optional names
2023-08-30 11:22:19 -04:00
Jeff Young
4fefd95e0c
Move grid definitions to Prefs and grid origin to a separate dlg.
...
Grid origin is document-wide, while grid definitions are app-wide.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01:00
Alex Shvartzkop
10e2e4a12d
Another try at fixing arcs.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Ian McInerney
a3a701a95e
Move preferences to an action instead of a wx event
2023-08-08 00:51:22 +01:00
Ian McInerney
a98e25d4df
Switch gerview actions to new tool action arg constructors
2023-07-12 23:00:13 +01:00
Ian McInerney
2fb6f19a84
Separate immediate and delayed action dispatch
...
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney
480223f67c
More RunAction specialization
2023-06-20 21:52:50 +01:00
Jeff Young
782c73300b
Move drawing sheet datastructures to EDA_IU_SCALE.
...
Or mostly, at least. Plotters still define their own mils-to-iu scale.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
jean-pierre charras
1406341d2d
Fix a few doxygen errors (no actual code change)
2023-04-19 16:20:24 +02:00
Marek Roszko
ea077bc34d
Banish ignore.h to core
2023-04-18 22:44:04 -04:00
Jeff Young
140f76b870
Export rectangular aperture GBR_SEGMENTS as polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14136
2023-04-15 22:32:26 +01:00
qu1ck
0c049eccc7
Fix a bunch of compiler warnings
2023-04-11 17:01:30 +00:00
Jeff Young
374d3d52ef
Rollback wxChoice -> wxComboBox changes for now.
...
wxComboBox still has serious issues on macOS.
Fixes https://gitlab.com/kicad/code/kicad/issues/14399
Fixes https://gitlab.com/kicad/code/kicad/issues/14413
2023-04-09 23:00:33 +01:00
Ian McInerney
18ea3be3f2
Revert "Reintroduce constexpr to COLOR4D"
...
This reverts commit 33da9b2327
and the
following commit dc08c48f33
.
C++17 changed the behavior of static class member variables that are
constexpr defined. Previously this definition/declaration split was
valid for constexpr members, but after C++17 the static constexpr member
variables are automatically inlined, so the declaration is no longer
exported in some compilers (GCC 9/10/11 seem to have problems).
An alternate way of constexpr member variables is putting the
initialization in the class definition, but we can't init a COLOR4D
object when defining the COLOR4D class.
For now, revert this change until we can figure out the proper way of
architecting these colors.
2023-04-06 20:18:31 +01:00
Ian McInerney
dc08c48f33
Try to fix linking after constexpr change
...
Somehow, GCC 10 and 11 were unable to locate the prebuild colors when
they were constexpr in gal, so give them on the link line again.
2023-04-06 15:20:16 +01:00
Ian McInerney
ea62b145ff
Introduce core interface library
...
This library is meant to move non-EDA items (language extensions,
library extensions, etc.) into the lowest-level of our dependency chain.
This library should never depend on anyother non-thirdparty code in the
kicad codebase.
2023-04-06 15:01:18 +01:00
Seth Hillbrand
19d0aceda3
Remove superfluous m_status variable
...
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Jeff Young
c4ef08bead
Exercise more caution with user filenames.
...
In particular, don't assume "1" is an extension in "Schematic_1.1".
Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
Seth Hillbrand
d2cc252fc7
Move via/track/grid selection widget to wxComboBox
...
The wxComboBox drops nicely from the top of the screen, showing the full
element list, opposed to the choice widget that centers the selection
and places the list off the top of the screen if there are many
elements. This was broke for MacOS until wx3.2
Fixes https://gitlab.com/kicad/code/kicad/issues/1866
2023-03-09 11:45:44 -08:00
aris-kimi
22bca5c2a0
Disable link maps by default and fix compile issue with lld linker
...
The link maps were actually disabled by default before
912f1d5cec
, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.
Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.
xref: https://github.com/llvm/llvm-project/issues/60932
Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Jon Evans
32d45f7e3f
Fix typo
2023-02-22 09:43:26 -05:00
Jon Evans
43d3a18b86
Improve HiDPI handling of appearance/layer controls
2023-02-22 09:20:36 -05:00
Ian McInerney
912f1d5cec
Modernize setting link map linker flags
2023-02-22 01:44:06 +00:00
Ian McInerney
bcb93e9aa7
Modernize setting of compiler definitions in CMake
...
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00
Marek Roszko
4665823089
Turn on and fix MSVC compliance mode issues
...
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.
In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments
MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
jean-pierre charras
54b4f0e673
Gerbview: Aperture Macro: handle overwriting of variables
...
Gerbview did not handle redefinition of variable like $3 = $3 / 2
This redefinition is sometimes found in Gerber files.
This is a long standing issue now fixed.
Fixes #7222
https://gitlab.com/kicad/code/kicad/issues/7222
2023-02-11 18:22:29 +01:00
jean-pierre charras
efe49ecfd2
Gerbview: replace ARC_HIGH_DEF (defined for Pcbnew) to a suitable value
...
ARC_HIGH_DEF is set to 5 microns in Pcbnew units, but Gerbview do not use
Pcbnew units, so ARC_HIGH_DEF was a too large value, creating rough arcs.
2023-02-11 10:20:30 +01:00
jean-pierre charras
79d246b8fe
Gerbview: more code cleanup. remove duplicate code.
2023-02-10 16:10:29 +01:00
jean-pierre charras
00374f0a75
Gerbview: code refactor: change name of a member:
...
GERBER_DRAW_ITEM::m_Polygon -> m_ShapeAsPolygon
No actual code change.
2023-02-10 11:50:20 +01:00
jean-pierre charras
fa1591d021
Gerbview: code refactor: change name of a D_CODE member:
...
D_CODE::m_Shape -> m_ApertType (it is not a shape, it is a aperture type)
Fix also an outdated/incorrect comment
No actual code change.
2023-02-10 11:20:16 +01:00
jean-pierre charras
0d0c9aee3a
Gerbview: code refactor: change name and type of a member:
...
GERBER_DRAW_ITEM::m_Shape -> m_ShapeType of type GBR_BASIC_SHAPES
Minor coding style fix.
2023-02-10 10:09:35 +01:00
jean-pierre charras
6b5eeeb861
Preferences dialog: try to reduce its width, in non English languages.
...
Remove some useless spacers, and do not force some widgets to have a to
large size (by removing empty areas).
Work in progress: one panel is still too big.
2023-02-04 14:36:14 +01:00
Wayne Stambaugh
68decdd4f2
Fix static event table derived object definitions.
2023-01-28 14:10:06 -05:00
jean-pierre charras
be420a0cf5
Gerbview, Aperture macros handling: use accessors for some internal data
...
and add comments. No actual code change.
2023-01-28 18:00:12 +01:00
Marek Roszko
99fae6a327
Update the target_link_library usage for gerbview_kiface
2023-01-23 23:37:16 -05:00
aris-kimi
86c12d35b4
Small order change for three View menu items
2023-01-22 01:04:17 +00:00
jean-pierre charras
9df65d7f54
Gerbview: code refactor: move APERTURE_MACRO defs from am_primitive to aperture_macro.
...
Some other code cleaning, but no actual code change.
2023-01-20 10:47:18 +01:00
jean-pierre charras
098b03e17a
gerbview: Cleanup code. Remove useless or not working code.
2023-01-18 17:26:41 +01:00
jean-pierre charras
00d77f624a
Gerbview: fix coding style (better names for variable members is some classes).
...
(no actual change in code)
2023-01-14 17:08:44 +01:00
Jon Evans
c530bdb5a1
Rename GetSelectMenuText to GetItemDescription
...
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Jeff Young
30c9deb9d5
Flat(er) look for paged dialogs.
2023-01-11 01:11:25 +00:00
Wayne Stambaugh
f28ea5e784
Remove standard dialog button static line separators.
...
For the sake of consistency across all dialogs and window that behave
like dialogs, remove the static line that separates the main part of
the dialog from the standard buttons. This only applies to windows
that have the standard button on the bottom of the frame.
This covers the 3D viewer, CvPcb, common, GerbView and KiCad dialogs.
2023-01-08 13:15:33 -05:00
Gary Kim
8e8a3c7bdc
Do not translate name in version info
...
Leave the application name in version info untranslated when
viewed, copied, or used in a bug report.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
2022-12-31 20:28:45 -05:00
Jeff Young
4c63b4e061
Class name <-> file name sync.
2022-12-29 18:05:57 +00:00
jean-pierre charras
157b93c4ae
Gerbview and Pl_editor: fix missing transfer from preference dialog to Gal options.
...
Some settings (cursor shape, grid options) were not taken in account after
closing the preferences dialog.
2022-12-29 17:34:03 +01:00
Daniil Nikolaev
605d177810
Gerbview: Check RS274X AD command's template parameters
...
If user opens a specially crafted gerber file, this check prevents Gerbview from infinitely consuming memory.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13235
2022-12-22 21:23:19 +00:00
Mike Williams
1f178e2b93
Gerbview: fix broken XOR mode
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10122
2022-12-19 11:00:06 -05:00
Jon Evans
5abf73e3c9
Never call ReCreateMenuBar inside a menu event handler
...
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jeff Young
366cad1f01
Uniformly translate "<no net>" message.
2022-12-15 13:59:25 +00:00
Alexander Dewing
02325130fa
Initial arm64 work
2022-12-09 23:48:31 +00:00
Jeff Young
96819f6c01
Better cache invalidation for text objects with references.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
jean-pierre charras
f0527fac67
Gerbview, read zip archive: do not generate a error message for directory names.
...
A directory is not a file, and is now just skipped.
2022-11-22 08:39:16 +01:00
Jeff Young
b09a106880
Split gerbview diff and xor into two separate view modes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10122
2022-11-18 15:29:16 +00:00
Alex
53b9baa5ba
Some refactoring around Gerber files extension checking.
...
Fixes a case where most Protel inner layer files couldn't be drag and dropped.
2022-11-18 09:55:34 +05:00
Jeff Young
13f5c78e89
More tightening of group parent lifecycles.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12908
2022-11-16 00:42:38 +00:00
jean-pierre charras
9501f4303d
Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
...
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
2022-11-08 12:31:07 +01:00
jean-pierre charras
504adb3467
Eeschema Back annotation: fix broken handling of full sheet paths of symbols.
...
Fixes #12767
https://gitlab.com/kicad/code/kicad/issues/12767
2022-11-03 11:15:23 +01:00
Bevan Weiss
38b54b62e0
Fixes ability for Export to PCB new to handle plain Gerber drill files (gbr).
...
In addition to Excellon.
Also fixes issue with layer mapping dialogue text colors not updating on selection.
Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
2022-11-01 11:32:25 +00:00
jean-pierre charras
8963e4187a
Gerbview,export_to_pcbnew: fix a crash and incorrect export of some shapes
2022-10-31 17:45:29 +01:00
Marek Roszko
d6f8ca9a2e
Patch out the install for argparse
2022-10-12 23:17:05 -04:00
Mark Roszko
fb8a4c10f7
Shove kicad2step into pcbnew itself with a new cli
2022-10-04 01:53:37 +00:00
Ian McInerney
40ff7cb9bd
Fix some UI element spacing in settings panels
2022-09-25 15:41:39 +01:00
Ian McInerney
6b218ff764
Remove uneeded file pointer in gerbview code
2022-09-25 15:41:39 +01:00
Ian McInerney
eb2ea5bcd6
gerbview: Cleanup some unsigned comparisons that were extraneous
2022-09-24 03:46:06 +01:00
Jeff Young
7f34586c7e
Allow text variable resolution through properties in drawing sheet text.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12473
2022-09-20 15:28:05 +01:00
Jeff Young
30a4d3d2de
Coverity fixes.
2022-09-20 00:19:15 +01:00
Jeff Young
64a6fc0fd4
Push UNITS_PROVIDER down into a low-level mixin.
...
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Mike Williams
9304607624
TOOL_EVENT: make command string non-optional
...
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.
Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Jeff Young
45d6b4a9fc
Readability improvements.
2022-09-19 11:18:20 +01:00
Marek Roszko
f26a6f76e4
IUToMils should return int
...
It was already truncating even in old code...lets just clean this up
2022-09-17 09:27:27 -04:00
Marek Roszko
ece23d434b
Split up Double2Str to a format function to make its use case clear
2022-09-17 00:10:22 -04:00
Marek Roszko
3d5913c825
Remove convert_to_biu.h, merge contents to base_units.h
2022-09-16 21:09:28 -04:00
Marek Roszko
66e8931405
Remove IU_PER_MM thats standalone
2022-09-16 21:09:27 -04:00
Marek Roszko
7a5829f8d6
Move IU2Mils
2022-09-16 21:09:27 -04:00
Marek Roszko
e6ed275c25
Repoint IU_PER_MILS
2022-09-16 21:09:26 -04:00
Marek Roszko
a8613ee80f
Combine Iu2Millimeter & remove PcbMm2iu
2022-09-16 21:09:26 -04:00
Marek Roszko
ade5178c8c
Remove two common source files from gerbview
...
These are strangely already part of common but redeclared here
2022-09-16 21:09:01 -04:00
Seth Hillbrand
524b129c64
ADDED: Support for explicit DNP field
...
Dims elements shown as DNP. Adds property `dnp` to explicitly denote
parts that should not be populated. These parts are not included in X/Y
files
2022-09-16 22:26:16 +00:00
Mark Roszko
b00178adb3
Nuke base_units from orbit
2022-09-16 04:38:10 +00:00
lulu731
0180bcf90a
ADDED: Implement Drag and Drop
...
dropping files to Kicad manager :
*.kicad_pro, *.pro -> open project;
gerber and job files -> open in Gerbview editor;
Eagle and Cadstar files -> open project.
dropping file to schematic editor -> append schematic;
dropping library file to Symbol editor -> add library;
dropping board file to PCB editor -> append board;
dropping library or footprint file to Footprint editor -> add library or import footprint;
dropping ZIP file or gerber files to Gerbview editor -> open files;
dropping sheet file to Drawing Sheet editor -> open sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11638
2022-09-14 22:28:09 +00:00
jean-pierre charras
babffb230d
Revert "Gerber viewer: move layer colors with layers"
...
This reverts commit 75ed6b3ce7
.
It was a not really tested feature: It has a serious side effect: the color
settings are modified each time a .gbrjob is loaded (or loaded layers are sorted)
2022-09-13 18:33:31 +02:00
jean-pierre charras
a0d859c324
Gerbview: fix some issues related to color settings.
...
Now colors can be set both from the Layer manager and the
color settings panel, without loss of settings.
2022-09-11 14:40:04 +02:00
jean-pierre charras
6eb7c176a7
Gerbview: fix some issues (not all) related to color settings.
...
Some are old issues, probably related to Kicad code change.
2022-09-10 20:16:20 +02:00
Jeff Young
b95d9d660d
Move gerbview colors to preferences dialog.
2022-09-10 16:11:24 +01:00
jean-pierre charras
9626f0b66c
Gerbview: fix a minor but annoying issue about the drawing sheet color.
...
The color was not always the selected color but sometimes the default color.
2022-09-08 20:34:32 +02:00
jean-pierre charras
0b233d593a
Gerbview: fix missing pad shapes when exporting to Pcbnew.
2022-09-08 18:43:07 +02:00
Jeff Young
c30a557810
ADDED netclass assignment from PCB canvas.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Jeff Young
9188838e50
RIP EDA_RECT.
2022-08-31 23:57:24 +01:00
Jeff Young
ebe9617e77
More EDA_RECT expungification, and an attempt to fix the python test.
2022-08-31 17:19:48 +01:00
Jeff Young
f17a865593
Move EDA_ITEM hitTest to BOX2I.
2022-08-31 17:18:45 +01:00
Jeff Young
2dc6300501
Move EDA_ITEM bounding boxes to BOX2I.
2022-08-31 10:16:55 +01:00
Jeff Young
5679b9dbdc
Remove a few EDA_RECT instances.
2022-08-31 01:22:49 +01:00
Seth Hillbrand
b736460e71
Move optional access from value() to *operator
...
`value()` throws. Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
jean-pierre charras
7768c8f119
Gerbview: fix a typo that breaks gerber items collector.
2022-08-30 20:56:55 +02:00
Marek Roszko
f0956e48f2
Make EDA_TEXT common
...
Since EDA_TEXT is a base class, we can just force the child classes to pass the correct iu scaled size
ALLOW_BOLD_THICKNESS removed because it's a pre-custom font holdover
2022-08-29 07:31:03 -04:00
Marek Roszko
9acc5ac7ea
base_screen became free of base_unitry awhile ago
2022-08-27 14:02:51 -04:00
Marek Roszko
bf964d8678
Commonize page_info by simply making the Iu scale a parameter on call.
2022-08-27 13:36:00 -04:00
Marek Roszko
d807ab3089
Fix unused var warnings
2022-08-26 20:12:00 -04:00