Added Distance(VECTOR2) function that returns a double. Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints
Also extended the size for arc calculations that get distances to center
points to avoid overflow
The selection heuristic broke down when one item was a filled
shape. Because all hit tests would succeed with distance 0 for
these shapes, they would always be considered the closest item
to the exclusion of all else, which made it very hard to
click on a graphic inside a filled shape.
Now, recognise when an item would be "dominating" and
decline to promote it to the "closet" spot. It will still
be selectable if there are no other items nearby, or if
there are multiple shapes.
We also need to consider electrical type as an exact hit when we are
showing it. Otherwise, we get the pin added to our consideration list
but not selected without hitting close neighbors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.
(cherry picked from commit 2ef18ad4ca)
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
The transform can always be used: it will be the identiy
transform when in the schematic.
Also fixes a bug where textbox borders didn't get
plotted, and a couple others where things were still
expecting an upside-down coordinate system.
Includes:
- Fix GAL to draw closed polygons in eeschema
- Add functionality to eeschema to draw arbitary polygons
- Update polygon item previews to have customisable edge colour
- Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
- Add SCH_RULE_AREA to paint and plot methods
- Add new rule area color preference to themes
When changing from local to hierarchical or global, the label style is
typically flipped so that global/hierarchical labels hang off the line
while local labels are set on top. To make this more intuitive we flip
the initial orientation when changing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17739
Remove duplicate sheet instance page numbering. It's already done when
the sheet is loaded from an exiting file or an already loaded schematic.
Remove the unnecessary page update code from the drawing tool.