If we are renaming a sheet that exists only once in the schematic, then
we don't need to warn about case sensitivity. If the sheet exists
multiple times, we do. We can't check this using SCREENS because the
screens don't maintain full state information about where they are used.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17901
Pasting from the clipboard when copying from another project can leave
sheet instance information that is not valid for the current project.
This change prunes all sheet instance information that is not relevant
to the current project. It also prunes invalid paths created by pasting
sheets from different paths in the same project.
The paste code creates invalid KIID_PATH objects with a zero length. All
paths must include the root KIID at a minimum. Code was added to prune
the invalid paths and some defensive code was adding to the formatter to
prevent the crash in case there are other paths where someone generates
a zero length path.
Pruning orphaned instance data does not work when loading schematics prior
to version 7 because the paths did not include the root sheet UUID. Once
the file is saved to V7 or later, the next load will prune any orphaned or
invalid instance data for the current project.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16245
It appears that in our zeal to prevent file changes when saving shared
schematics, we (I) clobbered saving relative symbol instance data paths
to the clipboard. This has be restored along with setting the correct
symbol unit for relative clipboard paths.
Fixed a serious issue with KIID_PATH::MakeRelativeTo() where the original
path was not restored when the incremental KIID object test fails. This
also included a minor optimization using the actual KIID object for
comparison instead of converting it to a string and then comparing the
string.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15981
Rather than update library symbols one at a time, queue them up by
schematic symbol to prevent multiple updates to the same symbol in
complex hierarchies. This also removes all of the library symbols
first which will clear out all of the library symbol variants that
were created by modifying library symbols in place and/or changes to
the symbol in the library.
Don't add new variant library symbol if an equivalent variant already
exists in the schematic local cache. This prevents duplicate library
symbols from being added to the local cache when the first variant in
the cache does not match that of the symbol being added.
Also moves passive RLC inference out from migration to just-in-time
creation for the simulator or netlisting.
Also fixes a version guard mismatch because the spice migration was
done inside UpdateSymbolInstances (which has its own version guard).
Also changed UpdateSymbolInstances to UpdateSymbolInstanceData so
someone else in the future doesn't think it's a general-purpose symbol
instance updater.
This change reverts the storage of all symbol instance data in the root
schematic. This was done because it's not possible to reuse instance
data when importing from sub-sheets.
There has been a fundamental change in how sheet paths are store in the
instance data. The root schematic UUID is always used when saving the
instance data. To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project. This provides a way
to determine the project that stored the instance data. All uses of paths
without root sheet have been expunged from the code.
The sheet instance data is still saved only in the root sheet for the
time being. New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number. Sheet page
numbers will not be imported.
Added project name to instance data to improve the readability of the
schematic file format. It also creates an opportunity to remove orphaned
instance data by project name rather than cryptic UUIDs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
This change reverts the storage of all symbol instance data in the root
schematic. This was done because it's not possible to reuse instance
data when importing from sub-sheets.
There has been a fundamental change in how sheet paths are store in the
instance data. The root schematic UUID is always used when saving the
instance data. To prevent file churn, the virtual root sheet UUID is set
to the root schematic UUID when loading the project. This provides a way
to determine the project that stored the instance data. All uses of paths
without root sheet have been expunged from the code.
The sheet instance data is still saved only in the root sheet for the
time being. New sheet instances will be automatically assigned an page
number based on the incremental virtual sheet page number. Sheet page
numbers will not be imported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12472
This is mostly to output the aliases sorted (for ease of VCS integration),
but also because a btree will be faster than hashing on a small dataset.
Fixes https://gitlab.com/kicad/code/kicad/issues/11890
The commit bumps the schematic file format version in order to fix the
initial symbol default instance data to the first instance of each symbol.
It also sets the initial instance data to undefined in the SCH_SYMBOL
ctor so on the first schematic save, the default instance will be set
to the first instance of the symbol.
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
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
The tests for file existence and write status perform two file stats
which cause performance issues on slow network shares. Now the file
state is determined at load time and stored in the SCH_SCREEN object
so file access is no longer required.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9343
When swapping SCH_SYMBOL objects during undo, no special processing is
required. The SCH_PIN objects are updated when the LIB_SYMBOL objects
are swapped and the call to SCH_SCREEN::SwapSymbolLinks() didn't do
anything.