Bug 373308

Summary: Connection between activity and pin does not end on pin
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal CC: okellogg
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 2.21.80 (KDE Applications 17.03.80)

Description Ralf Habacker 2016-12-05 19:26:20 UTC
After connecting a pin with an activity the association is not drawn between the pin and the activity. It ends in empty diagram space.

How to reproduce:
1. Add an activity diagram
2. Add two activities
3. Add a pin to the first activity 
4. Connect the pin with the second activity

The association does not connect the pin with the activity.

Same with ports and components.

The bug seems to be introduced with fixing of bug 371990 (commit 536e52fe6f71145cdcee16b5833f1c73b64e61fa)
Comment 1 Ralf Habacker 2016-12-06 16:39:37 UTC
My initial estimation of the related commit was wrong. Retesting on another machine shows that this happens on git master branch. The related commit is
703b25a024380dcb81895c9700c3a8d4d72cfb74 which adds pin and ports as QGraphicsItem child to the component or activity widget. My guess of the root cause is that fetching the position of the child widget with pos() returns the position relativ to the parent item. So fix this on the related locations it is required to use QGraphicsItem::scenePos() instead for example instead widget->x() it is required to use widget->scenePos().x()
Comment 2 Ralf Habacker 2016-12-06 17:15:51 UTC
Git commit 95a1547793bba6519ca7f277ccc1d218f8d871d5 by Ralf Habacker.
Committed on 06/12/2016 at 17:15.
Pushed by habacker into branch 'master'.

Fix 'Connection between activity and pin does not ends on pin'.

FIXED-IN:2.21.80 (KDE Applications 17.03.80)

M  +2    -2    umbrello/toolbarstateassociation.cpp
M  +6    -6    umbrello/umlwidgets/associationwidget.cpp

https://commits.kde.org/umbrello/95a1547793bba6519ca7f277ccc1d218f8d871d5