We add LIB_ALIAS to the VIEW rtree when choosing a new symbol or
browsing. The actual display element may change based on the unit or
demorgan representation but there will only ever be a single one drawn.
This will set the view bbox to maximum to ensure it is always checked
for drawing.
Related to lp:1796960
https://bugs.launchpad.net/kicad/+bug/1796960
Be more intelligent about sorting lib tree items. (Footprint
entries, for instance, come out of an already-sorted list.)
Don't recreate menus twice when laoding Footprint Editor.
More pervasive use of WX_FILENAME to avoid expensive calls to
wxFileName::SplitPath() and string concatenation.
For POSIX kernels do all the work on the file-system side so we
don't have to keep converting back and forth between encodings.
When LIB_ALIAS is renamed, it validates the new name. In case the name
typed in the field edit dialog is invalid, there was a discrepancy
between the name used further in the code and the actual alias name.
Fixes: lp:1765375
* https://bugs.launchpad.net/kicad/+bug/1765375
Schematic components have illegal characters replaced during load,
leading to broken component-symbol links. To avoid this, library symbols
should have their names fixed in the same way.
Fixes: lp:1752419
* https://bugs.launchpad.net/kicad/+bug/1752419
This commit aims at making the pin edit coupling easier to understand.
It renames the mode to 'synchronized pin edit', shortens the description
and inverts the logic to avoid double negation.
To make the code clearer, two items have their name changed to fit the
new description:
- m_editPinsSeparately -> m_syncPinEdit
- ID_LIBEDIT_EDIT_PIN_BY_PIN -> ID_LIBEDIT_SYNC_PIN_EDIT
This commit is a partial revert of aa81f5b9 & 445ac505. LIB_ID should
not be modified when a library is assigned to its part, as the library
nickname cannot be evaluated during the assignment and might be
different than its filename.
The GetName() method attempts to access the first LIB_ALIAS pointer in
the m_aliases member without checking if m_aliases is empty. This
should never happen because a new LIB_PART creates a LIB_ALIAS object
in the ctor. Some how, this is getting bypassed and causing Eeschema
to crash in the LIB_PART dtor on debug builds. GetName() now checks
for an empty alias list to prevent a null pointer segfault.
Fixes lp:1739614
https://bugs.launchpad.net/kicad/+bug/1739614
This is the last of the object save/load code that was not moved into
the SCH_LEGACY_PLUGIN object. All schematic and library I/O is now
performed in the SCH_LEGACY_PLUGIN object and as been removed from the
schematic and library objects.
The old single symbol file format has been replaced with the normal
symbol library file format since there was no difference between them
except the SYMBOL token. The SYMBOL token was no longer being read
since the introduction of the SCH_LEGACY_PLUGIN symbol library loader.
Update the Doxygen comments in all of the modified files.
Updates LIB_ID::LibItemName field when a part is renamed and LIB_PART
name when a new LIB_ID is set.
Similarly, LIB_ID::LibNickName field is updated when a library set, but
there is no easy way to assign library when LIB_ID::LibNickName is
modified.
LIB_PART name is stored in three places that might be changed
independently:
- the first LIB_ALIAS in m_aliases
- LIB_FIELD with VALUE ID
- m_name wxString field
This is potentially leads to an incoherent LIB_PART state. To prevent
this, all fields are changed using only one method: LIB_PART::SetName().
LIB_PART::m_name has been removed as the same information is available
in two other variables.
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.
Add Doxygen group for the trace environment variable strings.
Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.
The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.
To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
Add SCH_PLUGIN object to PART_LIB object.
Convert all PART_LIB I/O to use SCH_PLUGIN.
Remove library caching from PART_LIB and use caching provided by SCH_PLUGIN.
Add support to use PROPERTIES for buffering and document file write control
instead of adding code the SCH_PLUGIN object in the SCH_LEGACY_PLUGIN that
will not be required when the new file formats are implemented.
Add buffering to SCH_LEGACY_PLUGIN to prevent cache from writing file on
every change to library. This is to prevent the cache library from being
written every time a new symbol is added.
Add option to not save library document file when saving library. This is
primarily used by the cache library write code.
Move symbol library write code out of LIB_PART and into SCH_LEGACY_PLUGIN.
Add exception handling where LIB_PART caught the exception and returned
an error status.
Remove KICAD_SCH_IO_MANAGER build option as it is no longer optional.
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.
Remove all mention of footprint from the new LIB_ID doxygen comments and
code.
Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.
Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.
Update all source files effected by the code and file name changes.
Update .gitignore for file name changes.
Create SYM_LIB_TABLE and SYMBOL_LIB_TABLE_ROW objects derived from LIB_TABLE
and LIB_TABLE_ROW respectively for supporting symbol library tables.
Add FPID member to LIB_PART for associating a symbol to a specific library
nickname. Please note, this is not used in any way at this time and will be
implemented when the symbol library table is actually implemented.
Add sym_lib_table keyword to keywords file. This is a temporary measure
until a more elegant method for parsing and formatting library tables can
be implemented.
Build FPID support in the common library instead of the pcbcommon library
for use in Eeschema.
Fix build error when KICAD_USE_SCH_IO_MANAGER=OFF due to const issues with
LIB_PART ctor.
Fix unused variable build warning in legacy schematic plugin.
Make LIB_PART copy constructor take a const LIB_PART reference.
Add SaveSymbol to legacy symbol library plugin.
Add removeAlias to legacy symbol library cache.
Add AddSymbol to legacy symbol library cache.
* Write SCH_LEGACY_PLUGIN_CACHE object for handling the legacy symbol library
file format.
* Write legacy symbol library file parser.
* Write code to transfer cache to PART_LIB object so existing library save
code can be used for round trip testing. This is temporary until Eeschema
is updated to use the plugin for library management rather than PART_LIB.
* Add LIB_XXXX object helper functions where there was no way to set the member
variables of an object.
* Give the cache object friend status to some object where there are incredibly
byzantine ways of setting text in LIB_XXXX objects.
Libraries have been 100% case-sensitive for a while now; there is no longer a
need to keep this option around. This will change nothing except for any
stragglers still manually specifying this old option.