Bug 414520

Summary: No control points are created for association lines in 'spline' layout default mode
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.29.3 (KDE Applications 19.08.3)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 2.29.90 (KDE Applications 19.11.90)
Bug Depends on:    
Bug Blocks: 414511    

Description Ralf Habacker 2019-11-26 09:29:20 UTC
SUMMARY


STEPS TO REPRODUCE
1. start umbrello
2. open settings dialog
3. set "Create new association lines as" to 'Spline'
4. Press okay
5. Add two classes and connect with an association
6. Select association

OBSERVED RESULT
There are no control points to change line curve

EXPECTED RESULT
There should be control points to change the line curve

SOFTWARE/OS VERSIONS
Linux: openSUSE_Leap 15.1
KDE Frameworks Version: irrelevant
Qt Version: irrelevant
Comment 1 Ralf Habacker 2019-11-26 09:39:50 UTC
Git commit 3c5ac30a5c8ebf74d48135f9f25b42cc5a1e44e0 by Ralf Habacker.
Committed on 26/11/2019 at 09:30.
Pushed by habacker into branch 'release/19.12'.

Fix 'No control points are created for association lines in "spline" layout default mode'

BUG:414520
FIXED-IN:2.29.90 (KDE Applications 19.11.90)

M  +2    -2    umbrello/umlwidgets/associationline.cpp

https://invent.kde.org/kde/umbrello/commit/3c5ac30a5c8ebf74d48135f9f25b42cc5a1e44e0

diff --git a/umbrello/umlwidgets/associationline.cpp b/umbrello/umlwidgets/associationline.cpp
index cfbb0b43c..fa6996435 100644
--- a/umbrello/umlwidgets/associationline.cpp
+++ b/umbrello/umlwidgets/associationline.cpp
@@ -55,8 +55,6 @@ AssociationLine::AssociationLine(AssociationWidget *association)
     setFlag(QGraphicsLineItem::ItemIsSelectable);
     setAcceptHoverEvents(true);
     setZValue(3);
-    //setLayout(Uml::LayoutType::Spline);
-    //createSplinePoints();
 }
 
 /**
@@ -508,6 +506,8 @@ void AssociationLine::calculateInitialEndPoints()
     } else if (!m_associationWidget->isSelf() && count() < 2) {
         setEndPoints(QPointF(), QPointF());
     }
+    if (m_layout == Uml::LayoutType::Spline)
+        createSplinePoints();
 }
 
 /**