[Fixed] Sch v6 sub-sheet issues

- When saving a sub-sheet that was edited as a standalone sheet
- In this case we have symbo instances, but they weren't
  processed, so we can't look for filter modifications.

Closes #307
This commit is contained in:
Salvador E. Tropea 2022-09-29 13:45:00 -03:00
parent 1d0c2307c5
commit 193632ff65
2 changed files with 8 additions and 5 deletions

View File

@ -53,6 +53,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(#289 #290)
- KiCad 5 "assert "lower <= upper" failed in Clamp()" (#304)
- Missing XYRS information for components with multiple units (#306)
- Schematic v6: Problems when creating a variant of a sub-sheet that was edited
as a standalone sheet (#307)
### Changed
- Diff:

View File

@ -1733,11 +1733,12 @@ class SchematicV6(Schematic):
_add_items_list('sheet_instances', self.sheet_instances, sch)
# Symbol instances
# Copy potentially modified data from components
for s in self.symbol_instances:
comp = s.component
s.reference = comp.ref
s.value = comp.value
s.footprint = comp.footprint_lib+':'+comp.footprint if comp.footprint_lib else comp.footprint
if base_sheet == self:
for s in self.symbol_instances:
comp = s.component
s.reference = comp.ref
s.value = comp.value
s.footprint = comp.footprint_lib+':'+comp.footprint if comp.footprint_lib else comp.footprint
_add_items_list('symbol_instances', self.symbol_instances, sch)
logger.debug('Saving schematic: `{}`'.format(fname))
# Keep a back-up of existing files