The legacy and s-expression (prior to version 20200828) file formats only
supported symbol unit and reference fields so the newly added value and
footprint fields must be updated from the original symbol fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12226
(cherry picked from commit 797827b833)
The fractional part of Altium schematic units is an integer number of
1/10000 mil segments, which is 2.54 nm. The internal unit of eeschema
is 10 nm, so each fractional unit in Altium is 0.254 base eeschema
units. To be consistent with
cf33cfcad1
we round to the nearest 10nm for each element
Fixes https://gitlab.com/kicad/code/kicad/issues/11742
(cherry picked from commit 6fef054c51)
The original decision to escape the legacy symbol library names results
in them being escaped every time they are opened which cause the curly
braces '}' from the original escaping to be escaped on subsequent
openings. This resulted in the symbol library names in the rescue
library not matching the library ID in the schematic.
This fix is likely to have other corner case bugs given the potential
for escaped characters in legacy symbol libraries. Given that we now
have escaped rescue libraries in play, removing the escaping will only
result in more issues so we will have to fix the corner cases as we go.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11563
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
(cherry picked from commit 21144481d2)
The previous solution cleared all of the fields and force the unit setting
to unit one which would have less than desirable effects when reusing a
schematic in another project. This solution forces all of the instance
settings to the first sheet instance of the current project to prevent file
change churn when changing shared sheets in the current project.
This will not prevent shared schematic file changes when the first sheet
instance data differs between projects.
(cherry picked from commit dd1dbb81f6)
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation. Saving back to disk without
modifying the arc should not modify the calculated values.
This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10442
(cherry picked from commit cd7141fd10)
Removes the ability to hide symbol units in file formats. This was
mostly the case for a while but there remained corner cases where we
left a default/hidden option
Fixes https://gitlab.com/kicad/code/kicad/issues/10888
(cherry picked from commit 8c36ba3653)
KiCad has stricter requirements for what consititutes an annotated
symbol. This checks for and corrects annotations that begin with '#',
do not begin with a non-numeric character or do not end with a number
(cherry picked from commit 78620347c8)
Fixes https://gitlab.com/kicad/code/kicad/issues/10760
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime
(cherry picked from commit ca7840334c)
It is no longer acceptable to set a LIB_FIELD index to -1. This was
trashing the sorting on load cause all kinds of false field comparison
failures. There are now assertions when attempting to use -1 as a field
index.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9811
Always use full sheet paths when storing sheet instances. Partial sheet
paths cannot be full resolved resulting in lost page numbers when renaming
sheet file name.
Fixes#9782
Remove duplicate instance data saved in both root SCH_SCREEN and SCH_SHEET
objects that was causing them to be out of sync. All sheet instance data
is stored in the SCH_SHEET object itself and rebuilt on the fly so it is
always current.
Remove Get/SetPageNumber from SCH_SHEET_PATH object so it doesn't obfuscate
where the actual sheet page number information exists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9782
Symbol library IDs included the library nickname which is incorrect
and meaningless since it will be overwritten by the symbol library
table code. This is not a file format change as there are no behavioral
differences.
1) we're storing it now anyway
2) the root sheet UUID is the one UUID that's *not* in the instance
array, and previously we were erroneously grabbing the first sub-sheet's
UUID (producing duplicate UUIDs).
For some reason, escaped double quotes in wxString::Format cause issues
on Mac. We can replace them with single quotes in most places without
loss of clarity