Commit Graph

15331 Commits

Author SHA1 Message Date
Ian McInerney ae60b57c3d Add default parameter to PCB image placement action 2023-07-13 13:15:19 +01:00
jean-pierre charras 7ac0ca9c14 Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 10:53:50 +02:00
Ian McInerney e82a58a12e Changed: Allow filling/unfilling individual zones with no selection
The draft fill and single zone unfill would only work if something was
selected first, this allows them to call the selection operation to
request what is under the cursor. Also properly gate the operation to
not cause crashes/issues when the selection contains non-zone items.
2023-07-12 23:00:13 +01:00
Seth Hillbrand dde017cdc2 Force remove tree watcher when setting
The lib watch on Mac may not actually remove the tree on DTOR, so we
need to force the removal.  This also adds some additional debug flags
if the issue continues

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-12 14:29:06 -07:00
Ian McInerney a8f628d0df Add virtual destructor for base class 2023-07-12 19:39:15 +01:00
John Beard 09c0f713cd Add fillet and chamfer icons 2023-07-12 19:21:47 +01:00
John Beard a72ab9f351 Put fillet, chamfer and extend in a submenu 2023-07-12 19:21:47 +01:00
John Beard 046d978ba7 ADDED: Pcbnew chamfer and extend tools
Using the new ITEM_MODIFICATION_ROUTINE system, drop in two new
tools: chamfer and line extend. These are two geometric operations
that are relatively common when editing footprints in particular.

Chamfer delegates the geometric calculations to a dedicated unit
in kimath/geometry.
2023-07-12 19:21:37 +01:00
John Beard 8e0e9ce752 Generalise fillet tool
Describe the actions of the fillet tools is a generic way, so that the
same general pattern can be used for other tools that modify shapes on
the BOARD.

Basically, an "ITEM_MODIFICATION_ROUTINE" is defined, which is
configured and called multiple times, calling back to the EDIT_TOOL when
it modifies or creates an item.

The motivation here is to make it easier to slot in new line-based
tools like chamfer, extend and so on without having to redo the
complicated item, selection and commit handling each time, and keep the
core "routines" simple and decoupled from the EDIT_TOOL's
internals.

This also resolves #15094 because the new commit handling does the right
thing when items were "conjured up" for the fillet (e.g. when a
rectangle is decomposed into lines).

Fixes: #15094
2023-07-12 19:21:26 +01:00
Seth Hillbrand 3030c80de7 Record hole knockouts in zone filler earlier
Spokes are placed across an entire pad when filling, so the hole
knockouts need to knocked out prior to deflating

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15160
2023-07-12 11:17:57 -07:00
Jeff Young 8f754c7c3e A more performant and slighty more aggressive blob trimmer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14462

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14107
2023-07-12 17:30:42 +01:00
Jeff Young 56752e9bad Move some MRU paths from app to project.
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
jean-pierre charras 2e7db309bd Fix typo 2023-07-12 17:24:03 +02:00
jean-pierre charras b47f172e57 PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.
Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
2023-07-12 13:02:05 +02:00
Jeff Young be63e1824e Create filled polygons when centerline is chosen. 2023-07-12 10:41:46 +01:00
jean-pierre charras 2cb23bd43a VIA on solder mask: fix incorrect size (radius) of displayed mask 2023-07-11 17:35:30 +02:00
jean-pierre charras 74c5f5a054 Ensure a layer exists before using it.
Fixes #15170
https://gitlab.com/kicad/code/kicad/-/issues/15170
2023-07-11 16:19:46 +02:00
Jeff Young c3d10084b9 ADDED footprint associations dialog. 2023-07-11 14:52:05 +01:00
Mike Williams 3a7de82243 PCB: respect styling settings when inserting footprint from editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15155
2023-07-11 08:16:48 -04:00
jean-pierre charras ab4535f01b Pcbnew, show solder mask on VIAS: refinement: take in account the mask expansion. 2023-07-11 11:07:50 +02:00
Jeff Young 879e6c302d Redraw via mask layers when switching Tented Vias on/off.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-10 23:29:54 +01:00
Ian McInerney aab8d2b036 Give autocomplete routing a default parameter
Fixes KICAD-2M4
2023-07-10 19:41:03 +01:00
Jeff Young 8f5b7569d1 Split StyleFootprints into separate bools for fields vs text & graphics.
Also moves the settings from Board Setup to Preferences > PCB Editor.

Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
2023-07-10 17:15:57 +01:00
Jeff Young db61fe03b3 Prefer MRU path to LastImportExportPath for importing footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 22:28:26 +01:00
Jeff Young df63ca0189 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896
2023-07-09 20:36:55 +01:00
jean-pierre charras bdaad32dc8 Pcbnew: fix crash when trying to delete a DIMENSION living in a footprint
Fixes #15156
https://gitlab.com/kicad/code/kicad/-/issues/15156
2023-07-09 20:02:56 +02:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mike Williams cc7798745e Board Settings: control styling of footprint fields
Can use library values or board default settings. Defaults to board
default settings.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8161
2023-07-08 19:58:11 -04:00
Jeff Young 1d0a5ca34b No point in having a RATSNEST_VIEW_ITEM in FP editor, viewer, etc. 2023-07-08 22:54:14 +01:00
Jeff Young 5bf257cdf6 Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153
2023-07-08 22:50:22 +01:00
Mike Williams bfc3dcbe26 Footprint Editor: don't override field text sizes in editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15134
2023-07-08 16:50:15 -04:00
StuartTylerRelytDesigns d26aa7dc20 Pcbnew moveIndividually ctrl-M mangles 2+ tracks
CHANGED: moveIndividually ctrl-M not mangle tracks and add grid snapping

Fixes https://gitlab.com/kicad/code/kicad/issues/15124
2023-07-08 09:11:53 +00:00
Jeff Young dc838bc50f Formatting. 2023-07-07 23:41:58 +01:00
Jeff Young 9d9344a815 Save, clear, and restore selection around a footprint reload.
Also fixes a bug with the footprint's UUIDs getting reset.
2023-07-07 23:41:58 +01:00
Seth Hillbrand 954b265839 Check for zone-zone overlap
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps
2023-07-07 11:52:25 -07:00
jean-pierre charras 27072e52f7 Fix a compil and Coverity warnings 2023-07-07 10:28:01 +02:00
jean-pierre charras 4f7e9bead5 Fix a typo than can create a crash
Fixes #15126
https://gitlab.com/kicad/code/kicad/-/issues/15126
2023-07-07 10:17:02 +02:00
John Beard ef8cf2d12b Avoid inheriting for POSITIONING_TOOLS_MENU
This only uses the public interface of CONDITIONAL_MENU,
so we can just make on of those and save declaring a wrapper
type.
2023-07-06 21:11:51 +01:00
Mike Williams efb452df37 PCB: selectionCursor can optionally take a filter list
Make sure we pass a default nullptr parameter if we want everything.
2023-07-06 11:25:53 -04:00
Mike Williams a1f42b823f PCB: drop unused lockable items list
Unused by any code, and list is incorrect anyway.
2023-07-06 11:25:41 -04:00
Kuba Sunderland-Ober 3b261256e7 Use static casts between related classes. 2023-07-05 10:20:18 +00:00
Ian McInerney 50e0a3a500 Move layer ID to action mapping to PCB_ACTIONS
This mapping function is better suited for a method of the actions
itself rather than just a helper function in one file.
2023-07-05 11:09:34 +01:00
Alex Shvartzkop a80ac8286d EAGLE PCB import: fix footprint text alignment. 2023-07-05 02:56:06 +03:00
jean-pierre charras 33e489c4a8 Pcbnew, PlotInteractiveLayer(): do not print useless info in a PDF plot.
It makes this ifo more easily readable.
- Remove duplicate properties
- Do not plot empty properties
- do not plot lib descr and keywords, useless in a pdf plot.
2023-07-04 20:02:28 +02:00
Alex Shvartzkop e892405738 Altium PCB import: read and apply TrueType font names to text. 2023-07-04 13:29:42 +03:00
Alex Shvartzkop 536744d37a Altium PCB import: fix text positioning when not bottom-left aligned. 2023-07-04 13:16:25 +03:00
Alex Shvartzkop 847f538192 Altium PCB import: turn off Keep upright for footprint texts.
Looks like it was set to true by mistake.
2023-07-04 13:11:43 +03:00
Alex Shvartzkop b09ab2daab Don't duplicate footprint bookmarks when plotting multiple PCB layers. 2023-07-04 08:08:52 +03:00
Jeff Young 67c9d3932b Another attempt to fix qa error. 2023-07-03 16:26:20 +01:00
Jeff Young def1a9f39c Add SHORT_NET_NAME processing to footprint variable resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15095
2023-07-02 10:58:10 +01:00