diff options
Diffstat (limited to 'src/items/database/databaserelationship.cpp')
-rw-r--r-- | src/items/database/databaserelationship.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/items/database/databaserelationship.cpp b/src/items/database/databaserelationship.cpp index d908409..6efe07b 100644 --- a/src/items/database/databaserelationship.cpp +++ b/src/items/database/databaserelationship.cpp @@ -329,17 +329,17 @@ DatabaseRelationship::updateLayout() Q_ASSERT(haveLine); - // "Relational" - if (1) { - d->fillEnds = true; - d->targetEnd = d->arrowHeadPath(); - d->sourceEnd = QPainterPath(); - } - // "Crow's Foot" - else { - d->fillEnds = false; - d->targetEnd = d->crowsFootPath(d->cardinality); - d->sourceEnd = d->crowsFootPath(isRequired() ? One : ZeroOrOne); + switch (document()->notation()) { + case DiagramDocument::Relational: + d->fillEnds = true; + d->targetEnd = d->arrowHeadPath(); + d->sourceEnd = QPainterPath(); + break; + case DiagramDocument::CrowsFoot: + d->fillEnds = false; + d->targetEnd = d->crowsFootPath(d->cardinality); + d->sourceEnd = d->crowsFootPath(isRequired() ? One : ZeroOrOne); + break; } if (!d->sourceEnd.isEmpty()) { |