87 Commits

Author SHA1 Message Date
Bernhard Kirchen e81dae62ef honor rule area "exclude from BOM" in BOM
choose ResolveExcludedFromBOM() over GetExcludedFromBOM() to test refs
for exclusion from BOM in order to honor a rule area's "exclude from
BOM" flag for all refs inside that area.

closes #23411.
2026-03-13 18:53:49 +00:00
Seth Hillbrand 84a2ded604 Refactor GetAttr to fix attribute handling
Restructure the attribute creation logic in GetAttr to properly handle
the combination of URL editor cells and variant highlighting. The
previous code had issues where it would modify the shared URL editor
attribute or fail to properly merge column attributes in some cases.

The new approach collects the needed attributes first, then creates
the appropriate attribute object based on what is needed. This ensures
URL editor attributes are cloned before modification and column
attributes like checkbox renderers are preserved for variant-highlighted
cells.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22856
2026-01-26 15:34:50 -08:00
Seth Hillbrand 076cc05526 Fix BOM Generator showing 0/1 instead of checkboxes for variants
When viewing a variant in the Symbol Fields Table or BOM Generator, cells
with variant-specific attribute values (DNP, Exclude from BOM, etc.) were
displaying raw "0" or "1" strings instead of checkboxes.

Now the custom attribute properly merges with column attributes, preserving
the renderer while still applying the variant highlight background color.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22819
2026-01-25 21:47:56 -08:00
Jeff Young 7d07449823 Make sure to update m_symbolsList as well as data store.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22667
2026-01-08 17:40:02 +00:00
Seth Hillbrand 55522a88e9 Fix field deletion in Symbol Fields Table not updating grid
When deleting a field in the Symbol Fields Table, the underlying data
model column was removed but the grid was never notified of the change.
This caused the grid to have a stale view with more columns than the
data model actually had, resulting in field corruption where the next
field would appear to "merge" and become uneditable.

Added wxGRIDTABLE_NOTIFY_COLS_DELETED notification in RemoveColumn() to
properly sync the grid state after column removal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/22406
2026-01-06 04:47:40 -08:00
Seth Hillbrand 6bad3c58e1 Added: PCB Variant support
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2131
2026-01-05 17:47:39 -08:00
Seth Hillbrand c385767cd3 Update schematic variants 2026-01-05 17:45:04 -08:00
Wayne Stambaugh ca0bfe0bba More schematic variant work.
Everything in the variant handling should be working with the exception of
the job handling and command line interface.
2025-12-30 11:11:33 -05:00
jean-pierre charras 408ece3030 Fix a few compil warnings (shadowed or unused vars) 2025-12-22 16:55:06 +01:00
Jeff Young 6a2830079a Push fix for shaded table rows down a level.
(Otherwise we miss any assigned column attributes.)
2025-11-12 10:55:12 +00:00
Jeff Young f6e27e1405 Fix row shading in library tables and fields tables. 2025-11-06 14:29:56 +00:00
Wayne Stambaugh e02685e067 Sync shared symbol instance field values in symbol fields table dialog.
Change data store key from wxString to KIID_PATH to make it easier to look
up shared symbol instances by KIID.
2025-10-16 16:00:03 -04:00
Seth Hillbrand 8cf33049be Use full path to match symbols in table/BOM
In the symbol fields table, we can't rely on the UUID being unique
across sheets.  So, we need to keep the full path as our key to unique
symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21998
2025-10-15 15:04:27 -07:00
Jeff Young 06cdf0be98 Give up on using chars for expand/collapse rows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21820
2025-10-05 20:12:19 +01:00
Jeff Young 60aad25def Enable grouping in library symbol fields table.
This also necessitates showing the Symbol Name in
a column, as the Value will show "<-- mixed -->"
when multiple values are selected.  (And, in some
cases the symbol name and the value are not the
same.)
2025-10-03 17:26:36 +01:00
Jeff Young 1f8403b097 Use more robust method of determining expander column. 2025-10-03 13:31:53 +01:00
Jeff Young 74a81e21e2 Use unicode arrows instead of > and v.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21820
2025-10-03 11:53:04 +01:00
Wayne Stambaugh 33ead34ea5 Work in progress variant code commit.
Please do not attempt to use this yet as it is a work in progress.  Given
large number of merge conflicts, I pushed this partial commit to save time
rebasing.

All of the user interface is hidden behind the "EnableVariantUI" advanced
configuration flag until variants are ready.
2025-09-26 08:54:08 -04:00
Jeff Young 702f774a1f Bring DIALOG_LIB_FIELDS into line with DIALOG_SYMBOL_FIELDS_TABLE. 2025-09-06 15:10:30 +01:00
Wayne Stambaugh 6f352ccd96 Improve symbol fields table editor undo/redo memory usage.
- Do not add a modify action to commit for symbols that have no changes.
- Do not add a modify action to commit for each instance of shared symbols.
2025-09-05 11:46:05 -04:00
Jeff Young c163f0a24c CHANGED: better real-estate usage in Edit Symbol Fields dialog.
1) Moved view controls list to a wx_grid.
2) Allow show/hide of columns in view controls.
3) Allow editing of BOM Names in grid without long-click on Mac.
3) Added column show/hide states and sash pos to prefs.
4) Decreased mininum sash pane width to allow wider main grid.
5) Simplified presentation by moving "include" and "cross-probe"
   settings to config menu.
2025-09-05 13:00:50 +01:00
Jeff Young e1d1243a91 Don't trip over a stale sort column index. (KICAD-B3X) 2025-07-04 15:33:12 -06:00
Jeff Young 4e4dfa0a38 Sort col may not be in the current columns. (KICAD-G74) 2025-07-03 23:14:35 -06:00
Mike Williams 774cf6fbc8 bom export: don't break column order on mismatched column counts
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20520
2025-05-05 13:52:37 -04:00
Jeff Young 66bacb3ea5 Honour template fieldname vis flag when adding fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20575
2025-04-28 17:39:54 +01:00
Jeff Young b01fef5ca8 Update visibility flag when adding fields.
Also removes extra c'tor which fails to set the
ordinal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20556
2025-04-26 16:37:36 +01:00
Jeff Young 8113824f7c Don't conflate generated fields (${DNP}) and fields with variable references.
They're not quite the same thing as the later
can have un-applied values which require expanding.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20417
2025-04-18 13:41:18 -07:00
Jeff Young 5279cc8767 Use EDA_COMBINED_MATCHER more consistently.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20678
2025-04-16 12:20:15 +01:00
Jeff Young 901ad3064d Remove assert that fires when applying preset.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20467
2025-04-02 13:06:40 +01:00
Jon Evans 4ef0d3554e Handle duplicate entries in BOM presets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20342
2025-03-17 18:37:52 -04:00
Jon Evans 2ef123d9e1 Code style 2025-03-17 18:27:33 -04:00
Jeff Young c61b6b8bdd Initialize props of fields created by BOM table.
We use the same algorithm as the Symbol Properties
dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20212
2025-03-04 11:57:24 +00:00
Jeff Young c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young fea659a002 Remove prohibition from clearing Value field in Symbol Fields Table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19745
2025-02-19 23:43:53 +00:00
Jeff Young 3c71e7ab09 Auto-recognize URLs in SCH_FIELD and PCB_FIELD grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17066

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17745
2025-02-19 23:43:53 +00:00
Jeff Young f65d260961 Pretty-print cross references in Symbol Fields Table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19941
2025-02-19 23:43:53 +00:00
Jeff Young fec6882e0a Fix row shading.
Don't use the wxGrid convenience covers.  They assume
you're doing nothing else with attributes.
2025-02-03 20:06:30 +00:00
Jeff Young e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +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
jean-pierre charras c77c921297 Eeschema, BOM exporter dialog: Fix empty fields other than references
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19557
2025-01-10 17:31:21 +01:00
Jeff Young 8481eb8cf5 Export comma-delimited values instead of "-- mixed values --".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17912
2025-01-06 11:56:51 +00:00
Jeff Young 5c80f6c7d8 Honour private flag in Symbol Fields Table. 2025-01-05 20:48:49 +00:00
Jeff Young c7af744bc2 Formatting. 2025-01-05 20:48:49 +00: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
Jeff Young e04f873765 Honour sheet-level DNP & Exclude from BOM in symbol fields table.
(And also in netlist exporter.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18717
2024-12-22 21:22:30 +00:00
Uli Köhler 7187f1b705 Fix empty BOM preset fields leading to crash when opening Edit Fields Dialog 2024-09-21 00:42:23 +00:00
Jeff Young e9d376c912 Don't attempt to rename field more than once.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18330
2024-07-07 11:55:45 +01:00
Mike Williams cc350cf279 symbol fields table: remember includeExcludedFromBOm correctly 2024-05-29 08:41:25 -04:00
Jeff Young df3eaf0e03 Trim before sorting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17046
2024-05-26 19:28:24 +01:00