Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:
1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.
2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.
This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
Fixa also a corner case which crashes Pcbnew: if the dialog is opened, and the board was changed (reloaded, cleared), pcbnew crashed because many pointers stored in dialog become invalid. Now the dialog is just closed.
* Correctly implement scaling based on DXF $INSUNITS - at least where
INSUNITS is sensible. I ignore units like miles, gigameters, AU,
lightyear, parsec ...
* Correctly implements LWPolylines, adding an ARC segment rather than a
line segment when bulge != 0. A number of users have been complaining
about getting the wrong board shape (chamfered corners rather than
rounded corners) on DXF Import, now they shouldn't complain.
Following rev 6627 (git 2777182), if a non-duplicatable item was the object of
a Duplicate action, the original item would be picked up, potentially
misleading the user into thinking something was actually duplicated.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
* No initial copied object changed (this was a serious bug to modify these
objects. Previous version modified references and other texts using a
broken algorithm).
* Only new pads are numbered (therefore renumbering is used only in footprint
editor)
* Remove not working feature in circular array: now only use number for
pads (other options using alphabetical letters are removed: did not work
correctly).
* A more clear option is used to choose if the pads are numbered from a chosen
value or from the first available value.
* Adding a warning message if a parameter is incorrect.
* Use case insensitive comparison to choose import plugin from the file extension. The
file extension is not always lower case especially on Windows.
* onleftclick.cpp: fix false warning message in the legacy canvas which happens afte
switching from the GAL canvas when a board item is still selected.
* The resource setting for bitmap2component is too late in the CMakeLists.txt,
and is being ignored. Bitmap2component does not have an icon resource on
Windows. Moving the entire section resolves the issue.
* The other programs only have the mingw special case listed, not the generic
declaration for the resource file so added them.