It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road. Better
to just escape them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.
Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz
The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.
Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.
Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
While editing the grid works on OSX, it doesn't appear to on MSW or
GTK. Whether or not editing the backing table is any better or not
remains to be seen....
Fixes https://gitlab.com/kicad/code/kicad/issues/7323
Allows easier conversion of legacy libraries.
Note that performance will be suboptimal as it must read/write each
library once for each symbol in the library. Doing otherwise would
require modifying the PlugIn API, which probably isn't worth it for
a one-time migration.
This is a very large and potentially disruptive change so this will be an
unusually long and detailed commit message.
The new file formats are now the default in both the schematic and symbol
library editors. Existing symbol libraries will be saved in their current
format until new features are added to library symbols. Once this happens,
both the legacy schematic and symbol file formats will be no longer be
savable and existing libraries will have to be converted. Saving to the
legacy file formats is still available for round robin testing and should
not be used for normal editing.
When loading the legacy schematic file, it is imperative that the schematic
library symbols are rescued and/or remapped to valid library identifiers.
Otherwise, there will be no way to link to the original library symbol and
the user will be required manually set the library identifier. The cached
symbol will be saved in the schematic file so the last library symbol in
the cache will still be used but there will be no way to update it from the
original library.
The next save after loading a legacy schematic file will be converted to
the s-expression file format. Schematics with hierarchical sheets will
automatically have all sheet file name extensions changed to .kicad_sym
and saved to the new format as well.
Appending schematics requires that the schematic to append has already been
converted to the new file format. This is required to ensure that library
symbols are guaranteed to be valid for the appended schematic.
The schematic symbol library symbol link resolution has been moved out of
the SCH_COMPONENT object and move into the SCH_SCREEN object that owns the
symbol. This was done to ensure that there is a single place where the
library symbol links get resolved rather than the dozen or so different
code paths that previously existed. It also removes the necessity of the
SCH_COMPONENT object of requiring any knowledge of the symbol library table
and/or the cache library.
When opening an s-expression schematic, the legacy cache library is not
loaded so any library symbols not rescued cannot be loaded. Broken library
symbol links will have to be manually resolved by adding the cache library
to the symbol library table and changing the links in the schematic symbol.
Now that the library symbols are embedded in the schematic file, the
SCH_SCREEN object maintains the list of library symbols for the schematic
automatically. No external manipulation of this library cache should ever
occur.
ADDED: S-expression schematic and symbol library file formats.
This implements all existing symbol library object support and the ability
to save and load symbol library files between file formats for round robin
testing.
When adding a .pretty library, if the actual .pretty folder were
selected then no folder would be added to the list of libraries.
This led to an assert when normalizing paths, and the library
not being added.
Prevent the symbol and footprint library table editors from substituting
the current project path (${KIPRJMOD}) when adding libraries to the global
library table. This will almost assuredly fail when opening a different
project. We still allow users to manually use ${KIPRJMOD} in global table
paths under the assumption that if they are typing this in then they most
likely understand environment variable substitution.
Fixes lp:1830694
https://bugs.launchpad.net/kicad/+bug/1830694
DIALOG_EXIT was not being laid out correctly after setting the dialog
message. Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT. This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.
Remove DIALOG_EXIT_BASE as it is no longer required.
Fixes lp:1832899
https://bugs.launchpad.net/kicad/+bug/1832899
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view. Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().
This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table. Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.
Fixes lp:1821691
https://bugs.launchpad.net/kicad/+bug/1821691
Force the symbol library links whenever the symbol library table has been
modified. This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.
Fix the SCH_COMPONENT symbol resolver when falling back to the cache. The
resolver was using the LIB_ID ':' notation which was failing. Replacing
':' with '_' fixed this issue. This was also an issue when generating the
symbol message panel information.
Convert wxLogDebug to wxLogTrace in symbol resolver code path. Add new
trace type KICAD_SYM_RESOLVE.
Fixes lp:1821606
https://bugs.launchpad.net/kicad/+bug/1821606
wxWidgets has several bugs that result in cell editors being closed
right after they're opened. There are two wxWidgets hacks to
partially address this: the SetInSetFocus() hack, and a slow-click
hack. We used to try and work-around these bugs ourselves for
single-click access, but this changelist moves those over to
wxWidget's slow-click hack.
Fixes: lp:1817965
* https://bugs.launchpad.net/kicad/+bug/1817965
The folder button handler works will for footprint libraries but we
needed a specific class for the schematic libraries as well.
Fixes: lp:1818346
* https://bugs.launchpad.net/kicad/+bug/1818346
* Make LIB_TABLE_BASE::GetCount() return unsigned. This is more
consistent with the behaviour of STL containers (especially the
boost::ptr_vector this is really accessing). Sadly
wxGridTableBase() forces an int, so a cast is still required
at the WX interface.
* Make LIB_TABLE_BASE::At() return a reference. First, this is more
consistent with normal STL indexing operator[]'s, and secondly, it
allows an idiomatic const index method (so you can access const
LIB_TABLE_ROWs from a const LIB_TABLE_BASE).
The motivation is to allow use of this class and LIB_TABLE_ROW
in a test program, where the LIB_TABLE_BASE is const.
When creating new lib table rows, the pointer becomes managed by the new
table through the boost::ptr_vector. The row is non-copyable, however,
so we lose the reference as soon as it goes out of scope. Creating a
clone provides a new pointer that is moved into the table on creation.
Fixes: lp:1792456
* https://bugs.launchpad.net/kicad/+bug/1792456
Spooling up a full PLAYER in the background takes too long.
This also fixes bugs around how the tables are saved, although
that was just missing code rather than anything architectural.
Fixes: lp:1785436
* https://bugs.launchpad.net/kicad/+bug/1785436
This also fixes a bunch of bugs where an error during save would
still close the window (rather than cancelling the close action).
Fixes: lp:1785034
* https://bugs.launchpad.net/kicad/+bug/1785034