The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
ADDED: Progress indicator in the taskbar
This adds a progress indicator to the Windows and macOS taskbar
icons to display the progress of some operations.
Note, this requires wxWidgets 3.1+
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.
Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
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.
If a schematic contains two symbols with the same name from different
libraries, the cache will contain the last symbol saved with that name.
Prepend the library nickname with the original schematic symbol library
nickname when saving the cache library to prevent name collisions.
Remove all symbol libraries from the project file after remapping to
prevent symbols that should be loaded from the cache being loaded from
a library further up the search order. Save the project file to clear
all of the libraries so they never get reloaded again.
Remove the symbol library management dialog and menu entries.
Rename the symbol library table dialog menu entry.
Remove all symbol libraries from default project file to prevent clashes
with the cache library.
Fix illegal symbol naming in Eagle plugin.
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.
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.
Remove adding the power symbol library when no libraries are specified
in the project file to prevent unexpected missing library dialog.
Only show progress dialog if there are actually libraries to load.
Do not call wxWindow::Destroy(). The dialog is created on the stack and
will be destroyed properly in the wxWindow dtor.
Fixes lp:1728648
https://bugs.launchpad.net/kicad/+bug/1728648
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.
The previous fix was building the full name incorrectly, when this name contains a path not relative to the project.
Fixes: lp:1700331
https://bugs.launchpad.net/kicad/+bug/1700331
Initializing wxFileName objects by using string assignment or the single
string argument ctor will cause wxFileName to parse everything to the
right of the first dot as the file extension. Therefore, file names such
as foo.1.lib and bar.baz.lib will fail. This is probably not the only
place in the KiCad source where this can occur.
Fixes lp:1700331
https://bugs.launchpad.net/kicad/+bug/1700331
Create dialog and code to allow legacy schematic symbols to be remapped
from the old library path look up method to the new symbol library table
method by using the following steps:
1) Create a project symbol library table containing all of the symbol
libraries defined in the old library look up list not found in the
global symbol library table.
2) Map each symbol to the correct symbol in the symbol library table
if possible.
Recreate library link to symbols so look up method can be converted to
symbol library table properly.
Add function to SCH_COMPONENT to link library symbols using the symbol
library table.
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.
When Eeschema is relaunched from KiCad, the symbol libraries were always
reloaded which isn't necessary as they are maintained by the kiface project
object until the project is changed.
Fix minor title capitalization in symbol library progress dialog.
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
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.
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
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.
The LIB_PART object stores a pointer to the PART_LIB that it belongs to.
Now that the PART_LIB is no long responsible for loading the library, add
the PART_LIB pointer after the library is loaded by the plugin.
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.
Replace LIB_PART::Conflicts() with an external test to for alias name
conflicts. This was only use in one place so don't clutter the library
API.
Change LIB_PART::AddPart() return type from bool to void since it's not
checked by any callers and differs from the equivalent schematic I/O
plugin function.