218 Commits

Author SHA1 Message Date
Seth Hillbrand
4a3b33df4e Map a full hierarchy during PDF plotting
Re-create the schematic hierarchy in PDF plots to ease navigation
relative to the on screen schematic

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12154
2025-03-05 13:28:01 -08:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Wayne Stambaugh
f45915ba93 Eeschema folder housekeeping. 2025-02-06 09:47:00 -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
Jeff Young
eee28aa06a Clean up fields autoplacement control architecture.
Also adds a mode for AUTOADDED fields.

Also fixes a couple of bugs where a manual-level autoplaced
symbol would get reset back to auto-level when autoplaced.
2024-12-23 14:30:17 +00:00
Wayne Stambaugh
0e7c7ba9dd Preserve symbol unit when loading schematic with missing instance data.
This only applies to when there is a single instance of a given schematic.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19073
2024-12-09 15:37:09 -05:00
Wayne Stambaugh
73f31d2d80 Add test for ordinal schematic sheet paths. 2024-10-10 16:09:34 -04:00
Wayne Stambaugh
21dd41eeb2 Fix annotation issue loading legacy schematics.
Commit 83de056de9 broke loading legacy schematics that are not shared.
Legacy schematics do not contain instance data "AR Path=" entries when
the schematic file was not shared.  The reference and unit information
was only stored in the symbol reference field and unit entries in the
symbol definition.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18779
2024-09-26 12:22:57 -04:00
John Beard
2815c99a2a Use our own hash function rather than boost::hash
I just wanted to get a fairly chonky Boost include out of a header, but
then I noticed this doesn't need to use Boost at all.
2024-09-11 22:08:36 +01:00
Wayne Stambaugh
0cf1110367 Fix missing schematic symbol instance data.
This fix adds missing symbol instance data that defaults the instance
data to no annotation which will will trigger a annotation request on
any operations that require a fully annotated schematic.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18486
2024-08-09 18:55:23 -04:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Mike Williams
a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e71227d2129d271f24fb92ae0b99b6f93bd.
2024-06-12 13:30:29 -04:00
Mike Williams
0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young
edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Jeff Young
758974f5aa Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.
2024-06-06 11:53:01 +01:00
Mike Williams
7679f40b2b SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 10:03:00 -04:00
Jeff Young
40854cec0e Remove cover types. 2024-06-03 11:44:10 +01:00
Jeff Young
aee7680a6c ADDED: support for DNP & friends at the sheet level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14387
2024-06-02 22:41:22 +01:00
Wayne Stambaugh
5d99aaf0a4 Use correct project name when adding new symbol instances.
When adding a sheet using a schematic from another project, set the
project name for the new symbol instance data to the current project
rather than the project name from the copied instance data.
2024-04-19 14:33:22 -04:00
Seth Hillbrand
e14e956c1d Fully order schematic saves 2024-04-11 16:54:30 -07:00
Jeff Young
1028a76e4a Harmonize print/plot APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
c5ed80af52 Harmonize rotate APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
92910d5d0f Factor common parts of SCH_ & LIB_SYMBOL into SYMBOL. 2024-04-04 13:18:55 +01:00
Wayne Stambaugh
2cfb7a5310 Incremental schematic connectivity fixes. 2024-01-21 16:53:05 +00:00
Wayne Stambaugh
04d15026c5 Rename SCH_SYMBOL::GetInstanceReferences() to GetInstances(). 2023-12-28 18:25:56 -05:00
Jon Evans
90a61b8d36 Prevent some issues with recursion on repeat-last-item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16168
2023-11-26 16:43:59 -05:00
Seth Hillbrand
d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Marek Roszko
fb8d52f19e kicad-cli: Remove -O for plot and add --pages to specify list of pages instead
--pages 1 is equivalent to -O

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15402
2023-09-03 09:18:11 -04:00
Jeff Young
b5dc9ddbe0 Don't store address of temp object.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15517
2023-08-27 19:12:36 +01:00
Wayne Stambaugh
1db9febcfe Remove duplicate references from change symbol dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15480
2023-08-25 14:08:21 -04:00
Mike Williams
11b469f16a Hierarchy: fix missing page numbers / sheet instances
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15413
2023-08-14 14:19:26 -04:00
Jeff Young
b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Marek Roszko
4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Wayne Stambaugh
9e03a71b44 Fix broken value and footprint field text values.
Only update value and footprint fields from instance data if it's not
empty.  These fields were not always stored in the instance data so
loading them from instance data that does not contain them will clear
the fields.

https://gitlab.com/kicad/code/kicad/-/issues/13735
2023-02-03 09:48:18 -05:00
Wayne Stambaugh
c88c4e1200 Fix schematic update library symbols issues.
Rather than update library symbols one at a time, queue them up by
schematic symbol to prevent multiple updates to the same symbol in
complex hierarchies.  This also removes all of the library symbols
first which will clear out all of the library symbol variants that
were created by modifying library symbols in place and/or changes to
the symbol in the library.

Don't add new variant library symbol if an equivalent variant already
exists in the schematic local cache.  This prevents duplicate library
symbols from being added to the local cache when the first variant in
the cache does not match that of the symbol being added.
2023-02-02 15:54:24 -05:00
Jon Evans
c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Wayne Stambaugh
d99e09014b Rename SYMBOL_INSTANCE_REFERENCE to SCH_SYMBOL_INSTANCE. 2023-01-04 15:39:50 -05:00
Jeff Young
0b50e7fa37 A wee little hack for intersheet refs in legacy files.
Fixes https://gitlab.com/kicad/code/kicad/issues/13108
2022-12-27 18:46:58 +00:00
Wayne Stambaugh
78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jeff Young
6f44468385 Fix more lifetime issues in simulator tuning.
Fixes https://gitlab.com/kicad/code/kicad/issues/13257
2022-12-23 22:03:24 +00:00
Jeff Young
f75d18c7c8 Slight improvement to schematic editor title bar.
Also improves some other clients of PathHumanReadable(), such as the
set page number dialog.
2022-12-12 12:54:34 +00:00
Jeff Young
b9287968d6 Update symbol default prefixes after updating instance data.
Also moves the sim model fixups after the instance data updating as
it uses the prefixes.
2022-12-07 01:34:56 +00:00
Jeff Young
38906397d2 Move V6->V7 sim model migration from sheets to screens.
Also moves passive RLC inference out from migration to just-in-time
creation for the simulator or netlisting.

Also fixes a version guard mismatch because the spice migration was
done inside UpdateSymbolInstances (which has its own version guard).

Also changed UpdateSymbolInstances to UpdateSymbolInstanceData so
someone else in the future doesn't think it's a general-purpose symbol
instance updater.
2022-12-06 16:01:18 +00:00
jean-pierre charras
6b9c82c975 eeschema: fix a crash when converting a old .sch file containing global labels. 2022-12-04 21:06:16 +01:00
Jeff Young
f9b3f14dfa Bring intersheet refs in line with schematic setting when changing sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/13061
2022-12-04 11:51:44 +00:00
Wayne Stambaugh
0a62c17040 Remove schematic symbol value and footprint field instance data.
https://gitlab.com/kicad/code/kicad/-/issues/12933
2022-11-30 11:47:13 -05:00
Mikolaj Wielgus
a65b35107d Sim: Make Sim.Pins have key-value pairs instead of a sequence
Moreover, upgrade models on schematic load instead of on model load
2022-11-25 05:38:21 +01:00
Wayne Stambaugh
4a27d856f7 Move schematic sheet instance information into file sheet definition.
This will make it possible to maintain sheet instance information when
copying and pasting from any sheet other that the root sheet of a
project.

Setting and getting sheet page numbers must now be performed using a
sheet path.  This was done to ensure that the instance paths were not
getting changed unexpectedly from different code paths.
2022-11-22 16:45:38 -05:00
Mikolaj Wielgus
6969362813 Sim Model Editor: Don't provide library-only models as builtins 2022-11-20 22:07:39 +01:00
Jeff Young
2919490e92 Use hash (not page no) to determine when we've found the current sheet.
Also enforces strict ordering in another page number sorter, although
this has nothing to do with the bug below.

Fixes https://gitlab.com/kicad/code/kicad/issues/12043
2022-11-20 13:12:44 +00:00