After we load/resolve the exclusions, we want to ensure that the
resolved ones are re-recorded into the project file so that it always
remains consistent with the state of the system. This way, if pcbnew
closes first and re-saves the project, our exclusions are not lost until
the schematic closes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21410
1) UpdateRuleAreasInScreens() is going to reset the rule
area caches on all SCH_RULE_AREAs. This means that every
SCH_ITEM in the screen that *had* a rule area cache is going
to get it cleared. So we might as well just up-front clear
the caches of all SCH_ITEMs, avoiding the need to use the
(possibly stale) pointers inside SCH_RULE_AREA::m_items.
2) UpdateRuleAreasInScreens() also sets the repaint flag on
all SCH_DIRECTIVE_LABELs, so there's no need to worry about
them elsewhere.
3) SCH_RULE_AREA::m_prev_items could also contain stale
pointers. We avoid this one by converting it to KIIDs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21120
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.
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
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.
Use the ordinal symbol reference and unit when saving schematics to
prevent file changes instead of the first instance. The first instance
would change when sheets were moved and the hierarchy order changed.
The ordinal instance is defined as the first sheet instance when the
hierarchy sorted by 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.
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures. File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.
kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document. Embeds are allowed in schematics, boards,
symbols and footprints. Currently supported embeddings are Datasheets,
3D Models and drawingsheets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6918
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2376
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
- Add a test to be sure a SCHEMATIC exists before trying to use it
- Delete items in Repeat list and undo/redo list before deleting the schematic
- Delete also these items when loading a new schematic (the repeat list was
not cleaned previously)
Before these fixes I see a use after delete issue due to dangling pointers
stored in Repeat list.
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.
Also, handle the possiblity that we return NULL when calling
DeserializeFromString in the case where we don't handle all cases or the
file is corrupted
Also fixes a bug where ERC testing for text variables in sheet pins
would start with the wrong sheet.
Also fixes a bug where ERC testing of similar labels would use the
wrong sheet.
Also fixes a bug where ERC testing of bus-to-net conflicts would use
the wrong sheet.
Also fixes a bug where ERC didn't process variable references when
checking hierarchical labels against sheet pins.
Also fixes a bug where ERC multiple-drivers and netclass-conflicts
tests didn't set a sheetpath.