Prior to this change, the schematic connectivity was updated any time a
change was made to a connectable object. Now the connectivity is only
updated when an object change actually affects the connectivity. Other
properties like line width, fill type, custom fonts, etc. will not cause
the connectivity graph to be rebuilt.
The SCH_COMMIT flag SKIP_CONNECTIVITY has been removed. All schematic
objects can test if they are connectable and if there have been changes
to any connection properties that require a connectivity rebuild.
Remove duplicate rebuild connectivity calls from editor control tool.
This was causing the tangling end test to get called four times on every
undo and redo action because the dangling end test is already called in
the connectivity graph calculation code.
Update connectivity when changing label names which fixes an unreported
connectivity bug.
Also fixes a wrap-around bug in SPICE_VALUE::Normalize() where
it would lose the run of itself if the value was already
normalized to either the largest or smallest UNIT_PREFIX.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17228
Avoid O(N^2) by spatial sorting, don't run checks if the bounding boxes
don't overlap.
A second copy is ordered by type to help classes that only want to check
a few types having to walk the whole list.
The paste code creates invalid KIID_PATH objects with a zero length. All
paths must include the root KIID at a minimum. Code was added to prune
the invalid paths and some defensive code was adding to the formatter to
prevent the crash in case there are other paths where someone generates
a zero length path.
Pruning orphaned instance data does not work when loading schematics prior
to version 7 because the paths did not include the root sheet UUID. Once
the file is saved to V7 or later, the next load will prune any orphaned or
invalid instance data for the current project.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16245
It appears that in our zeal to prevent file changes when saving shared
schematics, we (I) clobbered saving relative symbol instance data paths
to the clipboard. This has be restored along with setting the correct
symbol unit for relative clipboard paths.
Fixed a serious issue with KIID_PATH::MakeRelativeTo() where the original
path was not restored when the incremental KIID object test fails. This
also included a minor optimization using the actual KIID object for
comparison instead of converting it to a string and then comparing the
string.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15981
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.
When duplicating and existing symbol, we must set the pins before
setting the lib symbol as the lib symbol will generate a pin map that
will be broken by the shift to new pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15728
SCH_PIN pointers are used through KiCad and removing them without a
global refresh risks crashes. A safer approach is to simply reuse the
SCH_PIN structures, updating the data to the revised library
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15715
This is required to keep selected and brightened state across undo.
It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED. FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags. But that seems like a risky change....
Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
Also fixes a bug where Convert Symbol wasn't undoable.
Also cleans up some SetModified() call no longer needed with SCH_COMMIT.
Also fixes bug where revert of a modification didn't update the screen's
RTree.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030