Pass the current SCHEMATIC object pointer in SCH_SYMBOL ctor so that
newly created symbols will update the current instance data on creation
when the current sheet instance is being displayed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
The legacy and s-expression (prior to version 20200828) file formats only
supported symbol unit and reference fields so the newly added value and
footprint fields must be updated from the original symbol fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12226
(cherry picked from commit 797827b833)
Previous use of instance was as an "override" of the default value.
This has changed to be used as the primary storage location for all
values. This means that we cannot clear the instance data when setting
a new value for all instances, instead we have to change the instance
data and the default value is superfluous
Fixes https://gitlab.com/kicad/code/kicad/issues/11439
(cherry picked from commit 1a70465927)
Grid-based accuracy doesn't need to be any larger than 1/2 the
diagonal as we'll snap to one side or the other. And symbols don't
need as much slop as other items since there's plenty of "meat" on
them.
Fixes https://gitlab.com/kicad/code/kicad/issues/9805
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting. This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".
Fixes https://gitlab.com/kicad/code/kicad/issues/9506
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
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
Given a symbol U12A, some parts of the code were assuming the prefix was
'U' while others were assuming 'U12'. Further complication arose when
there were '?' in the library version.
Fixes https://gitlab.com/kicad/code/kicad/issues/8223
1) Don't reset value when name changes
2) Don't fire events when initialising dialog
3) Make sure when symbol is saved back to schematic that only current
instance has its ref updated, but that all instances have their other
fields updated.
4) When saving symbol back to board always use the fields from the
editor and not the (alias-specific) ones from the library.
Fixes https://gitlab.com/kicad/code/kicad/issues/8159
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.
This fix required sorting all of the LIB_PART draw items to ensure
accurate comparison between the symbols stored in the schematic and the
original library symbols. This has a noticeable impact on symbol library
load performance. It may also cause significant changes the next time
the library is saved due to changes in the draw item sorting. Hashing
may be a better solution here but this addressed the immediate problem.
A skeleton method SCH_SCREEN::SwapSymbolLinks() was added because there
is most likely an issue with orphaned symbols in the schematic library
symbol cache during undo/redo operations. More testing is required to
verify this.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7263