forked from qt-creator/qt-creator
Check the bounding rect before drawing the rectangle.
Done with: Thomas
This commit is contained in:
@@ -228,7 +228,10 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
|
|||||||
|
|
||||||
painter->setPen(pen);
|
painter->setPen(pen);
|
||||||
// int offset = m_borderWidth / 2;
|
// int offset = m_borderWidth / 2;
|
||||||
painter->drawRect(boundingRect().adjusted(0., 0., -1., -1.));
|
|
||||||
|
const QRectF br = boundingRect();
|
||||||
|
if (br.isValid())
|
||||||
|
painter->drawRect(br.adjusted(0., 0., -1., -1.));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
|
void FormEditorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
|
||||||
|
|||||||
Reference in New Issue
Block a user