Commit Graph

3109 Commits

Author SHA1 Message Date
Seth Hillbrand 9be4bf0d14 Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

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

(cherry picked from commit 3cc1617f5a)
2024-04-01 17:55:29 -07:00
Seth Hillbrand b1677d5f47 Clean and standardize cross-probing action
Between schematic and pcb editors, we want the following actions:

- Single click on ERC/DRC item should show the item in the ERC/DRC
  window.  But if the window is not visible, it should only update the
  status bar
- Double click on ERC/DRC item should show and raid the ERC/DRC window
  as well as select the line item

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

(cherry picked from commit 0f57d76ecd)
2024-04-01 17:55:29 -07:00
JamesJ 18990587b9 Only delete grouped / generated BOARD_ITEMS from the root item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527

This is required as during an undo / redo operation, rebuilding
the previous selection can result in a group / generator being
selected as well as all of their contained items. This prunes
the contained items to remove the possibility of a double-delete.

(cherry picked from commit 6c73f1feef28925bf26fcc3669cb6333aad5f1d3)
2024-03-30 14:20:58 +00:00
wh201906 869f30e291 Add toggleHV45Mode item to the measure tool's context menu
The behavior of the measure tool is influenced by the
horizontal/vertical/45-degree mode, but the context menu of the measure
tool lacks an option to toggle this mode. In contrast, the drawing
tools are also affected by this mode, and their context menu has the
item to toggle this mode.


(cherry picked from commit 806daecf85)
2024-03-23 13:33:32 +00:00
Jeff Young 81f55dfc9c Fix layer swapping for multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17371

(cherry picked from commit 44c14b1935)
2024-03-17 12:40:58 +00:00
Yon Uriarte 6ebccdecc6 Responsive: Avoid excessive repaints when toggling a netclass' rastnest visibility.
Toggling netclasses visibility toggles the member nets' visibility one by one. Defer redrawing until all toggling is done.

Fixes https://gitlab.com/kicad/code/kicad/issues/17115

(cherry picked from commit 4e8e14ae3a)
2024-03-15 09:45:09 -04:00
Jeff Young f0e2adc3df Don't allow selection of footprint text in board editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17271

(cherry picked from commit 25e181db5c)
2024-03-14 18:06:11 +00:00
Seth Hillbrand 51d335c0e8 Temporary fix to disable zone-zone clearance display
When selecting two objects, we display the measured clearance between
them.  This can be problematic with large zones as they have thousands
of triangles.

This is a temporary fix for 8.0.1 to disable the check until we have a
performant version

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

(cherry picked from commit 686a62cbe6)
2024-03-08 10:32:37 -08:00
Jeff Young b57184efe0 Apply anti-walk algorithm only to textboxes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16481

(cherry picked from commit 20efeef5ae)
2024-03-06 13:53:09 +00:00
jean-pierre charras e769fdfab0 Pcbnew: do not select a PCB_REFERENCE_IMAGE if the LAYER_DRAW_BITMAPS is not visible.
LAYER_DRAW_BITMAPS layer controls transparency and visibility of images on the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2024-03-06 13:08:07 +01:00
Alex Shvartzkop 2ad3ccc4d8 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.

(cherry picked from commit 85b1978408)
2024-03-03 21:47:23 +03:00
Seth Hillbrand ecb0c9b5d4 Limit where the intersection of two lines can be
This avoids generating lines where we are unable to select them because
they get too close to the border

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

(cherry picked from commit 0129191ec0)
2024-03-01 15:57:45 -08:00
Seth Hillbrand 1e03266dfe Do not re-number aperture pads
Aperture pads do not have numbers, so reserving space for them will
cause the actual numbered pads to become out of order

(cherry picked from commit d3334ed9f0)
2024-03-01 13:04:47 -08:00
Seth Hillbrand 7d1adff071 Store group id rather than group
We only need the group storage id for lookup.  Storing the KIID instead
of a copy of the group avoids unneeded overhead

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17175
2024-02-28 13:27:08 -08:00
Jeff Young f4a085575a 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
2024-02-22 23:37:13 +00:00
Jeff Young a9c4a17c38 Repair copy/paste of footprint fields.
Some of the code got lost in the move to PCB_FIELDs.
2024-02-22 23:37:02 +00:00
Jeff Young 1a7152d3eb Warp after context menu only if actively drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11080
2024-02-22 23:36:59 +00:00
Jeff Young 08da9a4494 Don't modify reference point if already moving.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16524
2024-02-22 23:36:56 +00:00
Jeff Young 2ab492474e Improve alignment tooltips. 2024-02-22 23:36:34 +00:00
Jeff Young 0ead8a14a1 Handle holes in shapes when creating bounding hulls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16347
2024-02-22 23:36:24 +00:00
Alex Shvartzkop 6ceea747b2 Swap to capitalized strings (translated). 2024-02-22 11:54:52 +03:00
Alex Shvartzkop 59a0635b09 Disable local ratsnest when moving generators (tuning patterns).
They're not moving like normal objects, leaving ghost ratsnest.
2024-02-20 03:20:08 +00:00
Alex Shvartzkop ed712faf41 Disallow duplicating tuning patterns alone. 2024-02-20 03:20:08 +00:00
Mike Williams 3cd61a2d39 PCB: appending boards should not select existing generators 2024-02-13 10:15:30 -05:00
Jeff Young 0cf433b28e CONVERT_TOOL::CreateLines() doesn't use SKIP_STRUCT flag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16930
2024-02-12 23:59:33 +00:00
Jon Evans e9be95741b Deconflict hotkey for Route from Other End
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16415
2024-02-11 10:58:38 -05:00
Seth Hillbrand f303996f9c Add new icons for tools
Align elements to grid
Cleanup graphics
Cleanup tracks/vias
Drag

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16205
2024-02-09 15:55:57 -08:00
Seth Hillbrand cabbab9a5f Move pcbnew drag to move specific icon 2024-02-09 15:55:57 -08:00
Alex Shvartzkop fcdd34f58b Reserve strings for Tune Length 2024-02-10 02:44:05 +03:00
Jeff Young 4905c37712 Streamline explodePad undo.
Also fixes a bug where new shapes were added to the view
twice.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16888
2024-02-09 10:08:37 +00:00
Jon Evans 037f349585 Make expand connection work on generated tracks 2024-02-08 19:28:28 -05:00
Alex Shvartzkop f1caa262a6 Separate actions for single track and differential pair length tuning. 2024-02-08 14:58:28 +00:00
Jeff Young d30361b425 Increase artificial via preference further.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16880
2024-02-05 19:20:33 +00:00
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