Skip to content

Commit

Permalink
fix: Don't draw port labels twice
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn authored and Wuestengecko committed Sep 17, 2024
1 parent 90e2b8d commit 93f09ce
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions capellambse/svg/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,18 +555,20 @@ def _draw_symbol(
labels=floating_labels_,
id_=id_,
)
else:
gcls = "".join(f" context-{i}" for i in context_)
grp = self.__drawing.g(class_=f"Box {class_}{gcls}", id_=id_)
grp.add(
self.__drawing.use(
href=f"#{class_}Symbol",
insert=pos,
size=size,
class_=class_,
**obj_style._to_dict(),
)
self.__drawing.add(grp)
return

gcls = "".join(f" context-{i}" for i in context_)
grp = self.__drawing.g(class_=f"Box {class_}{gcls}", id_=id_)
grp.add(
self.__drawing.use(
href=f"#{class_}Symbol",
insert=pos,
size=size,
class_=class_,
**obj_style._to_dict(),
)
)

self.__drawing.add(grp)
if floating_labels_:
Expand Down

0 comments on commit 93f09ce

Please sign in to comment.