Commit Graph

15304 Commits

Author SHA1 Message Date
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
Jeff Young bcfb6e4888 Fix diagrams of meander dimensions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10073
2023-07-01 17:06:00 +01:00
Jeff Young 6da71e5d24 Allow routing to a free pad (even if it has a hole).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15093
2023-07-01 14:23:38 +01:00
Jeff Young 63daf336b8 Formatting. 2023-07-01 14:23:38 +01:00
jean-pierre charras 2c068ab86d Fix incorrect comment. No code change. 2023-07-01 14:17:57 +02:00
Jeff Young 9af065684b Show Properties Manager menu entry for FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15088
2023-07-01 12:01:35 +01:00
Jeff Young 9ff33e5ec6 Remove BOARD_COMMIT( TOOL_MANAGER ).
It initializes both m_isFootprintEditor and m_isBoardEditor to false,
causing all sorts of trouble.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15072
2023-07-01 11:52:46 +01:00
jean-pierre charras 011a8f29a3 Pcbnew, Update footprint: fix broken initialization of fields (especially ref and value)
- Revert commit 86e0e1cc, broken
- add comments to avoid a similar mistake
- ensure Reference and Value are correctly handled.
Fixes #15091
https://gitlab.com/kicad/code/kicad/-/issues/15091
2023-07-01 12:29:02 +02:00
Jeff Young eb8994fde5 Disable locked in the FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089
2023-06-30 20:51:18 +01:00
Jeff Young 7ed5963b4f Disable positioning tools when a move is in progress.
Also fixes a typo in EDIT_TOOL::doMoveSelection().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15090
2023-06-30 20:37:03 +01:00
Jeff Young 773e1a1ab6 Actions with a COMMIT must be run synchronously.
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop.  So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
2023-06-30 18:57:37 +01:00
jean-pierre charras 8d46ed3c72 PCad importer: fix segfault in PCAD2KICAD::PCAD_ARC::AddToBoard
Fixes #15086
https://gitlab.com/kicad/code/kicad/-/issues/15086
2023-06-30 17:51:03 +02:00
Jeff Young dd83217062 Add DRC testing for copper graphic to zone fill collisions. 2023-06-30 14:04:20 +01:00
Ian McInerney 533d7531a1 Via routing actions need to use int flags
The actions the router uses for via placement can be a combination of
enum values, so the actions must use an int parameter instead of the
enum type.

Fixes KICAD-2DS
2023-06-29 23:21:15 +01:00
qu1ck ec94439df4 Footprints swig API: access shown text in fields 2023-06-29 20:36:27 +00:00
jean-pierre charras 5b42348834 Pcbnew: shows the UUID of a footprint in DIALOG_FOOTPRINT_PROPERTIES.
This is an important property of a footprint, but it is never shown to
a user, although it is used in a lot of cases.
2023-06-29 12:36:20 +02:00
Ian McInerney 30f20a694d Give default parameter to net highlight/selection events
Fixes KICAD-2C7
Fixes KICAD-2C3
2023-06-29 00:17:12 +01:00
Ian McInerney 0de6fb03ba Give updateLocalRatsnest action a default parameter
Fixes KICAD-2BX
2023-06-29 00:17:12 +01:00
Ian McInerney 459e6e192a Give placeFootprint action a default nullptr parameter
Fixes KICAD-2BT
2023-06-29 00:17:12 +01:00
Ian McInerney d923b871d7 Remove group reference when exporting individual footprints 2023-06-29 00:17:12 +01:00
Jeff Young 1411b09178 Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2023-06-27 17:04:18 +01:00
jean-pierre charras af71308184 pcb_parser and pcb_plugin: fix incorrect handling of rotation of PCB_TEXTs
in footprints when the text angle is 0 but the fp orientation is not 0.
It was due to the fact angle 0 is not written in file and use the default
value of the created PCB_TEXT in footprint, that is not always 0
Now the angle is always written in file.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-27 08:53:04 +02:00
Seth Hillbrand f3122184df Remove existing footprint when force-reloading
Needs to clear the existing footprint in ReloadFootprint prior to
loading the new one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15040
2023-06-26 17:04:03 -07:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young 3bdc66d3ed Save project to disk whenever we save the board to disk.
This prevents data loss in the event of a subsequent crash.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14991
2023-06-26 16:59:47 +01:00
jean-pierre charras 7e8070b700 pcb_parser: fix incorrect handling of rotation of PCB_TEXTs in footprints.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-26 11:27:20 +02:00
jean-pierre charras 44810e8c09 footprint reader: fix broken handling of "Keep Upright" option.
texts inside footprints must have this option ON by default.
When disable, the keyword "unlocked" must be in field description.
2023-06-25 12:44:33 +02:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00