[umbrello] [Bug 403692] Associations connected to the component port do not move when moving the component
Oliver Kellogg
bugzilla_noreply at kde.org
Fri Jan 8 21:00:19 GMT 2021
https://bugs.kde.org/show_bug.cgi?id=403692
--- Comment #3 from Oliver Kellogg <okellogg at users.sourceforge.net> ---
Git commit 2d1468b2940032e8eae83fcc7b7a122e184fd28c by Oliver Kellogg.
Committed on 08/01/2021 at 21:00.
Pushed by okellogg into branch 'master'.
Fix misplacement of startpoint on associationline originating at port:
umbrello/umlwidgets/umlwidget.{h,cpp}
- Add virtual functions getX / getY returning qreal and getPos returning
QPointF. Default implementation calls QGraphicsObjectWrapper
functions x() / y() / pos().
umbrello/umlwidgets/pinportbase.{h,cpp}
- Reimplement virtual functions getX / getY and getPos.
They call the respective function of UMLWidget but add the respective
component of parentItem() (i.e. x(), y(), pos() resp.)
Reason: PinPortBase coordinates are relative to their ComponentWidget.
umbrello/toolbarstateassociation.cpp
- In function setSecondWidget, after creating the AssociationWidget
check whether widgetA is a PortWidget. If it is then
- store widgetA->getPos() to local variable lineStart;
- set the startpoint of the association line to lineStart.
umbrello/umlwidgets/associationwidget.cpp
- Use new UMLWidget functions getX / getY / getPos in all code that is
related to association line calculation and update:
Function calculateEndingPoints, doUpdates, updateRegionLineCount.
M +6 -1 umbrello/toolbarstateassociation.cpp
M +11 -11 umbrello/umlwidgets/associationwidget.cpp
M +16 -1 umbrello/umlwidgets/pinportbase.cpp
M +5 -1 umbrello/umlwidgets/pinportbase.h
M +34 -1 umbrello/umlwidgets/umlwidget.cpp
M +3 -0 umbrello/umlwidgets/umlwidget.h
https://invent.kde.org/sdk/umbrello/commit/2d1468b2940032e8eae83fcc7b7a122e184fd28c
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the umbrello-devel
mailing list