7207 Commits

Author SHA1 Message Date
Jeff Young
a0940b10d4 Always provide a SCH_SCREEN to SCH_COMMIT.
Fixes KICAD-YKY
2025-08-18 22:09:21 +01:00
Seth Hillbrand
c51d26e70a Radiobutton groups get vertical by default so no spaces
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21496
2025-08-18 14:01:43 -07:00
John Beard
ed01324c1d Footprints: allow to set specific internal copper layers
Footprints can now have a custom stackup. This means that they specify
an exact number of copper layers and the layers map 1:1 to board layers.
If the board doesn't contain that layer, the element just doesn't
show. We could make this a DRC check later on.

If there is no stackup, the behavior is the current default: a rule area
the In1 layer "expands" to all Inner layers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10838
2025-08-19 04:59:48 +08:00
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
jean-pierre charras
614f4ddc05 Minor fix: Remove a useless include in .h files, costing compilation time. 2025-08-18 15:02:04 +02:00
Seth Hillbrand
c072133fa4 Ensure radio buttons are grouped
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21496
2025-08-17 07:45:01 -07:00
Seth Hillbrand
23c1a68da8 Make printing consistent with plotting.
How you ask?  Plot first -> then read the PDF and print directly to the
platform-specific printers.  Roundabout?  Yes.  Better than wx printing?
Darnbetcha.

Also allows multi-size page printing and proper margins and print
preview

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1831
2025-08-16 20:07:45 -07:00
Seth Hillbrand
9f2b04c7e2 Prevent autosave error from cluttering the screen
Once per session, per editor we can show the error.  After that, assume
that the designer has seen and knows about the issue.

Fixes https://gitlab.com/kicad/code/kicad/issues/21464
2025-08-16 13:49:32 -07:00
John Beard
85dcdd5cb2 Altium: advanced config to skip models
This can be really slow, and isn't required if testing
something that's unrelated to models in a large demo file.
2025-08-16 05:36:11 +08: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
Seth Hillbrand
ddae938aa4 Allow grouping tuning pattern with tracks
Any object that shares a name should be able to be handled in a group
2025-08-15 10:54:23 -07:00
Jeff Young
d5f16adde1 ADDED: maintenance page to preferences. 2025-08-15 16:57:46 +01:00
Jeff Young
9ff30873fc Prettify spacemouse preferences panel. 2025-08-15 16:57:46 +01:00
Alex Shvartzkop
49a1323945 Fix build error on MSVC. 2025-08-15 11:58:47 +03:00
Seth Hillbrand
17d9ff4fe7 Add the ability to edit advanced config
If you set the env var KICAD_EDIT_ADVANCED_CFG=1, you get a new menu
option in the KiCad project window's Edit menu.  Lets you modify the
settings for advanced config graphically without having to
remember/lookup the magic incantation
2025-08-14 15:37:02 -07:00
Seth Hillbrand
e97fab9aee Fixup live junction display
We were a bit aggro with how we removed junctions after finishing.  Now,
we can avoid this by removing moved junctions and re-adding when needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21480
2025-08-13 13:53:30 -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
Seth Hillbrand
188ffda029 Add a 90°-only mode for polygon creation
Sometimes, you don't want those 45° corners in your nice, clean zones.
This adds an additional mode that can be selected, cycling through
free-angle, 45° angle and 90° angle constraints
2025-08-12 16:48:36 -07:00
Seth Hillbrand
87ccb2abc0 Move Annotation preferences (most) to schematic setup
The scope, recursion, reset options and message filters remain in the
user preferences.  Others including numbering, sort order and reuse are
schematic preferences.

Also, the oddball subunit display remains here but it doesn't really
belong in annotation.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17942
2025-08-12 16:15:17 -07:00
Seth Hillbrand
0a5de5010f ADDED: Spacemouse support for Linux
Uses libspnav to handle spacemouse data.  Overlays on existing
spacemouse framework to handle view activation

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16133
2025-08-12 07:04:54 -07:00
John Beard
6c648c5ea6 Assign netclass dialog: use TransferDataToWindow 2025-08-12 20:01:02 +08:00
John Beard
d1aa7b148a Eeschema/Pcbnew: allow multiple nets to be assigned to a netclass at once
There is only a simplistic multi-net pattern expression
generator here (A|B|...) with a single prefix detected
rather than anything too fancy.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21451
2025-08-12 20:00:33 +08:00
Seth Hillbrand
a7e6fa8198 Allow panning with selectable key
Add optins to mouse dialog to allow modifier key-based mouse movement
panning

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2492
2025-08-11 13:21:22 -07:00
Jeff Young
38023a33b2 Give some more dialogs separate hashkeys for separate usages. 2025-08-11 17:19:12 +01:00
Jeff Young
6947b3b233 Even more open-coded dialog state-saving cleanup. 2025-08-11 17:19:12 +01:00
Jeff Young
cd325198c1 Give WX_TEXT_ENTRY_DIALOG a title- and label-specific hash.
This keeps us from attempting to save/restore control
state between different usage cases.
2025-08-11 17:19:12 +01:00
jean-pierre charras
da92279436 Pcbnew: add pad fabrication property Press-Fit
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21457
2025-08-11 15:59:19 +02:00
Jeff Young
8d26313d8d Separate control building from control value setting.
The first needs to happen before dialog layout, the
second after DIALOG_SHIM's control state restoration.
2025-08-10 18:30:14 +01:00
Jeff Young
44bd29d592 More removal of open-coded dialog state saving. 2025-08-10 15:57:20 +01:00
Seth Hillbrand
a9121d4cd1 Add asan switch indicators 2025-08-08 21:25:19 -07:00
Jeff Young
4819487ea2 Save/restore state of UNIT_BINDER and other textboxes. 2025-08-08 13:54:27 +01:00
Jeff Young
66ee17cdcd Start removing old open-coded dialog state saving.
(State saving is now handled uniformly in DIALOG_SHIM.)
2025-08-08 13:54:26 +01:00
JamesJCode
37ba83a44b Make delay base units documentation consistent with other usages 2025-08-07 17:59:46 +01:00
jean-pierre charras
0fccd846e6 Fix missing include. 2025-08-07 15:29:43 +02:00
Jeff Young
3f1f9e8e72 Remove stale comment. 2025-08-07 11:44:47 +01:00
Jeff Young
1e9da4684a Move properties inspector font-listing to SetChoicesFunc(). 2025-08-07 11:44:47 +01: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
Seth Hillbrand
065748213e Update lasso icon 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
e82d19eeb7 Pcbnew 3D: Add a toggle for plated barrel visibility
This can be useful when checking 3D models and/or generating
images of components in place on board, or if a dense via field is
in the way when looking at something on an inner layer.
2025-08-07 00:55:48 +08:00
John Beard
0eaedb770b Edit constraints: formalise ownership semantics 2025-08-07 00:55:47 +08:00
Seth Hillbrand
ece58909ba Avoid infinite loop if the grid size is zero or less 2025-08-05 16:18:02 -07: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
Seth Hillbrand
416e54f0d5 Update template selector to modern webview
Allow more attractive templates.  Start of building singular
template+new project layout

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15987
2025-08-04 22:20:54 -07:00
Seth Hillbrand
321b5793a2 Add some QA tests
Created basic tests for:
- Notification Manager
- Clipboard
- File history
- Filename Resolver
- Hotkey store
- Collector
- Reporters
2025-08-04 11:36:43 -07:00
Jeff Young
ea84879b06 Allow deletion of nested embedded files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20581
2025-08-04 19:11:59 +01:00
Jeff Young
7240128130 Formatting. 2025-08-04 19:11:59 +01:00
Seth Hillbrand
50c7aff3ff Simplify KiROUND using std::llround/clamp
Removes the bespoke rounding in favor of std::llround and std::clamp
routines
2025-08-04 09:26:25 -07:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Seth Hillbrand
e379e91081 Store hierarchy expansion/collapse state
Defaults to fully expanded but stores the names for nodes that are
collapsed in project local settings.  Because project local settings are
generally changed by modifying views or selection filters, these should
be saved on close rather than only when the project is saved

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19276
2025-08-04 08:34:09 -07:00