[Abstract] respect ref scale

This commit is contained in:
Jan Petykiewicz 2026-03-30 21:06:51 -07:00
commit 26cc0290b9
2 changed files with 25 additions and 0 deletions

View file

@ -157,6 +157,8 @@ class Abstract(PortList, Mirrorable):
self.mirror()
self.rotate_ports(ref.rotation)
self.rotate_port_offsets(ref.rotation)
if ref.scale != 1:
self.scale_by(ref.scale)
self.translate_ports(ref.offset)
return self
@ -174,6 +176,8 @@ class Abstract(PortList, Mirrorable):
# TODO test undo_ref_transform
"""
self.translate_ports(-ref.offset)
if ref.scale != 1:
self.scale_by(1 / ref.scale)
self.rotate_port_offsets(-ref.rotation)
self.rotate_ports(-ref.rotation)
if ref.mirrored: