Skip to content

Commit

Permalink
Merge pull request #364 from gaphor/sourcery/part-connector
Browse files Browse the repository at this point in the history
Part connector (Sourcery refactored)
  • Loading branch information
amolenaar committed Jul 20, 2020
2 parents de82f14 + 896884c commit 61cd9ce
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions gaphor/SysML/blocks/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,8 @@ def connect_subject(self, handle):

c1 = self.get_connected(line.head)
c2 = self.get_connected(line.tail)
if c1 and c2:

if not line.subject:
assert isinstance(c1.subject, UML.ConnectableElement)
assert isinstance(c2.subject, UML.ConnectableElement)
relation = UML.model.create_connector(c1.subject, c2.subject)
line.subject = relation
if c1 and c2 and not line.subject:
assert isinstance(c1.subject, UML.ConnectableElement)
assert isinstance(c2.subject, UML.ConnectableElement)
relation = UML.model.create_connector(c1.subject, c2.subject)
line.subject = relation

0 comments on commit 61cd9ce

Please sign in to comment.