diff --git a/src/kicad/common.ts b/src/kicad/common.ts index d888f5e7..89842a11 100644 --- a/src/kicad/common.ts +++ b/src/kicad/common.ts @@ -88,6 +88,14 @@ export class At { this.unlocked = parsed.unlocked ?? this.unlocked; } } + + copy() { + const at = new At(); + at.position = this.position.copy(); + at.rotation = this.rotation; + at.unlocked = this.unlocked; + return at; + } } export const PaperSize = { diff --git a/src/viewers/schematic/painter.ts b/src/viewers/schematic/painter.ts index c3d2be62..47672a1e 100644 --- a/src/viewers/schematic/painter.ts +++ b/src/viewers/schematic/painter.ts @@ -551,7 +551,7 @@ class SchematicSheetPainter extends SchematicItemPainter { if (layer.name == LayerNames.label) { for (const pin of ss.pins) { const label = new schematic_items.HierarchicalLabel(); - label.at = pin.at; + label.at = pin.at.copy(); label.effects = pin.effects; label.text = pin.name; label.shape = pin.shape;