Change the legacy schematic plugin to preserve illegal LIB_ID characters
when load schematics prior to version 4.
Check for illegal LIB_ID symbol names during project rescue. Rename and
rescue any symbols with illegal LIB_ID names.
Add static methods to LIB_ID object for testing for and fixing names
with illegal characters so there is uniform code for doing so.
Update the Eagle plugin symbol loader to fix symbol names using the new
LIB_ID fix illegal names method.
Fixes lp:1732236
https://bugs.launchpad.net/kicad/+bug/1732236
Dragging a full line that is connected to a component
now drags the component as part of the block, maintaining
connections.
Fixes: lp:1167714
* https://bugs.launchpad.net/kicad/+bug/1167714
Removed cut & copy toolbar icons in the schematic editor, as they
were inaccessible. One cannot have an item selected and move the
mouse outside the canvas area due to autopanning.
Added paste icon to the library editor.
Tree nodes now have an additional field 'InTree' to determine
if the view is aware of its existence. This way, there is no need
to rebuild the data structures from scratch when they need to be
filtered.
Library Editor updates its working copy of the edited part every time
it is modified. If LIB_EDIT_FRAME::PlacePin() calls OnModify() too early,
the working copy does not include the last change.
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.
Handle exception in best zoom method when a symbol could not be loaded
from the symbol library table. This was triggered by an empty symbol
library table but could be triggered by any exception thrown while
loading the symbol.
Fixes lp:1733111
https://bugs.launchpad.net/kicad/+bug/1733111
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
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
All of the schematic object load and save code is implemented in the
legacy schematic plugin so it is no longer required.
Remove unused file with old schematic file loader.
Doxygen comment cleaning.
Use the legacy plugin schematic loader in the sheet edit and append
schematic code paths.
Check for fully qualified LIB_ID objects (must have library nickname)
when loading existing schematics when edit sheets.
Rewrite append schematic feature to handle import issues rather than
change the name and file name of all of the sheets in the imported
schematic. This includes the following:
- Load the schematic into a temporary SCH_SHEET object.
- Make sure the imported schematic does not cause any hierarchy
recursion issues.
- Verify the imported schematic uses fully qualified #LIB_ID objects
(symbol library table).
- Check to see if any symbol libraries need to be added to the current
project's symbol library table. This includes:
- Check if the symbol library already exists in the project or global
symbol library table.
- Convert symbol library URLS that use the ${KIPRJMOD} environment
variable to absolute paths. ${KIPRJMOD} will not be the same for
this project.
- Check for duplicate symbol library nicknames and change the new symbol
library nickname to prevent library name clashes.
- Update all schematic symbol LIB_ID object library nicknames when the
library nickname was changed to prevent clashes.
- Check for duplicate sheet names which is illegal and automatically
rename any duplicate sheets in the imported schematic.
- Clear all of the annotation in the imported schematic to prevent
clashes.
- Append the objects from the temporary sheet to the current page.
- Replace any duplicate time stamps.
- Refresh the symbol library links.
Add support code to SCH_SCREEN object to assist with schematic import.
Doxygen comment cleaning.
Fixes lp:1731760
https://bugs.launchpad.net/kicad/+bug/1731760
Do not attempt to normalize environment variables that are not valid
paths, paths that do not exist, or paths that the user does not have
read access to.
Fixes lp:1731655
https://bugs.launchpad.net/kicad/+bug/1731655
Dotted, dashed and dash-dot lines are provided in
HPGL, PDF, PS and SVG plot outputs along with line
width and color formatting.
DXF format does not currently provide any dashed
line functionality
A bug in HPGL plotted is corrected. Previous HPGL
dashed line commands were incorrect, plotting all
lines as solid.
The GTK+ file dialog is case sensitive however it does support regular
expressions. Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.
A note to developers: make sure to add a file extension when setting
when setting the default file argument. If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.
There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.
Fixes lp:1720542
https://bugs.launchpad.net/kicad/+bug/1720542
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.
A copy and paste error was causing to footprint library table file name
and path to be shown in the symbol library table edit dialog. Factor
out code in PROJECT::FootprintLibTblName() to PROJECT::libTableName()
to handle both symbol and footprint library table names and create a
new PROJECT::SymbolLibTableName() method to fix the path and file name
in the symbol library table edit dialog.
In the rare case when something goes wrong with the symbol library
table remapping, do not attempt to rescue symbols that are neither
in the cache nor in any of the libraries.
The legacy rescue library code overwrote the existing library so
previous rescues would get lost. If the rescue library exists,
copy it's contents into the new rescue library before adding the
new rescued symbols so no previously rescued symbols are lost.
Fix a null pointer bug in the symbol library editor when no symbol
is loaded.
Set LIB_ID item name to name passed to LIB_PART ctor.
Copy LIB_ID in LIB_PART copy ctor.
If a library disappears all together or a symbol name is changed, force
the rescuer to add it to the rescue library. The current rescue code
only looked for differences if they existed between libraries. This was
causing symbols to be unceremoniously dumped from the symbol library
table remapping.
Don't search for cache rescue candidates in the symbol library table
rescuer.
The old symbol library list save/load code does not get called in the
schematic project file configuration code. Use the LibNamesAndPaths
static function from the PART_LIBS object.
Bump schematic file version from 3 to 4 which represents the switch to
the library table symbol linking which is incompatible with all previous
versions.
Refresh the schematic after running remapping dialog manually.
Add missing CMP_TREE_NODE_LIB_ID type that was inadvertently deleted by
the symbol library table implementation that broke the preselected symbol
tree expansion and highlighting.
Changed CMP_TREE_NODE_LIB_ID type from ALIAS to LIBID for more accurate
description.
Use LIB_ID in COMPONENT_SELECTION object instead of strings of the
library and symbol names.
Move FindAlias() inside a try/catch block as is can throw an exception.
Don't abort adding symbols to library when a symbol cannot be found in
the symbol library table or the cache library. Instead, queue up error
messages and display them after attempting to add all of the symbols.
Always save the library file even if some of the symbols could not be
archived.
Catch IO_ERRORs in SCH_COMPONENT resolve to prevent unhandled exceptions
further up the stack.
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.
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.
Change all of the component tree helper objects to use LIB_IDs instead of
LIB_ALIAS pointers. LIB_ALIAS pointers are dangerous to use because they
can be deleted in the symbol library editor while the component chooser
dialog has copies of them. With LIB_IDs, the LIB_ALIAS pointer is found
on demand and can be guaranteed to be valid.
Update the chooser dialog to load the symbol library table instead of the
libraries defined in the project file and return a LIB_ID instead of a
LIB_ALIAS pointer.
Modify SCH_BASE_FRAME::SelectComponentFromLibrary() to handle the LIB_IDs
returned from the component chooser dialog.
Use GetPath() instead of GetFullPath() when initializing environment
variable table entries KICAD_SYMBOL_DIR and KICAD_PTEMPALTE due to
unexpected trailing path separator which was causing find libraries
by URI to fail.
Don't create a project symbol library table when there are no libraries
not found in the global symbol library table.
Don't add non-existent libraries to project symbol library table.
Clear symbol library table when loading a new schematic.
Minor remapping status message improvements.
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.
In LIB_EDIT_FRAME::GetComponentFrom{Undo,Redo}List() methods, the
PICKED_ITEMS_LIST object which was retrieved from undo/redo list has not
been destroyed.
Rewritten SCH_SCREEN::ClearUndoORRedoList() to be easier to read.
Minor whitespace formatting.
KiCad library symbol text objects cannot contain carriage returns and/or
line feeds which isn't the case with Eagle symbol libraries. Otherwise,
the library file will be corrupt when it is saved. Fixing this in the
legacy plugin would break the current file format so just replace them
with underscores. Ideally these text objects should be broken into
multiple text objects but the current plugin design doesn't support
this.
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
- set a proper title for the dialog
- changed the library parser delimiters to all whitespaces
- sorts the model list in the alphabetical order
- one tab to select subcircuit and semiconductor models
- model type is automatically selected
This instead of using the library alias property. But to not break any
library. When adding new components to the schematic, copy the value
from the library into the Field variable only if the field variable would
otherwise be empty.
This way, the context menu for showing the docs is more understandable
for users, and is also changeable from the schematic without having to
modify the actual libraries.
Fixed: lp:1723104
- Also makes the project and file import functions filetype dependent.
- The change from IO_MGR::KICAD to IO_MGR::KICAD_SEXP removes a conflict from a compile definition for KICAD when compiling kicad/import_project.cpp