[Schematic v6][Fixed] bitmap scale and lib_name not saved

Fixes #451
This commit is contained in:
Salvador E. Tropea 2023-06-15 08:15:02 -03:00
parent 0fa7b92039
commit 16a265f633
2 changed files with 8 additions and 1 deletions

View File

@ -85,6 +85,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- KiCad v6/7 schematic:
- Net Class Flags not saved in variants or annotated schematics
- Repeated UUIDs saved in variants
- Bitmap scale not saved in variants or annotated schematics
- `lib_name` attribute not saved in variants or annotated schematics
- Position:
- Components marked as "Exclude from position files" not excluded when only
SMD components are selected. (See #429)

View File

@ -1183,6 +1183,8 @@ class SchematicComponentV6(SchematicComponent):
lib_id = CROSSED_LIB+':'+(self.local_name if self.local_name else self.name)
data = [_symbol('lib_id', [lib_id]),
_symbol('at', [self.x, self.y, self.ang])]
if self.local_name is not None:
data.insert(0, _symbol('lib_name', [self.local_name]))
if self.mirror:
data.append(_symbol('mirror', [Symbol(self.mirror)]))
if self.unit_specified:
@ -1367,7 +1369,10 @@ class SchematicBitmapV6(object):
for v in self.data:
d.append(Symbol(v))
d.append(Sep())
data = [_symbol('at', [self.pos_x, self.pos_y]), Sep()]
data = [_symbol('at', [self.pos_x, self.pos_y])]
if self.scale is not None:
data.append(_symbol('scale', [self.scale]))
data.append(Sep())
add_uuid(data, self.uuid)
data.extend([_symbol('data', [Sep()] + d), Sep()])
return _symbol('image', data)