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
Loading
Please register or sign in to comment