Commit Graph

1632 Commits

Author SHA1 Message Date
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