Commit Graph

14106 Commits

Author SHA1 Message Date
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 d6fca11419 Finish up work on PlaceFile settings persistence.
We were missing several flags, and using the Plot output directory
instead of saving our own.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/12714
2022-10-24 22:23:11 +01:00
Jeff Young fa2a36b74e Add SMD and TH settings to config, and get rid of intermediate vars.
Fixes https://gitlab.com/kicad/code/kicad/issues/12715
2022-10-24 19:50:59 +01:00
Jeff Young 4778122aa0 Flip anything on a side-specific layer, rather than physical layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
2022-10-24 16:54:33 +01:00
Marek Roszko d06155f6af Allow the search pane to highlight nets
Fix https://gitlab.com/kicad/code/kicad/-/issues/12551
2022-10-23 19:54:12 -04:00
Jeff Young 2dec37f806 We must check clearance on all layers of multi-layer items.
(One layer may have a custom rule.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12733
2022-10-24 00:14:12 +01:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Wayne Stambaugh d78b41969f Fix broken autosave when board is modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12700
2022-10-22 15:49:03 -04:00
jean-pierre charras 63002cec57 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 12:50:26 +02:00
Jeff Young ce2dbdec75 Formatting and a bit of cleanup. 2022-10-21 18:41:39 +01:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Seth Hillbrand d1bf889e71 Resolve embedded text vars
Title Block text variables are embedded into the pcb file and should
be used for resolving when the project file is missing
2022-10-21 08:37:37 -07:00
Alex 67985510a8 Fix selecting pads of footprints in groups. 2022-10-21 17:13:24 +03:00
Jeff Young 585fac19c6 Copy connected-only and keep-top-bottom properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/12691
2022-10-21 00:05:11 +01:00
Jeff Young 6fd195c389 Use comma to separate diff pair nets/netclassse rather than /.
("/" is problematic because it's more likely to appear in netnames.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12592
2022-10-21 00:05:11 +01:00
Jeff Young 3451506d25 Slight performance improvement. 2022-10-20 18:37:48 +01:00
Jeff Young 323c04af2c Fix order-of-ops issue with calling collide before tesselating. 2022-10-20 18:37:48 +01:00
jean-pierre charras 6aa515e2f8 board_stackup_manager: fix incorrect behavior when adding a new dielectric layer.
Fixes #12680
https://gitlab.com/kicad/code/kicad/issues/12680
2022-10-20 11:27:35 +02: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 8d40bf25d6 Need to setup outline mode stuff if it's turned on late. 2022-10-18 14:41:27 +01:00
Jeff Young 1f0fa3ef63 Fix bug in new optionally-flashed via/pad zone fill logic. 2022-10-18 14:02:47 +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
Jeff Young 437d2c4589 Overhaul of remove-unconnected's zone filling and drawing strategies.
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state.  Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.

2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.

3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.

4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).

Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-10-18 13:05:42 +01:00
Wayne Stambaugh 598b09821a Coverity fixes. 2022-10-17 15:30:20 -04:00
Jeff Young 92f1ee556f Don't fill drawing sheet rects with transparent fill.
It might make sense to do that with board and/or schematic items for
hit-testing or something, but it definitely doesn't make any sense for
the drawing sheet border.

Also, when reading in items with a transparent fill, treat them as
unfilled (otherwise we get filled with layer colour in at least PCBNew).
2022-10-17 17:51:11 +01:00
Jeff Young 413fd82813 Re-entrancy guard for router tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/12604
2022-10-17 13:21:07 +01: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
jean-pierre charras f3bb34779a TransformTextShapeWithClearanceToPolygon() add optimization for 3D viewer.
This function convert a text shape to a set of polygons for the 3D viewer.
Texts shapes are a bit special and can generate a lot of small overlapping polygons.
These polygons are now merged before being added to the list of polygons handled
by the 3D viewer draw functions.
Locally merging polygons is usually not efficient but in this case it can speedup
the 3D viewer (up to 10x).
Mainly noticeable for silkscreen layers when the "copper" thickness is shown
2022-10-17 07:32:30 +02:00
Jeff Young 3e53426b6c Use same ratsnest colours in the router as the rest of KiCad. 2022-10-16 22:21:14 +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 631980b0ab We were saving the old board pointer, but not updating the current one.
This also makes a few other adjustments to order and to where we look
for the enabled layers which should make it more robust.

Fixes https://gitlab.com/kicad/code/kicad/issues/10925
2022-10-16 18:39:37 +01:00
Jeff Young 73e1676bdb Fix const-reference property access.
Fixes https://gitlab.com/kicad/code/kicad/issues/12639
2022-10-15 20:22:38 +01:00
Jeff Young d1fb32f26c Formatting. 2022-10-15 19:09:25 +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
Jeff Young b012cc1ac3 Don't resolve footprint text variables in footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/12658
2022-10-15 16:05:22 +01:00
Jeff Young 0d7185c2ff Fix mismatch between PCB_VIA defaults and file format defaults. 2022-10-15 11:17:58 +01:00
jean-pierre charras a855c9a40c Fix not handled exceptions. 2022-10-15 10:27:00 +02:00
jean-pierre charras 8098db2a20 BuildBoardPolygonOutlines: enable multiple main outlines: it works fine in 3D viewer. 2022-10-15 09:33:27 +02: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 7ffdfb1067 Clear Scintilla undo history after setting initial text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12650
2022-10-14 22:01:20 +01:00
Jeff Young 6f9bc0980b Refactor poly outline generator to handle multiple outlines.
Note: disjoint outlines are handled in footprint courtyards, but not
for board outlines.

Fixes https://gitlab.com/kicad/code/kicad/issues/7660
2022-10-14 20:32:04 +01:00
Jeff Young 6357c83a8c Debug code to try and catch Undo/SyncWorld mismatch.
Fixes https://gitlab.com/kicad/code/kicad/issues/12640
2022-10-14 13:25:25 +01:00
Jeff Young 07d9671126 Repair unbalanced UndoRedoBlock call. 2022-10-14 11:44:04 +01:00
Jeff Young b01bf081d8 Cleanup. 2022-10-14 11:12:25 +01: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 3090363cd5 Copy via flags down to the level the router consumes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12591
2022-10-13 17:41:42 +01:00
Jeff Young 46a41e2e34 Pin 0-sized pads at 1um rather than throwing them out.
(See bug report for more commentary.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12617
2022-10-13 14:47:50 +01:00