Commit Graph

6 Commits

Author SHA1 Message Date
Wayne Stambaugh 7183e9f97e Make the new schematic and symbol library file formats the default.
This is a very large and potentially disruptive change so this will be an
unusually long and detailed commit message.

The new file formats are now the default in both the schematic and symbol
library editors.  Existing symbol libraries will be saved in their current
format until new features are added to library symbols.  Once this happens,
both the legacy schematic and symbol file formats will be no longer be
savable and existing libraries will have to be converted.  Saving to the
legacy file formats is still available for round robin testing and should
not be used for normal editing.

When loading the legacy schematic file, it is imperative that the schematic
library symbols are rescued and/or remapped to valid library identifiers.
Otherwise, there will be no way to link to the original library symbol and
the user will be required manually set the library identifier.  The cached
symbol will be saved in the schematic file so the last library symbol in
the cache will still be used but there will be no way to update it from the
original library.

The next save after loading a legacy schematic file will be converted to
the s-expression file format.  Schematics with hierarchical sheets will
automatically have all sheet file name extensions changed to .kicad_sym
and saved to the new format as well.

Appending schematics requires that the schematic to append has already been
converted to the new file format.  This is required to ensure that library
symbols are guaranteed to be valid for the appended schematic.

The schematic symbol library symbol link resolution has been moved out of
the SCH_COMPONENT object and move into the SCH_SCREEN object that owns the
symbol.  This was done to ensure that there is a single place where the
library symbol links get resolved rather than the dozen or so different
code paths that previously existed.  It also removes the necessity of the
SCH_COMPONENT object of requiring any knowledge of the symbol library table
and/or the cache library.

When opening an s-expression schematic, the legacy cache library is not
loaded so any library symbols not rescued cannot be loaded.  Broken library
symbol links will have to be manually resolved by adding the cache library
to the symbol library table and changing the links in the schematic symbol.

Now that the library symbols are embedded in the schematic file, the
SCH_SCREEN object maintains the list of library symbols for the schematic
automatically.  No external manipulation of this library cache should ever
occur.

ADDED: S-expression schematic and symbol library file formats.
2020-05-04 12:40:03 +00:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Wayne Stambaugh e1900161a7 Eeschema: implement new symbol library file s-expression formatter.
CHANGES: Symbol library file format has been converted to s-expressions.

Add support code for picking apart symbols at some future junction that
will allow full inheritance conversion of existing symbol libraries.  For
now, symbols arranged by unit and body style numbers are nested for round
robin testing of symbol libraries once the parser is complete.
2020-03-03 08:06:22 -05:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
Jeff Young b4c8657904 Fix non-visible-part or conversion items from getting selected.
Also renames lib_draw_item to lib_item to match the class.

Fixes: lp:1840170
* https://bugs.launchpad.net/kicad/+bug/1840170
2019-08-15 10:00:23 +01:00
Renamed from eeschema/lib_draw_item.cpp (Browse further)