Tests for read-only in table save routines and catches other IO_ERRORS.
Still returns a non-specific error message but prevents crashing when
erroring during save.
Fixes https://gitlab.com/kicad/code/kicad/issues/7352
Versions specific variables that may point to objects that change
through versions, allowing multiple KiCad versions to operate correctly
(even on MSW) on the same machine.
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
This change completely removes the LIB_ALIAS design pattern an replaces
it by allowing LIB_PART objects to inherit from other LIB_PART objects.
The initial implementation only allows for single inheritance and only
supports the mandatory fields in the derived part because that is all
that the current symbol library file format will support. Once the new
file format is implemented and saving to the old file format is deprecated,
more complex inheritance will be added. The LIB_ALIAS information saved
in the document files was move into the LIB_PART object. This change
impacts virtually every part of the schematic and symbol library editor
code so this commit message is woefully incomplete.
REMOVE: Removed the symbol aliases concept from the schematic and symbol
editors and the symbol viewer.
NEW: Replace the symbol alias concept with simple inheritance that allows
a library symbol to be derived from another library symbol.
When no default library tables are found, set the default wxFilePickerCtrl
to the users configuration path instead of the current project path to
prevent any project library tables from being used as the default.
Fixes lp:1809769
https://bugs.launchpad.net/kicad/+bug/1809769
Remove the placeholders for the upcoming s-expression schematic and
symbol library file format plugin type. The lack of a valid plugin
implementation was causing an undefined plugin type string in the
plugin type selection cell when new rows were added to the table.
Fixes lp:1733116
https://bugs.launchpad.net/kicad/+bug/1733116
The replaced wxASSERTs notify the developer that a variable is a
null pointer, but continue code execution and lead to a crash.
Instead, they are changed to wxCHECKs, that give the same type
of notification, but return from a function before the crash
happens.
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.
This forces the compiler class specific features rather than borrowing
from the base class's std::string. In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.
Added function UTF8::wx_str() which is of great convenience also.
Implicit conversions still work as before, and hopefully more reliably.
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 potential memory leak in both footprint and symbol library table
parsers when a duplicate library nickname entry exists.
Parse entire symbol library table before raising duplicate nickname
exception.
Improve the duplicate library table nickname error message to make
life easier for users to fix broken tables.
Add loading symbol library table code to schematic PROJECT object.
Fix minor issues with loading global symbol library table.
Add default symbol library path environment variable to the environment
variable list and change the variable name to KICAD_SYMBOL_DIR.
Add code to SCH_SCREENS to test if all library nicknames of the symbol
library IDs are empty.
Remove unnecessary KICAD_USE_SCH_IO_MANAGER build option.
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.