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.
Refactor rescue objects so that they can support derivation.
Factor out legacy rescuer code to perform legacy project rescues.
Create new symbol library table rescuer for rescuing symbol library table
based projects.
Perform the correct rescue type on project load.
Add symbol library table remapping support to the tools menu for run on
demand as applicable.
Add flag to SCH_SCREENS::UpdateSymbolLinks() to allow forcing the symbol
link updates when the library modification hash has not changed.
Simplify some of the library editing code. There have been a few minor
changes in the behavior of the editor. If the current symbol is deleted
from the library, the next symbol in the library is not loaded. The
deleted symbol is cleared and the current symbol is empty.
Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.
Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.
Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.
Add method to expand URI to LIB_TABLE_BASE.
Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.
Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.
Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
Remove all instances of PART_LIBS and replace them with SYMBOL_LIB_TABLE
except for the CMP_TREE_MODEL_ADAPTER which requires updating as well.
Return the selected symbol using the LIB_NICKNAME:SYMBOL_NAME format when
viewer is launched as modal.
Add code to SYMBOL_LIB_TABLE object to allow enumerating symbol library
power symbols only.
Add a non-const version of LIB_TABLE::findRow().
Remove redundant information from Doxygen comments.
Check the if the schematic being loaded has been remapped (no symbol
library table nicknames defined) and remap accordingly.
Fix issues when resolving the library symbol links in the schematic
symbols.
Add cache library fallback when resolving symbols that cannot be
remapped.
Add remap complete message to remap dialog.
Add HasLibrary() helper to LIB_TABLE_BASE.
Fix issues when loading library symbols using symbol library table.
Add hashing function to symbol library table.
Improve the symbol panel message to warn user when cache library is
used to resolve symbol.
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.
Add Doxygen group for the trace environment variable strings.
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
This commit was too broad and not cognizant of the purpose of the class
UTF8.
Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.
Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
Fix if statement logic to ensure the unit number is never set to zero.
Add logic to the legacy schematic plugin to automatically convert any
schematic files that have components with a unit setting of zero. Set
the schematic modified flag so that the user will be notified of a
changed schematic.
Add a user warning when the schematic parser fixes the bug and sets
the file modified flag.
Fixes lp:1677282
https://bugs.launchpad.net/kicad/+bug/1677282
PROPERTIES object has been recreated every time it was needed, using
two fields in PART_LIB class. Now the buffering & caching settings are
stored directly in a PROPERTIES object.
(now "F1" is forced to name given by "DEF", like in stable version)
Fix also an incorrect parsing of .dcm file, if a component was not found in corresponding symbol lib.
(Can happen for not updated .dcm files)
A conversion from wxString using FROM_UTF8() was inadvertently used when
loading and enumerating symbols from the legacy plugin. This conversion
would break any non-ascii characters in the symbol name.
Fixes lp:1664642
https://bugs.launchpad.net/kicad/+bug/1664642
Check to see if the root symbol alias already exists before adding it to
the symbol library alias list in the legacy schematic I/O plugin. There
currently about six different ways that the root alias can be changed in
the root symbol which causes issues. This really needs to be cleaned up.
Use buffering when updating a symbol in a library to prevent the library
file from being written before it is backed up.
Update the alias and unit selection menubar drop down lists.
Delete the output formatter so the file is closed so that reading the
file time stamp can be performed to prevent unnecessary cache reloads.
Fixes lp:1664834
https://bugs.launchpad.net/kicad/+bug/1664834
Apparently symbol definition blocks can have a '0' character in the lock
position which is typically defined as 'L' or 'F'. This must have been
a oversight at some point since both versions of the DEF parameters
exist in library version 2.3 files.
Disable the symbol library cache buffering after saving.
Check for existence of cache library when before attempting to rebuild
the cache. Create a new cache library object if no cache library was
loaded.
Add missing buffering and cache properties to LIB_PART::FindAlias() to
prevent the plugin from reloading the cache library that may not exist.
Add method to find library by full path and file name.
Revert the check for a symbol in the cache library remove from last
patch.
Add checks for plugin cache file name validity and existence of a the
file before attempting to verify the file modification time to prevent
wxWidgets from raising an assertion in debug builds.
Clear modified flag when saving buffered and/or cached library.
Add the ability to save empty symbol library file for caching and empty
schematic.
Remove check for existing symbol in cache populating routine. Just perform
a complete rebuild of the cache library and overwrite the existing one.
Fixes lp:1663871
https://bugs.launchpad.net/kicad/+bug/1663871
Move adding LIB_PART to library until the part is fully parse. The problem
was unique_ptr was cleaning up the part when an exception was thrown during
parsing causing a double free when the cache was deleted.
Add missing try/catch block when loading the cache library during an append
schematic operation.
Fixes lp:1663869
https://bugs.launchpad.net/kicad/+bug/1663869
LIB_ID was changing the symbol name due to the parser dropping everything
past the first '/' character which is interpreted by LIB_ID as the item
version. Add flag to ignore this in LIB_ID::SetLibItemName() and add a
new ctor so the library nickname, item name, and revision can be set as
required to prevent the standard LIB_ID parsing.
Fix a few places where PART_LIBS functions FindLibraryAlias() and
FindLibPar() were translating wxString symbol names to LIB_IDs where the
LIB_ID parser was truncating the symbol name.
Use LIB_ID instead of wxString for storing the library symbol information
in the schematic symbol in preparation for the upcoming symbol library table
implementation.
Change the FindLibAlias and FindLibPart functions in the PART_LIBS object
instead of wxString. Please note that only the library ID name is used to
search the list of libraries. The library nickname is ignored. Once the
symbol library table is implemented and full LIB_IDs are defined, the
library search code will no longer be used and will only be kept to load
older schematics that have not been converted.
Move SCH_LEGACY_PLUGIN_CACHE definition so that the legacy plugin knows
how to properly delete the cache object.
Don't call init() when performing library functions as it was always
setting the m_cache variable to null which cause the library to be
reloaded every time a library command was performed as well as a
memory leak.
Delete cache object when the plugin is destroyed.
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.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.
Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.
Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
Yet another quirk parsing LIB_TEXT object was found. Apparently even in
library version 2.3, the text properties can be dropped so a check for
end of line was added to prevent the parser from choking on a valid text
line.
Fixes lp:1628160
https://bugs.launchpad.net/kicad/+bug/1628160
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.
* Add SCH_PLUGIN::Save() for current file format and code for saving all
SCH_XXX objects.
* Add function to SCH_FIELD to get the position of the field in the component
not the position added to the component position which is what GetPosition()
does. This was required because saving the component field expects position
of the field sans the position of the component.
* Remove public members from BITMAP_BASE object and fix all associated
code.
* Fix the never ending coding policy violations found making these changes.
* Create a new dummy root sheet and screen when the schematic fails to load
which was causing Eeschema to crash.
* Remove conversion from UTF8 to wxString left over from a previous change
which hopefully will fix an OSX build error.
* Fix parsing of text objects to handle version 1 schematic files.
* Fix parsing of component fields to handle version 1 schematic files.
* Don't throw a parse error when a version 1 schematic file doesn't end with
$EndSCHEMATC.
* Factor out PROPERTIES object from the PCB plugin code and move it into
common so it can be used by both the Pcbnew and Eeschema plugins.
* Add schematic I/O plugin manager for loading and saving schematic and
component library files.
* Add initial attempt at a parser for current schematic file format. This
parser will be infinitely more strict than the current parser which is very
forgiving in what it parses.
* Make minor changes to the base bitmap class to support the new parser.
* Add find root sheet support to sheet object to allow fetching the root
sheet from any sheet in the stack.