Ian McInerney
55a7cfcf36
Translate doDelete action to new framework and add default parameter
2023-06-20 21:52:50 +01:00
Ian McInerney
9ebe6e7614
Update tool manager to handle the std::any parameters
2023-06-20 21:52:50 +01:00
Ian McInerney
b04e54dbea
Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
...
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Ian McInerney
0a22bb951c
Add custom UI IDs to the action framework
...
This replaces a hack where the parameter was used to identify a custom
UI ID with a proper solution. This moves the cut/copy/paste actions to
the new system, but more like help/quit/close should also be moved over
in the future.
2023-06-20 21:52:50 +01:00
Ian McInerney
b63bbdea5f
Add function-chain contructor for TOOL_ACTION
...
A function-chain constructor method allows for the long list of
parameters to the constructor to be shrunk to only the ones needed by
each action, and allow self-documenting code for what each part of a
TOOL_ACTION constructor does.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/7617
2023-06-20 21:52:50 +01:00
Mike Williams
85f889bc19
Fields: Description now mandatory
...
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams
636db607c1
Footprints: upgrade Sheetpath and Sheetfile to tagged items in file
...
Rather than loose kv properties.
2023-06-20 18:34:52 +00:00
Mike Williams
7d84fa2a9d
Validators: drop unused is m_isLibEditor
2023-06-20 18:34:52 +00:00
Mike Williams
ddafa2e75d
Common: move SCH_FIELD_VALIDATORS to FIELD_VALIDATORS
...
Fields are now common across PCB/SCH
2023-06-20 18:34:52 +00:00
Mike Williams
6d93950dcc
PCB: abolish TEXT_TYPE::TEXT_is_*
...
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams
37837dc392
PCB: introduce PCB_FIELD_T
2023-06-20 18:34:52 +00:00
Mike Williams
968785382e
PCB_FIELD: add new field item similar to SCH_FIELD
2023-06-20 18:34:52 +00:00
Jeff Young
8c29091001
Add a "hyperzoom" mode for debugging "up close".
2023-06-20 14:19:21 +01:00
Jeff Young
30336b2fe3
Unify go-back-one-step processing for drawing tools (and router).
...
Also warps mouse on all go-back-one-step operations for better feedback.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Jon Evans
55c00f1845
ADDED: Initial support for importing Solidworks PCB files
2023-06-19 11:57:33 -04:00
Jeff Young
ecb2fcd559
Don't trip over null strings.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989
2023-06-18 20:28:11 +01:00
Jeff Young
9199d7a781
Update simulation results as the sim runs.
...
Also adds a time axis which grows by 2X at a time rather than to the
size of the current data.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11255
2023-06-18 16:52:11 +01:00
Jon Evans
b424dc11e1
Hotkey feedback for inactive layer display mode
2023-06-17 23:47:26 -04:00
Jon Evans
fc69939190
ADDED: GUI feedback when grid setting is changed by hotkey
...
Can be extended to other cyclical hotkey settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Jeff Young
7f453d7943
Fix bug in wildcard search handling.
2023-06-17 23:53:37 +01:00
Alex Shvartzkop
940f92a44f
GAL: improve redraw handling, allowing higher refresh rates.
...
minRefreshPeriod can't be set in SwitchBackend because OpenGL isn't
initialized yet.
2023-06-17 12:42:22 +03:00
Jeff Young
ef6866757e
Treat undo as backspace and/or escape when drawing. Ignore redo.
...
Undo == backspace when drawing a polygon or chained lines. Otherwise
it's an escape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Jeff Young
b3235ce667
Handle some Mac-standard keyboard shortcuts in Scintilla.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973
2023-06-16 17:19:18 +01:00
Alex Shvartzkop
d3be62f644
Adapt panels to PAGED_DIALOG sizing algorithm.
...
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Alex Shvartzkop
6ace80700e
PAGED_DIALOG: make sure the dialog is big enough to contain page.
2023-06-16 19:12:37 +03:00
Alex Shvartzkop
f5da58e17d
PAGED_DIALOG: allow setting initial size in ctor.
2023-06-16 18:53:00 +03:00
jean-pierre charras
e7fac08c2f
Worksheet editor: fix crash when adding new graphical text object.
...
Was due to use of a null pointer.
Fixes #14966
https://gitlab.com/kicad/code/kicad/-/issues/14966
2023-06-16 17:31:38 +02:00
Jeff Young
75e78f9088
Move bitmap2cmp and pcb_calculator to tool framework.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1939
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7561
2023-06-16 15:37:58 +01:00
Jeff Young
d8debfa0ee
Require regular expressions to be explicit.
...
Normally this means surrounded by forward slashes, but we also still
allow any regular expression in a netclass match to keep from breaking
existing documents.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14944
2023-06-16 15:37:58 +01:00
Wayne Stambaugh
285f8a0e59
Command line PCB gerber export fix and improvement.
...
The --board-plot-params argument was never parsed so it was always ignored.
[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
file extension (gbr) instead of the Protel gerber file extensions.
(cherry picked from commit 4e79d1ecdd
)
2023-06-16 07:17:39 -04:00
Jeff Young
150e2b8a19
Separate BITMAP2CMP_PANEL from BITMAP2CMP_FRAME.
...
This is primarily to allow wxFormBuilder to create the panel without
the dangerous hack of passing a wxWindow ID into KIWAY_PLAYER's ctor.
2023-06-15 17:39:10 +01:00
Jon Evans
c90fe84cc1
Fix missing change in d996ec14
2023-06-14 23:23:36 -04:00
Jon Evans
d996ec143f
Fix STD_BITMAP_BUTTON for GTK HiDPI
2023-06-14 23:14:07 -04:00
Jeff Young
46564055f4
More protection around an exceedingly dangerous hack.
...
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).
2023-06-14 12:52:49 +01:00
Alex Shvartzkop
dfb05c4f4b
Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.
...
Assert handler is already being called from wxCHECK.
2023-06-14 07:45:34 +03:00
Mark Roszko
03990ee7e0
Move the custom assert handler to release builds only
2023-06-13 13:04:37 +00:00
Marek Roszko
992ed34365
Disable sizer asserts in release
2023-06-13 07:08:33 -04:00
Seth Hillbrand
f76c94e622
Don't log asserts in release mode
2023-06-12 15:26:18 -07: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
Jeff Young
b7f0aae006
Nullptr safety for UI Conditions.
...
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.
Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young
d6aefc458c
Clear the playerFrame lookup cache when closing frames.
...
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....
This is an attempt to fix KICAD-39.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14928
2023-06-11 20:34:24 +01:00
Alex Shvartzkop
eaf65f7d53
Avoid deadlock when OpenGL context can't be created.
...
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.
2023-06-11 18:59:00 +03:00
Roberto Fernandez Bautista
3f758711fd
Use external REPORTER for EESCHEMA_JOBS_HANDLER / PCB_JOBS_HANDLER
2023-06-10 23:35:32 +02:00
Jeff Young
f66b9f75a3
Allow EDA_COMBINED_MATCHER use in KiCad find architecture.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12532
2023-06-10 14:50:06 +01:00
Jeff Young
f2c2017068
Formatting. No (intentional) functional changes.
2023-06-10 13:36:17 +01:00
Alex
2450435131
Support --mirror option in "kicad-cli pcb export pdf"
2023-06-10 04:54:11 +03:00
Jon Evans
4e6092a280
Turns out only MSW has odd behavior for bitmap sizing
2023-06-09 08:58:52 -04:00
Jeff Young
d5b5a3eaf4
Add action info to Undo/Redo menus.
...
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
2023-06-07 14:37:34 +01:00
Nils VAN ZUIJLEN
518741c52a
cli: add an option to the pcb exports for plotting negative svg and pdf
...
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-07 13:28:52 +00:00
jean-pierre charras
47c0c7b3b7
pcb_calculator: add iec60664 electrical spacing panel.
...
From patches from by Fabien Corona and Aris_kimi
2023-06-07 12:01:30 +02:00