Skip to content

Commit

Permalink
Merge pull request #13 from unihd-cag/iss12
Browse files Browse the repository at this point in the history
Added _promote_to_rod private method to fix iss12
  • Loading branch information
nielsbuwen authored Jan 13, 2020
2 parents 3448144 + 88a017c commit e3424e2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion rodlayout/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,22 @@ def valid(self) -> bool:
"""
return cast(bool, current_workspace.db.valid_p(self.db))

def _promote_children_to_rod(self, fig_grp: RemoteObject) -> None:
for fig in fig_grp.figs:
if fig.obj_type == 'figGroup':
self._promote_children_to_rod(cast(RemoteObject, fig))
else:
current_workspace.rod.name_shape(shape_id=fig)

def _copy_figure(
self, cell_view: RemoteObject, translate: Point, transform: Transform
) -> RemoteObject:
translate_transform = cast(SkillTuple, (translate, transform))

translate_transform = cast(SkillTuple, (translate, transform.value))
db = current_workspace.db.copy_fig(self.db, cell_view, translate_transform)

self._promote_children_to_rod(cast(RemoteObject, db))

return cast(RemoteObject, db)

def copy(
Expand Down

0 comments on commit e3424e2

Please sign in to comment.