Skip to content
Commit 2d1468b2 authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

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.

CCBUG: 403692
parent 73942f3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment