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.
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).
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
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
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
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.
1) use SCH_COMPONENT::GetRef(), GetValue() and GetFootprint() when
instance-specific info is needed
2) update UpdateAllScreenReferences() to handle value and footprint.
3) BACKANNO is CvPcb's handler, not back annotation's handler. Which
means it needs GUI behaviour, not back annotation behaviour.
Fixes https://gitlab.com/kicad/code/kicad/issues/5520
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of. Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.
The comparison uses now the sheet paths for ref and unit selection.