* 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
Switch Eeschema to use the built-in printing routines
because its precisions are close to those and it is
cleaner.
Give mils a precision of 2 decimal places to match
the precision shown in inches.
Unlike eeschema, PCBNew has had a selection model for two major
releases so folks have gotten used to RMB acting on the selection
rather than what's under the mouse.
Plus it makes RMB after a drag-select nearly useless as your mouse
by definition ends up outside the selection bbox.
Fixes https://gitlab.com/kicad/code/kicad/issues/5857
This uncovered a memory corruption bug in MODULE's move operator,
several bugs in MODULE's move and copy constructors, and a bug in
BOARD's GetItem() call.
It also bumps the file format for saving/restoring groups inside
footprints.
Using CopyFile() that can collide with a windows header create hard to
understand errors, including link errors.
Renaming this function avoids these strange errors.
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 previous way leaked the temporary SHAPE that was used
to construct the shared_ptr. Also, emplace_back shouldn't
be used with make_shared - since we already have the shared_ptr
and emplace_back will try to construct a new one.