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
(cherry picked from commit 315ad0e071)
When changing from a larger part to a smaller part, the previously
existing pins may be removed from the screen but still linked to
elements in the connection graph because we don't set them dirty unless
the changed element overlaps
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17851
(cherry picked from commit 0cd3e17db7)
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
(cherry picked from commit a9f35ba42e)
This has now pushed the issue down to a broken RTree issue. Skipping the
asserts in debug builds will still crash but now it's pushed down to the
RTree.
The undo/redo lists can have non-SCH_ITEM elements such as worksheet
items. When re-doing connectivity, we only need the schematic items, so
we pass on these
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16752
The new behavior is to only expand to the first child of the root sheet
level. On very complex hierarchies, this makes the navigator far more
useful.
Do not update schematic hierarchy navigator on every edit. Now only
sheet changes will trigger a rebuild of the tree.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16371
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
- 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
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
The connection graph should only be updated within the commit structure
because this is the only time the connectivity should be changed. We
want any connectivity changes to be included in the commit as well, so
this should be stored prior to the undo/redo list mods
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.
Possible fix for KICAD-KY.