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.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17984
When moving / deleting a power symbol, in some instances the
symbol is marked dirty, and sometimes the pin (depending on
whether the symbol is the primary edited item, or whether
the pin is identified through an edited item subgraph). If
the pin and the symbol are marked dirty, the pin dirty flag
was not being cleared.
Additionally, not all extracted items were being deleted
from subgraphs correctly.
Both resulted in dirty state and duplicated items in the
subgraphs during incremental connectivity, which resulted
in essentially corrupted subgraph states.
Includes:
- Fix GAL to draw closed polygons in eeschema
- Add functionality to eeschema to draw arbitary polygons
- Update polygon item previews to have customisable edge colour
- Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
- Add SCH_RULE_AREA to paint and plot methods
- Add new rule area color preference to themes
When we replace a symbol with one that has fewer pins, the old pins
are released, which leaves points to them in the connection graph
dangling. This updates the pointer to use the cloned copy in the undo
stack until the connection graph is rebuilt with the new data
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17851
The drivers need to get passed up and down the hierarchical sheets. In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items. However, we only get sheets in the screen
items list while the pins are the elements that get set dirty
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17797
Netclass assignments are stored in the project level but
CONNECTION_GRAPH updates would clear the assignments. This keeps
existing netname->netclass assignments but updates any netnames that
were changed by the incremental updates. Absolute updates are not
affected and fully recreate the net name to netclass map
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17720
The connectivity routine would consider symbols, overwriting unused
subgraphs for pins that were not in the change list. This is resolved
by updating the full connectivity to only use pins in the graph since
symbols are not connected independently.
In the process of adding QA tests for this change, additional issues
with the schematic QA were discovered. Specifically, we were not
properly setting the root sheet UUID. This was partially masked by a
const_cast setting of the RefDes in sch_symbol when called the RefDes
getter. This exposed the fact that our QA ERC numbers did not match the
schematic editor stand alone ERC numbers. So the test value for one
check needed to be updated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17528
Per the if statement and logic, we want to walk into looking up connections if we are a pin on a chip.
IsGlobalPower is a test for it's in a power symbol, so we want it false not true.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16699
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.
We used to store the symbol units of the current sheet and then
restore them, but we didn't handle the dangling states.
The new code uses a different strategy and just makes sure that if
any of the sheets are going to modify the current screen, the current
sheet gets to go last so that its modifications will "stick".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15392
When generating virtual connections to represent bus aliases, we need to
store the pointers for future deletion otherwise we will leak the memory
(cherry picked from commit 9260f58803)
When running ERC, we want to check if bus members exist in the bus and
this should be done using m_local_name (i.e. the name it take from the
parent bus) not the resolved name as this will change depending on
connections
(cherry picked from commit 1380feef72)
We store our connectivity dirty flag with the SCH_ITEM but we generate
SCH_CONNECTION based on the SCH_ITEM and the SCH_SHEET_PATH. For this
reason, we need to avoid clearing the connectivity dirty flag until
we've finished processing all instances of the SCH_ITEM in the graph
This also means that we need to allow getting the SCH_CONNECTION pointer
even when the connectivity is still dirty (getting SCH_CONNECTION
happens based on SCH_ITEM and SCH_SHEET_PATH, not just SCH_ITEM)
- Incremental extraction needs the newly created items. The modified
items are already set in the connection graph but the newly created
items don't exist yet, so we need to add those explicitly
- Bus parents need to ensure that the bus children exist because we
iterate on the updates from the top of the graph down
We have a break somewhere in the connectivity that doesn't fully process
connections but the current code seems to catch these by forcing a
top-down & bottom-up calculation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14818