89 Commits

Author SHA1 Message Date
John Beard
262f1fdabb Pcbnew: add layer mode/stackup checks to library parity DRC 2025-09-01 23:44:21 +08:00
John Beard
9173d11398 Very minor Coverity fixes 2025-08-20 01:41:18 +08:00
John Beard
34a73a3d77 FP edit: Move private layer settings to layers panel 2025-08-19 05:00:03 +08:00
John Beard
ed01324c1d Footprints: allow to set specific internal copper layers
Footprints can now have a custom stackup. This means that they specify
an exact number of copper layers and the layers map 1:1 to board layers.
If the board doesn't contain that layer, the element just doesn't
show. We could make this a DRC check later on.

If there is no stackup, the behavior is the current default: a rule area
the In1 layer "expands" to all Inner layers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10838
2025-08-19 04:59:48 +08:00
Jeff Young
1b8119056f More code sharing. 2025-07-26 21:24:37 +01:00
Jeff Young
14c9ed1fda Prevent stale selection when deleting grid rows. 2025-07-24 18:16:21 +01:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
1faa9800dc Row height consistency.
Rats.  Also got tangled up in another commit which
removes some dead code.
2025-06-19 14:29:37 +01:00
Jeff Young
62001204b7 CHANGED: share GUI and code between net-ties and jumpers.
ADDED: description of jumper groups for PCB Footprint
Properties dialog.

Also untangles the internal storage of the DRC exclusion
flags from the fabrication attributes.

Also removes allow-missing-courtyards from PCB footprint
properties because you can't edit the courtyards there
so it makes no sense.

(Which means the library parity checker also doesn't
need to check it as it will always match the library.)
2025-05-31 11:00:45 +01:00
Jeff Young
a1cc6403bd Remove selection before notifying grid of deletion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20747
2025-05-29 17:55:02 +01:00
Jeff Young
2b33a03954 Make Edit Text & Graphics dialogs more similar.
Also a bunch of cleanup for dialog heading
format and info sizes.

Also fixups for consistency of syntax help
(should be a link, not a button)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20790
2025-04-27 17:34:18 +01:00
Jeff Young
be4a851186 Allow embedded files to come from components
as well as parent containers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20530
2025-04-23 15:14:58 +01:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jon Evans
1c83f0a70b Implement jumpers for footprints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2558
2025-03-24 22:17:46 -04:00
Lucas Dumont
3ddaa24775 Change deleting for-range loop to while loop
It seem that the iterator may be invalidated in the loop.
By always taking the first element and looping until empty, we avoid the issue

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20283
2025-03-09 19:34:13 -07:00
Jeff Young
0a3f14c855 Sync selection & selection flags after replacing fields. 2025-03-09 11:47:31 +00:00
Jeff Young
305bb6302b User layer bug fixes.
1) Don't set user layer count right after we've
cleared the enabled user layers.  (It will
always be 0 by then.)

2) Allow un-enabled layers in some layer
selectors.  (Currently this is just the private
layers selector.

3) Reset the appearance panel layers each time a
footprint is loaded.  Also, auto-enable any user
layers that the footprint already has.

4) Footprint editor layer visibility is stored in
the view, not in the boars (as is usual).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20022
2025-03-05 17:59:22 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
c28039556d Check for duplicate footprints.
Also fixes a bug where we were running Validate()
twice.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19857
2025-02-19 23:43:53 +00:00
Seth Hillbrand
0d86b88008 Unify embedded files handling btw editors
Each editor needs the embedded files tab in the
schematic/pcb/symbol/footprint settings.  But the footprint may add an
embedded file from the 3d models tab and symbols/footprints may add
embedded files from the grid.  This should be immediately visible in the
embedded files tab.  Additionally, removing the reference to an embedded
file in the grid or 3d models now removes the embedded file as well.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18934
2025-01-28 12:22:39 -08:00
Seth Hillbrand
6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
Jeff Young
e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
Jeff Young
4fe05bfe47 Remove some more usages of MANDATORY_FIELDS. 2025-01-21 23:38:55 +00:00
Jeff Young
a0dd0485e9 Pull a little harder on the MANDATORY_FIELDs string.
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory.  But this attempts to clean up
*some* of that, without introducing too much risk.
2025-01-21 16:48:13 +00:00
Jeff Young
d50b69f1ae Reconcile divergence of MANDATORY_FIELDS between symbols and footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19697
2025-01-21 13:28:28 +00:00
Wayne Stambaugh
5c8f4697ca Common folder housekeeping part 1. 2025-01-12 12:06:45 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
54a34b2e7d Remove unused cruft 2024-08-17 07:56:30 -07:00
Jeff Young
3b6a33c59a Fill in a lot more calls to DIALOG_SHIM::OnModify().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18443
2024-08-11 12:45:36 -06:00
Jeff Young
22321c93f0 Save visible columns to correct settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18352
2024-07-20 23:25:36 +01:00
Jeff Young
8ae111bd82 Formatting. 2024-07-20 23:25:36 +01:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
Alex Shvartzkop
c2a80092d7 Draw fp grid layer swatch in proper scaling on hidpi. 2024-05-23 05:09:39 +03:00
Alex Shvartzkop
4cc29184c2 Improve Layer field spacing in footprint properties. 2024-05-21 04:11:59 +03:00
Jeff Young
f7bef5e09b Generalize EnhanceAttr() function.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17735
2024-05-16 16:28:13 +01:00
Jeff Young
73681d08c5 Update names to match current nomenclature.
(Footprints now have PCB_FIELDs, not FP_TEXTs.)
2024-05-06 19:03:20 +01:00
Jeff Young
fc572bfbc6 Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543
2024-03-23 15:50:45 +00:00
Jeff Young
fa0ead98d8 Split out table editing and table cell editing. 2024-02-24 20:05:51 +00:00
Jeff Young
ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
Mike Williams
61da4fb1af PCB Fields: operate on field copies in dialogs
Makes cancel/undo work properly
2023-12-11 09:37:23 -05:00
Jon Evans
eb5b3db063 Add bitmap bundle support to BITMAP_SCALE
Change a bunch of buttons and toolbars to use it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Wayne Stambaugh
b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Alex Shvartzkop
9ed19192de Improve editing values with {return} in text fields; Add hyperlink detection. 2023-10-15 01:45:39 +03:00
Mike Williams
a24c55affe PCB Fields: fix up python, API
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams
85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams
b81fcaeaf7 PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
Mike Williams
ad7d9ec956 PCB: footprint properties dialog fields fixes 2023-06-20 18:34:52 +00:00
Mike Williams
a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Jeff Young
5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jeff Young
8e29a054f3 Performance improvement for GetShownColumns.
(This needs to be fast as it's called from OnUpdateUI events.)
2023-04-13 13:45:22 +01:00