(Conversion was upside-down.)
Also fixes bugs with rotation angle increment not getting units
set and with a 0 footprint editor value overwriting a non-zero
pcb editor value (or vice versa).
This assigns the "Tab" key to a general pcbnew 45° limitation. Limit
can be enabled/disabled using context menu as well.
Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.
Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
Keeping them in base_units means that we can't introduce
any dependence on these functions to anything that needs to
compile without one of the unit defines (EESCHEMA, PCBNEW, etc)
It is still possible to move a pad independent of footprint through
the pad properties dialog. This is a much more conscious decision
than using the move tools.
ADDED: "Allow free pads" preference setting in pcbnew, default to off.
When enabled, allows moving unlocked pads independent of the footprint
(i.e. previous behaviour). When disabled (default), any attempt to move
a pad will move the parent footprint instead.
REMOVED: "Lock pads of newly added footprints" preference setting in
pcbnew. (Pad lock state is now loaded from the footprint definition)
CHANGED: There are now only two possible lock states for a footprint:
locked and unlocked. The lock state of the pads in the footprint is
now independent of the footprint lock state.
Also fixed a latent bug that would allow a pad to be moved when the
parent footprint was locked (see m_selectionTool->RequestSelection
lambdas in edit_tool.cpp)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7739