Disabling the grid should leave the snapping in place. But our disabler
returned the current point as closest, effectively always ensuring the
cursor position was the closest snap. This only uses grid when
requested.
This is temporary until we figure out a way to do multiple constraint
handling in GRID_HELPER or the EC_* class. This will work as long as
the EC constraint helper places the endpoint on either the primary or
aux grid.
Fixes: lp:1796540
* https://bugs.launchpad.net/kicad/+bug/1796540
When drawing the crosshair should track the element while the mouse
provides the position to calculate the next snap.
Fixes: lp:1796524
* https://bugs.launchpad.net/kicad/+bug/1796524
The dimension tool is used to measure physical dimensions on the board
therefore it should be able to snap to any other object, not just those
on its own layer set as is the case for other items.
This also deals with a corner snap case for constraints by first
snapping, then constraining, then aligning to grid. This ensures OoO
for alignment from least to most constraining.
The computeAnchors function is used to find best drag locations for
items being moved. All movable PCB items should be handled.
Fixes: lp:1794304
* https://bugs.launchpad.net/kicad/+bug/1794304
Polygon corners were enabled in the footprint editor but the logic
didn't extend to the board editor. This revises the logic to look for
DRAWSEGMENTs and only reference the PCB_MODULE_EDGE_T where needed to
create a new segment in the footprint.
Fixes: lp:1782966
* https://bugs.launchpad.net/kicad/+bug/1782966
Commit efdbc91e42 broken the primary
alignment mechanism for maintaining the current point as an auxilliary
grid reference. This reverts that commit and fixes both the initial
issue and the associated bug by applying the primary constraint after
the secondary. In this way, we consider the secondary constraint as an
additive rather than alternative constraint.
Fixes: lp:1793888
* https://bugs.launchpad.net/kicad/+bug/1793888
Allow corner adding to polygons in both module editor and board editor.
The board editor was already allowed but only through special types.
The module editor is now sychronized to the same process and both
recognize standard context menus
Fixes: lp:1782966
* https://bugs.launchpad.net/kicad/+bug/1782966
( cherry-picked from 06ac172c2 )
When constraining moves, the cursor snaps to grid but does not
represent the position of the final edited point. The point is rotated
to the nearest snap angle, while the vector length remains unchanged
resulting in a line longer than intended and off-grid.
This adds a grid-snap after the constraint is applied.
Fixes: lp:1792655
* https://bugs.launchpad.net/kicad/+bug/1792655
( cherry-picked from e7c51a6a6 )
Adds a hotkey to the TOOL_ACTION, and also checks for
action validity prior to running the actions (previously
implicitly gated by the enablement of the menu item).
Circles are defined by center and a point on their edge. This requires
the user to do extra math to figure out the size of the circle. The
patch allows the user to edit and draw circles using radial coordinates.
Previous implementation refilled zones every time they have been
unselected. This patch adds a flag that tracks whether the
zone has been actually modified, so it will be refilled only when
necessary.
Fixes: lp:1760903
* https://bugs.launchpad.net/kicad/+bug/1760903
Tools preserve their state between runs, so it could happen that
activating a tool restores the state when autopanning is enabled, even
though it should not be.
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.
Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.
Fixes: lp:1745981
* https://bugs.launchpad.net/kicad/+bug/1745981
Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
Rename GetPolyPoint() to BuildPolyPointsList(), because GetPolyPoint() looks like an accessor, but it is not an accessor.
(Using it as accessor can creates a *very long calculation time* for very basic access to polygon vertices)
Fixes: lp:1745050
https://bugs.launchpad.net/kicad/+bug/1745050
- renamed connectivity.[h|cpp] to connectivity_data [.h|.cpp] so that the file name matches the main class name.
- GetNetItems() now returns a vector instead of a list
- added TOOL_INTERACTIVE::resetTransitions()
- made protected and moved TOOL_BASE::setTransitions() to TOOL_INTERACTIVE
- TOOL_MANAGER calls TOOL_INTERACTIVE::resetTransitions() instead of
setTransitions()
Removes the need of using the legacy code in polygon/PolyLine.{h,cpp},
refactoring all CPolyLine instances with SHAPE_POLY_SET instances.
The remaining legacy methods have been ported to SHAPE_POLY_SET;
mainly: Chamfer, Fillet, {,Un}Hatch.
The iteration over the polygon vertices have been simplified using the
family of ITERATOR classes.