Skip to content

Commit

Permalink
Add call to Cast when invoking Duplicate method to solve the 7.0.2 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MitjaNemec committed May 17, 2023
1 parent 691625b commit ae0a87c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions replicate_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ def replicate_tracks(self):
#to_net_item = self.netdict.GetNetItem(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)
#new_track.SetNet(to_net_item)
new_track.Move(move_vector)
Expand Down Expand Up @@ -1024,7 +1024,7 @@ def replicate_zones(self):
#to_net_item = self.netdict.GetNetItem(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)
#new_zone.SetNet(to_net_item)
Expand Down Expand Up @@ -1066,7 +1066,7 @@ def replicate_text(self):
progress = progress + (1 / nr_sheets) * (1 / nr_text)
self.update_progress(self.stage, progress, None)

new_text = text.Duplicate()
new_text = text.Duplicate(.Cast()
new_text.Move(move_vector)
if self.src_anchor_fp.fp.IsFlipped() != dst_anchor_fp.fp.IsFlipped():
new_text.Flip(dst_anchor_fp_position, False)
Expand Down Expand Up @@ -1105,7 +1105,7 @@ def replicate_drawings(self):
progress = progress + (1 / nr_sheets) * (1 / nr_drawings)
self.update_progress(self.stage, progress, None)

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

if self.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.11
2.0.12

0 comments on commit ae0a87c

Please sign in to comment.