File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,8 @@ bool LinkItem::hasPins(PinItem *_pinA, PinItem *_pinB)
141
141
142
142
void LinkItem::paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
143
143
{
144
- Q_UNUSED (option);
145
- Q_UNUSED (widget);
144
+ Q_UNUSED (option)
145
+ Q_UNUSED (widget)
146
146
147
147
if (m_pinA != nullptr || m_pinB != nullptr )
148
148
{
@@ -192,9 +192,8 @@ QPainterPath LinkItem::getLinePath() const
192
192
}
193
193
qreal secondPointSign = -firstPointSign;
194
194
195
- qreal minDist = 200.0 ;
196
195
qreal alpha = 0.6 ;
197
- qreal dist = qMax (abs (firstPoint.x () - secondPoint.x ()), minDist );
196
+ qreal dist = qMax (abs (firstPoint.x () - secondPoint.x ()), abs (firstPoint. y () - secondPoint. y ()) );
198
197
QPointF ctrlPoint1 (firstPoint.x () + firstPointSign * dist * alpha, firstPoint.y ());
199
198
QPointF ctrlPoint2 (secondPoint.x () + secondPointSign * dist * alpha, secondPoint.y ());
200
199
You can’t perform that action at this time.
0 commit comments