forked from qt-creator/qt-creator
modeleditor: Fix intersection of relation with component
Change-Id: Ib0a999e56f98bc2a4483583a322e107560c17dc0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -177,10 +177,14 @@ bool ComponentItem::intersectShapeWithLine(const QLineF &line, QPointF *intersec
|
||||
<< rect.topRight()
|
||||
<< rect.bottomRight()
|
||||
<< rect.bottomLeft()
|
||||
<< rect.bottomLeft() + QPointF(0, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE + RECT_HEIGHT)
|
||||
<< rect.bottomLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE + RECT_HEIGHT)
|
||||
<< rect.bottomLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y)
|
||||
<< rect.bottomLeft() + QPointF(0, UPPER_RECT_Y)
|
||||
<< rect.topLeft() + QPointF(0, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE + RECT_HEIGHT)
|
||||
<< rect.topLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE + RECT_HEIGHT)
|
||||
<< rect.topLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE)
|
||||
<< rect.topLeft() + QPointF(0, UPPER_RECT_Y + RECT_HEIGHT + RECT_Y_DISTANCE)
|
||||
<< rect.topLeft() + QPointF(0, UPPER_RECT_Y + RECT_HEIGHT)
|
||||
<< rect.topLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y + RECT_HEIGHT)
|
||||
<< rect.topLeft() + QPointF(-RECT_WIDTH * 0.5, UPPER_RECT_Y)
|
||||
<< rect.topLeft() + QPointF(0, UPPER_RECT_Y)
|
||||
<< rect.topLeft();
|
||||
}
|
||||
return GeometryUtilities::intersect(polygon, line, intersectionPoint, intersectionLine);
|
||||
|
Reference in New Issue
Block a user