1064 Commits

Author SHA1 Message Date
Jeff Young
6f389fd320 Tighten parent/child undo/redo architecture.
Always look for pre-existing undo/redo record.  Checking for IsNew()
is less robust and should be avoided.  Also moves the checking to a
location where it will be easier to ensure that it's uniform.

Push get-undo-level-item processing down a level so it is uniformly
called.

Make sure tables & labels are uniformly handled.

Remove incorrect usage of Get/SetGroupId() for storing lastPin
(which we don't use anyway).

Lists of deleted and changed items MUST include the screen pointer.
An item could be changed on one screen but not on another.

Also tightens handling of PCB_NETINFO_T items, which are not in the
view.

Also fixes a bug where there is no increment parameter if you assign
the base increment command to a hotkey.
(This was discovered while testing the above changes.)

Also fixes a bug where delete during a move in PCB Editor did an
undo instead of a delete.
(Again, found while testing above.)

An experiment was also run to collapse shared parts of SCH_EDIT_FRAME
and SYMBOL_EDITOR_FRAME into SCH_BASE_EDIT_FRAME.  However, sharing the
undo code actually increased complexity, and there was very little else
of value in SCH_BASE_EDIT_FRAME (other than the Increment() routines).
2025-08-18 19:20:09 +01:00
Seth Hillbrand
1166cacc64 Snap point editor into place
Adds 90° support to the point editor and ensures editing is the same as
creating when it comes to point snapping

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21481
2025-08-15 12:19:06 -07:00
Jeff Young
60b4202766 CHANGED: Rework lock overrides architecture.
We now use a checkbox in the aux toolbar rather
than a query dialog (with "remember setting" checkbox).
2025-08-13 10:30:26 +01:00
Jeff Young
38023a33b2 Give some more dialogs separate hashkeys for separate usages. 2025-08-11 17:19:12 +01:00
Mark Roszko
990caa1988 Use the full bitmap bundles in ACTION_MENU 2025-08-06 20:28:41 -04:00
Seth Hillbrand
73aa437259 Finalize lasso selection tool
- Move under rectangular selection
- Simplify available modes
- Link to new icon
- Make selection state persistent
- Allow additive/subtractive with KiCad configurable keys
2025-08-06 16:07:43 -07:00
Andrzej Wolski
c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07:00
John Beard
0eaedb770b Edit constraints: formalise ownership semantics 2025-08-07 00:55:47 +08:00
Seth Hillbrand
29eee9f126 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping
2025-08-05 16:10:17 -07:00
Jeff Young
70d1950bbe Use hairlines for point editor construction lines. 2025-08-03 12:51:34 +01:00
Jeff Young
55a36c1ce7 CHANGED: retire the select-lib-table dialogs.
We now allow the user to specify which in the
New Library dialog.

Also retires the "Export power symbols too" dialog.

Also gives a bunch of file and library dialogs
more explicit titles.

Also removes separate code-paths for Export to
Library and Export to New Library.  The regular
code path has a "New Library..." button now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
2025-07-20 19:06:40 +01:00
Jeff Young
6541202d42 Repair COMMON_TOOLS to know about frame-specific WINDOW_SETTINGS
Remove the older architectures for ensuring non-empty
grids and zooms

Move new architecture to PARAM_LIST::Load,
and add zoom support

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21318
2025-07-15 15:24:11 +01:00
Mark Roszko
c29ca703c7 Remove accidental change 2025-07-06 11:12:19 -04:00
Mark Roszko
1ab8a5944b Add tiny test for IsCopperLayerLowerThan 2025-07-06 11:10:39 -04:00
Jeff Young
09e5afbe67 Don't ask for a string param from a frame_t event. (KICAD-THA) 2025-07-05 12:02:36 -06:00
Mark Roszko
b07fdd0e37 Add some variables to ctor initializer list for CONSTRUCTION_MANAGER
m_batchesMutex in particular needs to be ready before accptConstructionItems is called

Sentry KICAD-TYJ
2025-07-05 11:32:13 -04:00
Jeff Young
96c8d995dd Don't reset current tool in group when rebuilding toolbars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21125
2025-06-17 23:01:24 +01:00
Jeff Young
ca1db93013 Iterator safety. 2025-06-16 11:46:18 +01:00
Jeff Young
74bf678d99 Warp back from context menu before running command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19560
2025-06-16 10:58:03 +01:00
Jeff Young
7fbf51b17c Be more pedantic about RECURSE_MODE.
Also fixes an invalid iterator bug.

Also adds mirroring support for PCB_GROUPs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
2025-06-12 11:21:28 +01:00
aris-kimi
9c5b2c55fb Move simulation frame panel togglers to sch_actions and eechema.Simulator domain 2025-06-09 10:10:43 +01:00
Marek Roszko
34be0452fd Add some additional breadcrumbs 2025-06-07 09:01:05 -04:00
Seth Hillbrand
29dc45d584 Remove the forced ancillary grid
If you are moving an object, we already have the axis snap, forcing the
grid to center at the start of the move prevents us from easily aligning
elements by moving them.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18196
2025-06-05 12:04:25 -07:00
Jeff Young
e8e7282fe1 Fix a bunch more bugs in bezier approximation. 2025-05-26 18:12:43 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
aris-kimi
0cf866d4fb Inline static bool Fp/3Dmode members to remember panel layout
Layout is remembered for Schematic/Symbol Editors and Footprint Chooser frames until KiCad restarts

Also Added a new button toggle to show/hide the description panel with some new images too


Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17610
2025-05-20 16:16:01 -07:00
jean-pierre charras
4d0c7859e2 Zoom actions: add tool-tips and better FriendlyName when possible. 2025-05-18 20:16:21 +02:00
Mike Williams
3c5a48868b groups: add ability to add selection to group 2025-05-14 12:15:22 -04:00
Mike Williams
71f71641c2 groups: dialog needs shared_ptr for lifetime issues
Tool resets were deleting the commit out from under us.
2025-05-06 11:29:42 -04:00
John Beard
8a4496f458 Pcbnew: prevent a timer callback happening during ACTIVATION_HELPER destruction
Speculative fix, as I couldn't reproduce. But this seems like it could
cause the reported issue, though I think ~ACTIVATION_HELPER and the
callback should both be on the same event loop, so it's not clear to me
that it is exactly the issue.

And add a wxCHECK to at least bail safely before handing a nullptr off to the
later functions.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20693
2025-05-05 12:40:15 +08:00
John Beard
a116f5cd57 Point editors: move cycle arc mode to common action, add to menu
This isn't the best possible UX (having the various modes immediately
available as graphical affordances would be best). But it's somewhat
discoverable, and at least shows the hotkey, if any, and it in the
context menu and not hidden in a toolbar right click menu. So if the
affordance-type system doesn't make it for v10, this will at least
provide something in eeschema.
2025-05-02 21:30:33 +08:00
John Beard
01b29c12e0 Point editor: move arc editing behaviour to common code 2025-05-02 20:50:40 +08:00
jean-pierre charras
0755ab8ea9 Fix a few Coverity warnings (uninitialized vars) 2025-04-27 18:23:41 +02:00
jean-pierre charras
34e49758d0 Footprint chooser frame: fix crash in COMMON_TOOLS::ResetLocalCoords()
The crash was due to a null pointer thta can happens in Footprint chooser,
frame, when hit the space bar if the canvas showing the Fp has the focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20780
2025-04-26 18:19:05 +02:00
jean-pierre charras
b5a913e582 Fix a non-existing bitmap issue.
the bitmap BITMAPS::calculator, although in bitmaps_list.h, does not exists.
A suitable bitmap can be BITMAPS::icon_pcbcalculator_24.
So it is now used in ACTIONS::showCalculatorTool()
2025-04-19 16:52:33 +02:00
Jeff Young
ec6af4a5b4 Move Execute() to COMMON_CONTROL.
Also fixes other apps coming up in background.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
Jeff Young
24cef6d165 ADDED: calculator tools to Tools menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
JamesJCode
a5be581b1b Add char_traits<T> specialisations for wxUniChar and NANODBC_SQLCHAR
when building on Apple with Clang >= 17.

These specialisations are not strictly required by the C++ standard,
and have been removed from LLVM.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20631
2025-04-15 20:57:23 +01:00
Mike Williams
fd4b18140f group tool: make sure frame specific commits are created 2025-04-15 10:19:40 -04:00
Mike Williams
8c9f4e7832 groups: tools/dialogs need commit screens for schematic 2025-04-15 09:59:38 -04:00
Mike Williams
0c0dbc6271 groups: commonize group tool 2025-04-15 09:59:38 -04:00
jean-pierre charras
f8ec23db00 WX_PT_ENTRY_DIALOG: enhancements: fix min size and add reset button.
It is used to enter a point position and a grid origin.
The new button (only in grid origin dialog) allows reset the position.
2025-04-03 13:19:20 +02:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams
f40b24d04a groups: move actions to common actions 2025-04-01 14:34:20 -04:00
Jeff Young
60a26308ae COMMIT lifetime safety.
If we pass a COMMIT to a posted action, the COMMIT
may no longer exist when the action is run.
Equally problematic, if another COMMIT is pushed
in between we'd probably also run into trouble.

We still allow the API to do this because we don't
have a better solution at present.  But we need
one.
2025-03-29 21:24:08 +00:00
Jeff Young
b62f00912e Remove debug assert that's clogging up Sentry. 2025-03-29 21:24:08 +00:00
Mike Williams
e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -04:00
jean-pierre charras
925f2f9bc1 class TOOLBAR_ITEM_TYPE: replace GROUP by TB_GROUP (collision with a Windows header) 2025-03-02 14:49:03 +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