Commit Graph

3076 Commits

Author SHA1 Message Date
Jeff Young da46a96623 Update a few strings based on new string freeze policy. 2024-02-05 15:49:57 +00:00
Ian McInerney 7ea1568802 Fix selection tool behavior in footprint viewer
The footprint viewer isn't an edit frame, so we need to access the
settings through the base frame type instead. Also, double click makes
no sense in the footprint viewer, and just leads to weird results
sometimes.

Fixes Sentry KICAD-7A2
2024-02-05 14:50:17 +00:00
Jeff Young 0370db43ae A footprint does it's own child hit testing.
We only need to add it for groups.
2024-02-04 23:16:43 +00:00
Jeff Young cab351d249 Don't do a sided-test on a footprint which has no side.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2024-02-04 15:18:23 +00:00
Jeff Young 0890ac57dd Improve clarity of default zone settings. 2024-02-03 13:22:16 +00:00
Jeff Young 19560f0281 Fix pad edit mode undo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16835
2024-01-31 15:45:58 +00:00
Jeff Young 00aed2aa3e Don't attempt to test for recursion on unsaved file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16722
2024-01-28 15:37:08 +00:00
Jeff Young ade987c101 Fix logic errors in undo while drawing rectangles.
Draw 2 rectangles.  Start drawing a third, but don't
complete.  Hit Ctrl-Z instead.  Boom.
2024-01-27 21:18:50 +00:00
Jeff Young f7752ce0a1 Cleanup dead code. 2024-01-27 17:45:48 +00:00
jean-pierre charras 89f8c5d918 PCB_SELECTION_TOOL::selectPoint() Remove items disabled by the selection filter
before using any other filter. This avoid to select an item from the candidate
list that cannot be selected and eliminate another candidate.
Fixes #16755
https://gitlab.com/kicad/code/kicad/-/issues/16755
2024-01-26 19:13:50 +01:00
Jeff Young 053a0aade7 Formatting & commenting. 2024-01-26 14:05:04 +00:00
Jeff Young cc058a7927 Exit pad edit mode before closing footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16766
2024-01-26 13:49:17 +00:00
Ian McInerney d04b21c6d6 Ensure parameter typeinfo matches the actual object's typeinfo
AppleClang seems to generate different typeinfo for forward declarations
of classes than the actual class object, so the any_cast for the pointer
parameter fails due to the types not matching (even when they look the
same when printed in the error).

Instead, we must always ensure we use the actual object when defining
the parameter type when placing the object into the event.
2024-01-24 16:14:32 +00:00
Jeff Young d47a000564 Make sure group items get added to commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16705
2024-01-22 23:34:34 +00:00
Jeff Young d6b39c672e Footprint editor items always get added to footprint.
Also fixes an unrelated crash when assuming the current
editor is the board editor.
2024-01-21 22:51:36 +00:00
Jeff Young 37c185f437 Remove overly-complex snapping layer for moving objects.
We now have a hotkey to select Active Layer vs All Layers,
which gives the user more control.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16683
2024-01-20 22:04:56 +00:00
jean-pierre charras 7c3f8cbb79 3D viewer: do not load the current board twice when creating the 3D viewer frame. 2024-01-19 18:42:24 +01:00
Jeff Young c3e3f3bcb8 Possible fix for move individually.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16087
2024-01-19 15:13:41 +00:00
Jeff Young 57315dd625 Make sure group children get added to board.
Also fixes a bug where you could import on to an invisible
layer (we now auto-show the layer if you do that).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16642
2024-01-18 14:02:43 +00:00
Alex 3eb3fc9d1e Fix PCB arc edit point order. 2024-01-18 13:51:32 +03:00
Jeff Young 97cb15dd47 Make sub menus conditional on them having child items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16631
2024-01-18 00:21:15 +00:00
Jeff Young 455fae45d8 Support point editing of inverted rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16595
2024-01-17 15:27:48 +00:00
Jeff Young df48ebfbe7 Restore preferential selection treatment for silk items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16607
2024-01-17 14:02:43 +00:00
Jeff Young ace4ef7b16 Implement stingy selection mode for tuning patterns. 2024-01-17 00:34:22 +00:00
Jeff Young 322ad1af45 Implement copy/paste for generators.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16613
2024-01-16 23:38:50 +00:00
levanlap2502 faeec25557 Fix fillet lines, when line angle is 0 or 180
Check angle of line before creating Fillet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15966
2024-01-16 13:30:21 -08:00
jean-pierre charras 76bd892f93 Fix not working Duplicate command in FP editor
Fixes #16594
https://gitlab.com/kicad/code/kicad/-/issues/16594
2024-01-16 16:30:55 +01:00
Alex Shvartzkop f99505e190 Fix arc editing bugs when endpoints match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16532
2024-01-16 16:17:45 +03:00
jean-pierre charras 0ac23f9099 FP editor: ensure a newly created pad PTH has a hole.
When a new pad type PTH is created from a SMD pad master , previously its
hole had a null size because the master pad had a null size.
Also allows a HEATSINK pad to be added to a SMD footprint.
2024-01-11 16:27:05 +01:00
Jeff Young cd83dfa831 Stage/add/delete group members when adding/deleting group.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16540
2024-01-07 13:39:13 +00:00
Jeff Young 5aae8e2fd0 Code cleanup. 2024-01-04 16:13:42 +00:00
Jeff Young 0b526cca15 Delete tracks when deleting tuning pattern as part of sel. 2024-01-02 18:00:25 +00:00
Ian McInerney 53e16558a5 Refresh appearance panel when appending board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16226
2023-12-31 17:08:09 +00:00
jean-pierre charras b94c941217 Pcbnew, Fp Editor, pad_tool::PlacePad() avoid recreate from scratch a pad
when the previous is not used.
If a new pad is generated, when moving it by arrow creates a new pad for
each move by the current code.
This is not annoying unless the pad number is edited during move.
So, the pad number is now reinitialized only after the current pad is used,
not during the current move.
Fixes #16409
https://gitlab.com/kicad/code/kicad/-/issues/16409
2023-12-30 20:15:31 +01:00
Ian McInerney f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00: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
Ian McInerney d7fe668d79 Push PCB_IOs to use the base progress reporter instead of per-function 2023-12-27 17:06:23 +00:00
Jeff Young 6a5adc7646 Record nested footprints for collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16410
2023-12-24 19:40:21 +00:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Jeff Young 3f73bbcc4f Don't run keepUpright when not rotating.
For that matter, don't do anything at all for a rotation
of 0 (or a move vector of {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16402
2023-12-22 21:22:36 +00:00
Jeff Young 1f627a3a75 Fix two unrelated bugs in ungroup.
1) Don't double-remove the members from the group.
2) Don't auto-recurse BOARD_COMMIT::Stage for non-modify
changes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16419
2023-12-21 22:47:23 +00:00
Jon Evans b1695add9e Fix warnings 2023-12-19 22:38:34 -05:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Wayne Stambaugh 25c03da5a5 Coding policy and Doxygen comment fixes. 2023-12-18 08:32:41 -05:00
Jeff Young 16c8050f3d Fix event/flag race condition. 2023-12-17 21:55:29 +00:00
Wayne Stambaugh eb3fd10af8 Fix obscured object selection issue in board and footprint editors.
This selection improvement feature is hidden behind the advanced
configuration key "PcbSelectionVisibilityRatio".  It is turned off (1.0)
by default.  Value values are from 0.0 to less that 1.0.  From testing,
using a value between 0.1 and 0.3 produces the best results.

This fix uses normal alpha blending described in the link below.  The
current design only uses the alpha of the object's color.  It could be
improved by doing a full color alpha blending but using the color alpha
alone seems to result in satisfactory results.

https://en.wikipedia.org/wiki/Alpha_compositing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16126
2023-12-17 16:43:56 -05:00
Jeff Young 1b0cc82c56 Move a couple of stragglers to BOARD_COMMIT. 2023-12-17 21:01:31 +00:00
Jeff Young a96b7116d0 Make sure de-selected items get redrawn.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16385
2023-12-17 17:59:43 +00:00
Jeff Young b29a56530c Remove undo-of-ungroup hack.
The hack assumed that the parent group would be the first
deleted item of type group in the undo list.  While this
will be true when undoing a user ungroup command, it will
not be when undoing an ungroup side-effect, such as when a
member of a group is deleted during UpdateFromPCB.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16384
2023-12-17 15:35:35 +00:00