Skip to content

Commit

Permalink
Fixt the KiCad's python API changes in 7.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MitjaNemec committed May 17, 2023
1 parent d859cc4 commit 4641c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions save_restore_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def replicate_tracks(self, src_anchor_fp, src_tracks, dst_anchor_fp, net_pairs,
to_net_item = net_dict[to_net_name]

# make a duplicate, move it, rotate it, select proper net and add it to the board
new_track = track.Duplicate()
new_track = track.Duplicate().Cast()
new_track.SetNetCode(to_net_code, True)
new_track.SetNet(to_net_item)
new_track.Move(move_vector)
Expand Down Expand Up @@ -1163,7 +1163,7 @@ def replicate_zones(self, src_anchor_fp, src_zones, dst_anchor_fp, net_pairs, la
to_net_item = net_dict[to_net_name]

# make a duplicate, move it, rotate it, select proper net and add it to the board
new_zone = zone.Duplicate()
new_zone = zone.Duplicate().Cast()
new_zone.Move(move_vector)
new_zone.SetNetCode(to_net_code, True)
new_zone.SetNet(to_net_item)
Expand Down Expand Up @@ -1198,7 +1198,7 @@ def replicate_text(self, src_anchor_fp, src_text, dst_anchor_fp, layout_group):
for text_index in range(nr_text):
text = src_text[text_index]

new_text = text.Duplicate()
new_text = text.Duplicate().Cast()
new_text.Move(move_vector)
if src_anchor_fp.fp.IsFlipped() != dst_anchor_fp.fp.IsFlipped():
new_text.Flip(dst_anchor_fp_position, False)
Expand Down Expand Up @@ -1233,7 +1233,7 @@ def replicate_drawings(self, src_anchor_fp, src_drawings, dst_anchor_fp, layout_
for dw_index in range(nr_drawings):
drawing = src_drawings[dw_index]

new_drawing = drawing.Duplicate()
new_drawing = drawing.Duplicate().Cast()
new_drawing.Move(move_vector)

if src_anchor_fp.fp.IsFlipped() != dst_anchor_fp.fp.IsFlipped():
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.7
2.0.8

0 comments on commit 4641c27

Please sign in to comment.