[PortPather] add rename_to and rename_from
This commit is contained in:
parent
90b3157b00
commit
334bcade31
@ -527,3 +527,11 @@ class PortPather:
|
|||||||
def set_rotation(self, rotation: float | None) -> Self:
|
def set_rotation(self, rotation: float | None) -> Self:
|
||||||
self.pather[self.port].set_rotation(rotation)
|
self.pather[self.port].set_rotation(rotation)
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def rename_to(self, new_name: str) -> Self:
|
||||||
|
self.pather.rename_ports({self.port: new_name})
|
||||||
|
return self
|
||||||
|
|
||||||
|
def rename_from(self, old_name: str) -> Self:
|
||||||
|
self.pather.rename_ports({old_name: self.port})
|
||||||
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user