368 Commits

Author SHA1 Message Date
Seth Hillbrand
a857ea77d9 ADDED: Text expression evaluation
Arbitrary text strings now support full evaluation with a rich
functional language

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6643
2025-09-04 14:57:16 -07:00
Seth Hillbrand
173e02eff7 ADDED: Lasso support to Schematic Editor 2025-09-03 06:45:49 -07:00
Jeff Young
6dd4e01f16 ADDED: custom body styles.
(Also moves editing of unit display names to the
Symbol Properties dialog and retires the Set Unit
Display Name dialog.)

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14843
2025-08-27 18:11:56 +01:00
JamesJCode
ee9e94df04 Don't assume SCH_SYMBOLs have a LIB_SYMBOL when resolving embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21497
2025-08-18 20:30:33 +01:00
Jeff Young
bf8809c841 Repair deficiencies in swapData. 2025-08-18 19:20:09 +01:00
Mark Roszko
5895c27f4a Rename Prj() on schematic to avoid conflict with global function 2025-08-07 23:21:41 -04:00
Jeff Young
e230d5164d Honour renderSettings' default font.
This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
2025-07-17 09:35:21 +01:00
Jeff Young
b08990646c Fix format specifier (KICAD-SV6). 2025-07-05 12:02:36 -06:00
Jeff Young
327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
Jeff Young
42c68f1a16 Uniform application of recursion guards in simulation code. 2025-05-25 09:09:11 +01:00
Jeff Young
ed1b4f6e5a Better and more complete recursion guards.
(ie: ones that actually work.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20990
2025-05-24 22:39:03 +01:00
Jeff Young
1c8f971789 Fix typo in comparator. 2025-05-24 21:41:28 +01:00
Jeff Young
61d36f9d29 Fix recursion issues with text variables.
1) Pass aDepth down through those versions of
CreateModel() which expand text variables

2) Be aware that unresolved text variables look
just like unexpanded text variables.
2025-05-24 18:30:30 +01:00
Jeff Young
aae4833c94 Add autocomplete for OP:power.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20984
2025-05-24 18:30:30 +01:00
Wayne Stambaugh
19cb41722a Make directive label text color behave like other labels.
Label text color will inherit from the assigned net class.  Apparently
this was overlooked when the directive labels were implemented.
2025-05-21 12:51:35 -04:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Jeff Young
43d587c850 Cleanup; nullptr protection. 2025-05-03 18:27:46 +01:00
Jeff Young
34f2038a95 Support URLs in Symbol Chooser info panel.
Also adds support for sim library fields as URLs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20811
2025-04-30 12:54:04 +01:00
Jeff Young
b772960717 Fix bad static cast.
Hypertext fields aren't always intersheet refs anymore.
2025-04-30 12:54:04 +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
524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +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
69bf9894e9 Fields don't currently have any metadata to search. 2025-04-16 11:41:56 +01:00
Jeff Young
0a8d5ea78b Fields don't currently have any metadata to search. 2025-04-16 11:33:16 +01:00
Jeff Young
98ec2d7ba2 ADDED: metadata searching.
Symbol and footprint search panels can now optionally
search library links, descriptions and keywords.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10602
2025-04-09 17:46:07 +01:00
Jeff Young
582aef0220 Don't assume a hypertext link is a cross-sheet reference.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20511
2025-03-30 21:55:28 +01:00
Mike Williams
7cf699bc9d eeschema: move SwapData to SwapItemData/swapData paradigm
Used by BOARD_ITEM to support groups, which we are adding to the
schematic. Also adds an unused group pointer for now.
2025-03-27 13:16:09 -04:00
Jeff Young
7e046e6c8b Remove '~' == empty_string.
It has long outlived its usefulness (which was
to preserve token sequence in pre-sexpr files).

This will no doubt turn up latent issues....
2025-03-19 17:16:55 +00:00
Jeff Young
0fae6a0db0 Initialize field ordinals for LIB_SYMBOLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20263
2025-03-07 15:52:31 +00:00
Jon Evans
10cb0592ee Fix SCH_SHEET field layer settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20128
2025-03-01 11:19:47 -05:00
Jeff Young
8f40feedbb m_ordinal has no meaning for mandatory fields.
... but it should still be initialised.
2025-02-24 23:42:56 +00:00
Seth Hillbrand
ea520da1c8 Protect search from mis-attributed LIB/SCH instance
The parent of fields might be a LIB_SYMBOL, not SCH_SYMBOL.  We need to
watch for and avoid these in the search/replace for schematics

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20079
2025-02-24 10:13:38 -08:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young
f2da0c791f Retire non-cairo printing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19323
2025-02-24 11:08:29 +00:00
Seth Hillbrand
157c7422b0 Allow sim models to reference embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20024
2025-02-22 14:53:59 -08:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Wayne Stambaugh
f45915ba93 Eeschema folder housekeeping. 2025-02-06 09:47:00 -05:00
Jeff Young
fccb661487 More MANDATORY_FIELDS work.
Also fixes a crasher when Cancelling a FIELDS_GRID
dialog with one of the grid editors currently open.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19762
2025-01-27 17:02:17 +00:00
Jeff Young
e19bce2f93 Reduce reliance on MANDATORY_FIELDS and their implied order. 2025-01-22 17:51:57 +00:00
jean-pierre charras
9a57f7d573 Fix a minor compil warning 2025-01-22 17:18:26 +01:00
John Beard
95a1d17603 Eeschema: init variable in SCH_FIELD 2025-01-22 21:03:42 +08: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
d21eeb4249 Nullptr safety when called from test framework. 2025-01-21 14:21:10 +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
Jeff Young
1d8ed071b8 Respect recursion depth limit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19633
2025-01-15 00:08:08 +00:00
Jeff Young
189e0688be Don't allow a "private" marking on a mandatory field. 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
1d4945dad5 Implement private flag for SCH_FIELD.
I don't think this was the original intent, but the
GUI for setting the flag leaked out via the
properties inspector so it kind of needs to work.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18760
2024-12-09 20:33:40 +00:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Wayne Stambaugh
a6923b3de3 Cache full schematic sheet list sorted by sheet page number.
The sheet list is returned as a copy of the cached list rather than a
reference to prevent external code from changing the list.  While not as
performant, it eliminates the risk of the sheet list being altered in
ways that could break the schematic.  The sheet list should only be
updated by calling SCHEMATIC::RefreshHierarchy() when any appropriate
sheet changes are made.

Note to developers: there is something inherently different about how the
QA tests are loading and handling schematics versus the schematic editor.
Using the cached sheet list for the SCHEMATIC object will cause some QA
test to fail.  This is why SCHEMATIC::Hierarchy() has not replaced
SCHEMATIC::BuildSheetListSortedByPageNumbers() everywhere.
2024-10-09 09:58:50 -04:00