Currently, new global or local net labels are auto-filled with the
net name if the wire is driven by a global or local label. This
currently happens recursively within SCH_LINE. This fix moves this
to determining the driver from the connectivity graph, and removes
the determination from the SCH_LINE code where it does not belong.
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.
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.
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.
(The real bug here is that CONNECTION_GRAPH::assignNetCodesToBus() was
growing the bus aliases members list because it used a non-const
reference to it as a local storage list. The const scoping of it will
prevent this type of error in future.)
Fixes https://gitlab.com/kicad/code/kicad/issues/14269
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.
We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
(cherry picked from commit 7d4cb91f39)