7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 00:30:01 +00:00
Commit Graph

170 Commits

Author SHA1 Message Date
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Brendan Hickey
33a8cd942f Increase GerbView max DCode Id to 2^31-1
I (charrasjp) fixed the compil issues of the Brendan Hickey's initial work and some other minor issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20323
2025-03-20 11:27:53 +01:00
jean-pierre charras
eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Ian McInerney
c24dbc17bf Move toolbar setup flags into the action definition
This makes them centrally defined, and removes the need to specify them
when creating the toolbar.
2025-02-28 01:57:37 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jeff Young
535aca7a8d Remove redundant tooltips.
Also fixes grammar and capitalisation in a few tooltips.

Also standardises some terminology, such as
"Add" vs "Draw"/"Place" and "Assignment" vs "Association".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17694
2024-08-18 17:18:07 -06:00
Tomasz Wlostowski
9963b9dd9f TOOL_INTERACTIVE: only create the context menu when we are running in GUI mode
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless  mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
2024-08-13 22:50:26 +02:00
Seth Hillbrand
c0bf866c58 Speed up shutdown
When shutting down, we shouldn't need to do a lot of things like
resyncing the PNS world multiple times that can really slow down the
process
2024-07-05 11:16:20 -07: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
ca3cd706e5 Show friendly name in toolbar button tooltips.
(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)

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

(cherry picked from commit f4a085575a)
2024-02-23 16:53:33 +01:00
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Mike Williams
fc903592ed Hotkeys: fix multiple assignment of N key
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16376
2023-12-18 11:13:47 -05:00
Ian McInerney
dd933b7d0e Update CERN copyrights 2023-11-08 21:34:14 +00:00
Jeff Young
db46b6f925 Show selection before opening menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15922
2023-11-03 12:36:30 +00:00
Ian McInerney
171458a27b Introduce action friendly names
Friendly names can be used to display action information that is clearer
in non-hierarchical contexts (e.g. not in menus).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8075
2023-10-27 23:58:29 +01:00
Jeff Young
435e3fab8d Support text variables in STEP export filename.
Also fixes some other file browser titles to match Kicad's overall style.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15927
2023-10-23 18:01:47 +01:00
Marek Roszko
bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Marek Roszko
67b031adab Painter base class should just live in gal instead of being in denial 2023-09-06 20:23:19 -04: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
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
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
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
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
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
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
Marek Roszko
66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko
e6ed275c25 Repoint IU_PER_MILS 2022-09-16 21:09:26 -04: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
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
2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +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
Seth Hillbrand
f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Jeff Young
aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Mike Williams
aea89a632b Gerber Viewer: fix high contrast mode, respect high cycle shortcut 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
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
Jeff Young
57acce9e55 Share more code between selection tools. 2022-07-11 19:04:08 -06:00
Jeff Young
4e3109a633 Wide string decls for gerbview. 2022-02-05 22:34:45 +00: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
eee20f9f67 Gerbview: reduce redundant file loading code 2022-01-24 08:40:49 -05:00
Jeff Young
9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young
e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Seth Hillbrand
f97c7c78c8 Connect ruler tool with axes preferences
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them

Fixes https://gitlab.com/kicad/code/kicad/issues/9737
2021-11-23 12:52:21 -08:00
Seth Hillbrand
cf6b18ec7e Remove escaped double-quotes
For some reason, escaped double quotes in wxString::Format cause issues
on Mac.  We can replace them with single quotes in most places without
loss of clarity
2021-11-03 17:03:14 -07:00
jean-pierre charras
0a152f98ac GERBVIEW_INSPECTION_TOOL: fix not working "show source..." tool. 2021-10-30 12:56:32 +02:00