This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.
Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
In particular:
Resolving the DNP/InBOM/OnBoard/etc. flags needs to take into account
the variant.
Writing a SPICE netlist needs to take into account the variant.
Updating a simulation tuned value needs to write to the current
variant (this is only partly implemented, with a TODO for the hard
part).
Painting of fields needs to paint the current variant value.
Still missing is reading/writing fields from the simulation model
dialog to/from the current variant.
Symbols with the "duplicate pin numbers are jumpers" flag can have
multiple pins sharing the same number. The existing GetPin() method
only returns the first match, causing operations like setting pin
alternates to miss subsequent pins with the same number.
This adds GetPinsByNumber() to both LIB_SYMBOL and SCH_SYMBOL that
returns all matching pins. Updated callers in dialog_symbol_properties,
sch_symbol sync, and the CADSTAR/EasyEDA Pro importers to iterate
over all matching pins instead of just the first.
Also skips the duplicate pin ERC check for symbols with the jumper
flag set, since duplicate pins are intentional in that case.
The SyncOtherUnits() function was not passing the variant name when
propagating DNP changes to other units of a multi-unit symbol. This
caused the default DNP value to be used instead of the variant-specific
value, resulting in DNP changes not propagating when a non-default
variant is active.
Add variant parameter to SyncOtherUnits() and pass it through to
GetDNP() and SetDNP() calls. Update all callers to provide the
current variant name.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22763
If we are clearing all references in the schematic, then we can clear
our references, otherwise, just eliminate the ones for the proper
sheets. We don't want to clear the references on Sheet A when we copy
and paste it to Sheet B.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20173
Add enhancements to make working with multi-unit symbols easier,
particularly for connector pinout tables.
New features:
1. UNIT(<pin_number>) function
Returns the full unit reference for a given pin number.
Example: ${J601:UNIT(1)} returns "J601A" if pin 1 is in unit A.
2. Parent reference support in cross-references
Enables using parent reference (J601) instead of full unit reference
(J601A) in text variable expressions.
Example: ${J601:PIN_NAME(1)} now works (previously required ${J601A:PIN_NAME(1)})
3. Auto-resolution across units
PIN_NAME, NET_NAME, NET_CLASS, and SHORT_NET_NAME functions now
automatically search all units if a pin is not found in the current unit.
4. NC display for unconnected pins
SHORT_NET_NAME now displays "NC" instead of "unconnected-(Ref-Pin_X)",
making tables cleaner. NET_NAME still shows the full technical name.
Implementation:
- Enhanced SCHEMATIC::ResolveCrossReference() to add reference-based
lookup as a fallback after UUID resolution
- Added UNIT() function to SCH_SYMBOL::ResolveTextVar()
- Modified SHORT_NET_NAME handling to detect and format unconnected nets
Allows multiple, top-level schematic sheets. Records of the sheets are
stored in the project file. All top-level sheets live under a virtual
root sheet in the hierarchy. This virtual root is suppressed for export
and general visibility
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2063
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.
Implement bracket notation for stacked pins ([1,2,3], [1-4], [1,3,5-7]).
Automatic net naming proceeds based on the smallest logical pin number
in stacked groups.
Provide explode/reform commands in symbol editor for conversion.
Supports arbitrary ranges including BGA alphanum ranges like
[AA1-AA3,CD14-CD22]
Adds some additional QA and trace logging
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2004