Commit Graph

2646 Commits

Author SHA1 Message Date
jean-pierre charras 248181e62d Fix Coverity and compil warnings. 2022-11-12 16:02:24 +01:00
Jeff Young d9987e9569 Orig_items will have been invalidated by Revert.
Don't use it to rebuild the selection.  Use the board_item flags instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/12882
2022-11-11 22:57:38 +00:00
Jeff Young 138f835672 Retire group bbox cache.
It's too hard to maintain when changes to other items (the groups
members) affect it.
2022-11-11 20:31:31 +00:00
Jeff Young 3fc727bb91 Clear selection before deleting objects during conversion.
Fixes https://gitlab.com/kicad/code/kicad/issues/12879
2022-11-11 17:53:01 +00:00
Jeff Young 03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Alex 0b4fc8f50d Fix bugs in PCB arc editing. 2022-11-11 15:00:36 +05:00
Alex 46d4861187 Use the 45-degree limit button to apply alternative constraint. 2022-11-11 15:00:36 +05:00
Alex 8b0f3f1ee7 Set keeping the center as the default arc editing mode. 2022-11-11 15:00:36 +05:00
Jeff Young 3f63f9fc57 Don't prune inner layers of through-hole parts.
For historical reasons we've always included ALL inner layers in these
items and changing that has uncovered several latent bugs.  Rather
than find all the rest this late in the game, I went back to storing
all inner layers, even those the board doesn't currently have.

Fixes https://gitlab.com/kicad/code/kicad/issues/12863
2022-11-09 15:58:14 +00:00
Jeff Young 4066850f37 Use event point to determine if we're still in draggable item. 2022-11-09 13:09:01 +00:00
Seth Hillbrand 056f45cd70 Fixup most intersecting polygon points
Remaining is the intersecting complex pad, so this keeps the error
message when drawing

Fixes https://gitlab.com/kicad/code/kicad/issues/12806
2022-11-08 16:05:04 -08:00
Jeff Young 2cfe78170c Honour selection filter when picking move anchors.
Fixes https://gitlab.com/kicad/code/kicad/issues/12773
2022-11-08 16:27:18 +00:00
jean-pierre charras cb3d215b6a Fix compil and Coverity warnings. 2022-11-08 11:53:13 +01:00
Jeff Young be8bbcaac3 Send Selected event even if the result is an empty selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/12849
2022-11-07 19:47:51 +00:00
Jeff Young b5f62da5d9 Respect synthetic layer visibility when selecting footprint texts.
Fixes https://gitlab.com/kicad/code/kicad/issues/12850
2022-11-07 19:26:14 +00:00
Jeff Young ae741b93e6 Resore push/pop-less PickerTool.
(Functionality was accidentallly lost when we removed the opt command
strings.)
2022-11-07 19:11:12 +00:00
dsa-t 0b3ecdd968 Revert "Fix handling of self-intersecting polygons"
This reverts commit ed309e20da
2022-11-07 09:41:56 +00:00
Jon Evans dd94b2d3a7 Rename PROPERTIES to STRING_UTF8_MAP for clarity
This class has nothing to do with the properties system
2022-11-06 11:51:52 -05:00
Jeff Young bb618f2d55 Update pointEditor after cancelled move. 2022-11-05 16:50:54 +00:00
Seth Hillbrand 8bc9d456c3 Fix area selection calculation
area was a double value for comparison of large numbers.  But the
promotion from int happened after the multiplication (and overflow) for
large images

Fixes https://gitlab.com/kicad/code/kicad/issues/12821
2022-11-03 11:46:40 -07:00
Seth Hillbrand ed309e20da Fix handling of self-intersecting polygons
We allow temporary self-intersection but before committing, we reduce
the polygon to a single outline (optionally with holes)

Fixes https://gitlab.com/kicad/code/kicad/issues/12806
2022-11-01 13:09:11 -07:00
Seth Hillbrand c7c4439027 Allow bezier->line/poly conversion
Fixes https://gitlab.com/kicad/code/kicad/issues/12778
2022-10-31 12:48:53 -07:00
Jeff Young 3b3e6de515 Disable mirror commands when a single footprint is selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/12752
2022-10-28 19:20:24 +01:00
Wayne Stambaugh 6a0db3e7e2 Fix Coverity warnings. 2022-10-26 14:39:44 -04:00
Jon Evans 960c92634f Improve logic of Position Relative tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12672

(cherry picked from commit 2d2912c23d)
2022-10-24 18:47:38 -04:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young e3842514e7 Move courtyard collision setting to preferences.
Also cleans up PCBNew/FPEditor edit options panel to be more in sync
with each other.
2022-10-19 11:33:11 +01:00
Jeff Young 403cc50e7c Don't exit group when the cancel went to another tool.
Also fixes a bug where the group border didn't get updated immediately
on enter/exit.

Fixes https://gitlab.com/kicad/code/kicad/issues/12669
2022-10-18 17:53:06 +01:00
Jeff Young 4633d251a5 Remove single-zone-fill and unfill.
These are incompatible with our zone-priority-based algorithms.
2022-10-18 13:45:28 +01:00
Wayne Stambaugh 598b09821a Coverity fixes. 2022-10-17 15:30:20 -04:00
Jeff Young 46752499df We need both a tool-oriented delete and one that doesn't push/pop, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/12600
2022-10-17 13:21:07 +01:00
Jeff Young e9f8454a67 No DRC engine in footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/12658
2022-10-16 18:39:37 +01:00
Jeff Young 4af98827fd Revert change for 11299, and update removed-pad items after zone fills.
Fixes https://gitlab.com/kicad/code/kicad/issues/12645
2022-10-15 16:06:57 +01:00
Seth Hillbrand 697056fa7e Correctly sort positions for default align
When not aligning under mouse cursor, choose the X-most element where X
is top/bottom/left/right.  Previous sorting was not correct for two
directions

Fixes https://gitlab.com/kicad/code/kicad/issues/12627
2022-10-14 16:15:06 -07:00
Jeff Young de5980b92e Share more of the courtyard collision highlighting code. 2022-10-14 10:42:07 +01:00
Jeff Young 11dc5424cb Pull interactive courtyard checker out of move tool to share with router.
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-14 00:48:37 +01:00
Jeff Young 8f1b4a9c03 Include cleanup. 2022-10-13 23:15:41 +01:00
Jeff Young 8b9cbd5805 Don't reset editPad if it still exists after model reset.
Fixes https://gitlab.com/kicad/code/kicad/issues/12630
2022-10-13 00:07:30 +01:00
jean-pierre charras d0d625dcb5 BOARD_INSPECTION_TOOL::LocalRatsnestTool(): set a suitable cursor when activated. 2022-10-12 15:56:41 +02:00
Jeff Young 83310659fd Basic geometry: R != D.
Fixes https://gitlab.com/kicad/code/kicad/issues/12601
2022-10-10 19:18:37 +01:00
Jeff Young 8470b178cd Use actual pad shapes or built outline instead of effective shpaes for anchors.
The effective shapes don't work very well in the custom pad or rounded
rectangle cases, and they're somewhat slower in some of the other cases.

Fixes https://gitlab.com/kicad/code/kicad/issues/12601
2022-10-10 18:11:32 +01:00
Jeff Young 79dabdd484 Fix typo. 2022-10-07 23:52:47 +01:00
Jeff Young 04fec5016b Add keepout zones set to keepout footprints to footprint courtyard checker.
(This is for the move tool, not DRC.  DRC uses more sophisticated keepout
processing which is too slow for the move tool, and doesn't let us know which
keepout area collided for collision highlighting.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-07 22:23:37 +01:00
Alex 165654f114 Expose Switch Arc Posture in context menu. 2022-10-07 08:28:13 +03:00
Alex d26b59a0bf Improve arc construction using angles from arc geometry manager.
Fixes https://gitlab.com/kicad/code/kicad/issues/11713
2022-10-07 06:51:00 +03:00
Alex 22917860ef Move Enter Group for easier access. 2022-10-07 03:03:33 +03:00
aris-kimi f818f3a445 Fix footprint rule and zone area anchors
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12575
2022-10-06 15:29:18 +00:00
Jeff Young 436d75e7f9 Try to reconcile SELECTION and BRIGHTENED use of overlay.
For some reason the overlay doesn't get redrawn during the PCBNew
selection disambiguation menu, so we need to not hide BRIGHTENED
items.

Fixes https://gitlab.com/kicad/code/kicad/issues/12547
2022-10-04 17:01:56 +01:00
Jeff Young 524a43f95e Don't select footprints on the wrong side if not visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/12483
2022-10-04 13:22:06 +01:00
Jeff Young ba630971af Possible fix for move/esc/esc crash.
Fixes https://gitlab.com/kicad/code/kicad/issues/12553
2022-09-30 23:05:55 +01:00