162 Commits

Author SHA1 Message Date
Seth Hillbrand
15166a9f14 Refactor REFDES_TRACKER
Keep state for reuse in the class.  This allows us to properly pick the
value when fully reannotating

Don't annotate when placing new units.  Just step ahead in the unit
value while keeping the refdes number constant.  This eliminates the
jumping around to unplaced units when placing new multi-unit symbols

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21378
2025-07-25 16:16:09 -07:00
Seth Hillbrand
e387953490 ADDED refdes tracker
Provide an option to track ever reference designator ever used in the
project to prevent its reuse even if the component has been removed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13052
2025-07-23 14:28:33 -07:00
Jeff Young
5a2bae207b Formatting. 2025-07-03 16:15:13 -06:00
Jeff Young
cccaeb3b29 Don't pass a null sheetPath to GetValue() (KICAD-QPF). 2025-07-03 16:15:02 -06:00
Jeff Young
5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Jeff Young
c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +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
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
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
Mike Williams
39f355e71d annotation: also report cleared annotations 2024-05-23 09:47:30 -04:00
Seth Hillbrand
2139789c4c Move ERC items to their own directory 2024-05-03 12:06:24 -07:00
Jeff Young
1028a76e4a Harmonize print/plot APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
f25a06b2a5 More globals eradication.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16031
2023-11-12 23:43:30 +00:00
Jeff Young
922f7128a9 Move item updating and view refresh to SCH_COMMIT::Push().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15132
2023-07-07 15:40:01 +01:00
Roberto Fernandez Bautista
6d3f512e15 Ensure symbols in subsheets are added to multi-unit map before re-annotating
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14918
2023-06-28 23:30:10 +02:00
Jeff Young
8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young
e698156975 Upgrade many editing actions to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01: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
Seth Hillbrand
f4b43617e7 Add COMMIT structure to Schematic and Symbol editors
Provides a single-point access for modifying the schematic and symbol
elements that allows chaining updates and reverting partial changes.
Standardizes the undo hierarchy between pcb and schematic editors

As this is another layer on the existing undo/redo structure, the
initial commit does not replace all undo/redo calls currently existing.
These will be handled in a series of follow-on commits
2023-04-28 17:05:47 -07:00
Mike Williams
b39aae6a93 Annotation: don't select hover item
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13352
2023-01-23 16:50:45 -05:00
Seth Hillbrand
9861ed1a5f Don't special case power symbol re-annotation
When the designer asks to reset annotations, we reset all annotations
including power symbols.  This may create additional churn in the files
but only when requested and is useful to fix schematic errors

Fixes https://gitlab.com/kicad/code/kicad/issues/13138
2023-01-23 13:19:01 -08: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
Jeff Young
9657b23139 Allow selected RefDes as proxy to selected symbol for annotate selection.
Also fixes some likely bugs regarding collection of power symbols and symbols
with no lib link for annotation.

Fixes https://gitlab.com/kicad/code/kicad/issues/12259
2022-08-24 11:31:13 +01:00
Mike Williams
7c979e6375 Schematic: move annotation options parsing into common function 2022-07-25 18:44:55 +00:00
Seth Hillbrand
00c7b64b13 Make annotation case-insensitive
U1 and u1 are allowed but if they both exist in the same schematic, they
will throw an ERC and annotation error.  Reannotating will make them U1
and u2.

Fixes https://gitlab.com/kicad/code/kicad/issues/11862
2022-07-14 09:56:48 -07:00
Jeff Young
d24e6c3408 Auto-annotate (and then don't re-annotate) power symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/11942
2022-07-11 21:46:01 -06:00
Mike Williams
efa23a5cbe Schematic: better automatic/recursive annotate 2022-05-27 15:54:00 +00:00
Mike Williams
dabd42bbc4 Schematic: Automatic Symbol Annotation 2022-05-27 15:54:00 +00:00
Roberto Fernandez Bautista
55f22c526a Fix annotation of incomplete multi-unit symbols and re-annotation of duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11496
2022-05-26 09:23:36 +00:00
Jeff Young
4ee6cfe5b6 Disable all use of the default instance reference prefix for annotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/11385
2022-04-14 17:55:35 +01:00
Jeff Young
034b57d9c0 When reannotating keep existing prefix in most cases.
(Execption is reannotating entire schematic, in which case we reset
all of them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/11379
2022-04-13 23:38:45 +01:00
Jeff Young
3a51fb6ac6 Be more consistent about annotation warngings.
This can be a particular problem if you go to run ERC, it shows the
annotation warnging so you re-annotate (but don't notice that your
scope is set to Selection).

Also adds some missing defensive code around closing a modeless RC
checker before the document (which we had for DRC dialog but not the
ERC dialog).

Also fixes a missing override of GetSeverity which kept ERC messages
from having the right prefix.
2021-11-29 14:24:45 +00:00
Jeff Young
ea6769b702 The REPORTER interface is inherently line-based.
Also fixes a bunch of error messages that were similar but not
identical (which just increases translation burden).

Fixes https://gitlab.com/kicad/code/kicad/issues/8723
2021-07-05 13:41:06 +01:00
Wayne Stambaugh
ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh
71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Wayne Stambaugh
fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
Roberto Fernandez Bautista
0f85f61e5f CHANGED: Reannotation in eeschema now always keeps symbol units
Ensures that symbol units are never modified after re-annotation.
2021-04-30 11:03:21 +00:00
Roberto Fernandez Bautista
0c91bea751 Fix eeschema reannotation: ensure no duplicate references are created
Also implements reannotation of a selection

ADDED: Ability to reannotate a selection in eeschema

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2209
2021-04-30 11:03:21 +00:00
Jeff Young
de2f60fe4c Save annotation settings in preferences.
See comments in issue.

Fixes https://gitlab.com/kicad/code/kicad/issues/8277
2021-04-26 16:05:22 +01:00
Jeff Young
14e73d24dc Naming conventions. 2021-03-29 11:46:05 +01:00
Jeff Young
2e129d9b47 Naming conventions and other cleanup. 2021-03-19 23:06:19 +00:00
Jeff Young
e206a9d39a Naming conventions. 2021-03-18 12:28:24 +00:00
Jeff Young
0a1a5ea669 Fold annotation error reporting into ERC.
Fixes https://gitlab.com/kicad/code/kicad/issues/6938
2021-01-24 23:01:24 +00:00
Jeff Young
360953ba98 "comp" -> "symbol". 2021-01-19 23:50:40 +00:00
Jeff Young
c89676e39d Require client to specify whether they want resolved values or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/6408
2020-11-17 21:36:48 +00:00
Jeff Young
6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young
1f21a93b39 Don't require power symbols to be annotated.
Fixes https://gitlab.com/kicad/code/kicad/issues/6112
2020-10-24 19:46:08 +01:00
jean-pierre charras
7865d8de43 more cleanup about removing useless include 2020-10-02 15:50:46 +02:00