REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates. Use "Update
Schematic from PCB" tool to update reference designation changes.
Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state. The update schematic from board tool is
the correct method to sync any changes from the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
CHANGED: When doing cross-probe zooming, KiCad zooms the selected
component to fill the screen. This makes it hard to understand the
part in context so users would have to always zoom out manually. This
commit uses the default text height in Eeschema and Pcbnew as a
constant to compare the height of selected parts or components against.
This lets the code determine how big the part is and scale the zoom
wider accordingly. Big parts get less scaling and small part get more.
NOTE: There is a little bit of debug code present. There are #ifdefs
to let developers easily swap in the original KiCad zoom for comparison.
There is also a bool added that can force each program to always perform
the new calculated zoom since KiCad ignores zooms that are close to the
current value. This debug code can be removed later as desired.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
Cross-probing from Pcbnew to Eeschema revealed that EEschema was
including all fields, visible or not, when calculating the bounding
box of the probed componentt. This caused problems with long strings
such as URLs that were not set as visible. The cross-probing code
tries to minimize 'Zoom to Fit' operations when it's not necessary,
and the overly large bbox values often resulted in zooms not being
performed and components displayed very small.
This code adds a version of 'GetBoundingBox' that takes a boolean
to tell it to include invisble fields or not.
Addresses issue: https://gitlab.com/kicad/code/kicad/-/issues/5149
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).
Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.
Remove obsolete HIGHLIGHT infrastructure (we now use selection).
Remove extraneous use of BUSY flag in several places (it was never
set).
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of. Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
SCH_SCREEN::UpdateSymbolLinks() should only be called when working with
the legacy schematic file format. Add schematic symbol library symbol
links should be set using SCH_COMPONENT::SetLibSymbol() which updates
the symbol link and pin map accordingly.
Change the schematic symbol LIB_ID edit dialog to properly use the new
SCH_COMPONENT::SetLibSymbol() function.
ADDED: Back annotation algorithm,
eeschema back annotation dialog
CHANGED: added some minor helper methods to SCH_REFERENCE_LIST and SCH_REFERENCE,
split SCH_REFERENCE_LIST::CheckAnnotation on 2 parts to reuse code
This moves EESchema DLIST structures to rtree. These changes are more
fundamental than the pcbnew changes from 9163ac543888c01d11d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
Selecting in Eeschema has major issues, as does highlighting in
pcbnew. So for now we do highlighting in eeschema and selecting
in pcbnew. Improving highlighting for pcbnew would be the next
logical step....
Fixes: lp:1836640
* https://bugs.launchpad.net/kicad/+bug/1836640