* Make the ruler able to switch to mils after creation
* Cleanup an unused flag in Pcbnew dimensions
* Move unit changed notification into EDA_DRAW_FRAME so more
frames to use it.
* Allow switching units when GerbView ruler tool is active
They're only on screen when they're being used, and we don't have
a GAL available to calculate their actual extents from (since their
text scales with zoom).
Fixes https://gitlab.com/kicad/code/kicad/issues/5845
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.
This introduces a new util function in geometry_utils which snaps a vector
to axes or 45 degree lines. This can be used whenever you want to
snap a vector to these angles, but still want it to stay on a grid.
This snapping is used for the dimension tool and the ruler tool.
This is substantially simpler for two-point tools that the method
used by the line tool, which uses DIRECTION_45.
Fixes: lp:1780826
https://bugs.launchpad.net/kicad/+bug/1780826
If the client tool indicates it isn't happy for us to continue
(because, for instance, the user has cancelled the Zone Properties
dialog), then make sure we don't capture the mouse.
Fixes: lp: 1740780
* https://bugs.launchpad.net/kicad/+bug/1740780
- support for background color setting
- removed several global config settings (such as g_Drc_On)
- wrapped most of global config settings in PCB_GENERAL_SETTINGS class
- reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
- new GAL feature for legacy users: double-click (or E) to change track width available as an option.
Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543
Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
The zone creation in DRAWING_TOOL was a complex event loop whici
simultaneously managed the event handling, construction of the preview
polygon and the creation and commiting of the zone, all in the same
scope. This has been broken into several pieces:
* POLYGON_ITEM preview item, used to preview the polygon in progress
* POLYGON_GEOM_MANAGER is a class that collects points from user input
and used them to describe a polygon's geometry, including calculation
of 45-degree constrained leader lines
* ZONE_CREATE_HELPER is a class which deals with creating zones based on
geometry from a geometry manager and parameters from the DRAWING_TOOL
* The (much simpler) event loop in DRAWING_TOOL drives the
POLYGON_GEOM_MANAGER. With a minor refactor, this loop can be reused
in future for other polygonal tools if wanted.
The polygon preview now has a translucent fill which makes it easier to
visualise the zone.
This also adds the Close Zone Outline and Delete Last Corner actions as
part of the new event loop.
Fixes: lp:1663885
* https://bugs.launchpad.net/kicad/+bug/1663885
Fixes: lp:1667885
* https://bugs.launchpad.net/kicad/+bug/1667885
This uses the two-point geometry manager to split the logic of the ruler
geometry and the preview item display. This allows the ruler to use that
manager's angle snap feature.
This adds the microwave tools to GAL in Pcbnew as a new tool:
MICROWAVE_TOOL.
Some new preview items are introduced to support this:
* TWO_POINT_GEOM_MANAGER for managing construction of two-point
geometries, such as that used to construct the inductor.
* CENTRELINE_RECT_ITEM a preview item to draw ractangle with a given
aspect ratio along a line (specified using a TWO_POINT_GEOM_MANAGER)
PCB_TOOL gets a generic event loops which should be useful for more
than just microwave tools:
* doInteractiveItemPlacement() - handles event loops that wait for a
click, create an item on click and then allow moving it
around/flipping, etc.
Fixes: lp:1531323
* https://bugs.launchpad.net/kicad/+bug/1531323