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.
(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17009
(cherry picked from commit f4a085575a)
Apparently we forgot to handle schematic connectivity changes when redoing
undone changes. The same connectivity update logic that was added to the
commit object is now used in SCH_EDIT_FRAME::PutDataInPreviousState().
Please note the granularity of connectivity rebuilds on schematic object
property changes is at the object level which is overly aggressive. This
means that connectivity rebuilds will happen when connectivity changes
that have nothing to do with and objects connectivity are changed. Until
objects can handle their own connectivity state, this will have to suffice.
AppleClang seems to generate different typeinfo for forward declarations
of classes than the actual class object, so the any_cast for the pointer
parameter fails due to the types not matching (even when they look the
same when printed in the error).
Instead, we must always ensure we use the actual object when defining
the parameter type when placing the object into the event.
This change no longer sorts pasted sheets by page number. This was done
because pasted sheets may not be numbered. When sheets are not numbered
they are sorted by UUID path which results in some unexpected results.
Since the pasted sheet code uses recursion, pages will be numbered in the
order they are added.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16580
Pasted sheets do not have assigned SCH_SCREEN objects until after they
are loaded.
Do not recalculate connectivity unless the SCH_COMMIT object actually has
connectable schematic object changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16579
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
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
Pasting from the clipboard when copying from another project can leave
sheet instance information that is not valid for the current project.
This change prunes all sheet instance information that is not relevant
to the current project. It also prunes invalid paths created by pasting
sheets from different paths in the same project.
Also fixes some issues with menus being owned by the wrong
tool.
Also removes "no xxx selected" warnings in submenus which
aren't show unless xxx is selected to start with.
Also fixes some un-translated strings (which happily
already exist elsewhere in the UI)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16454