Commit c35f7bbf authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Check the bounding rect before drawing the rectangle.

Done with: Thomas
parent bafe4468
......@@ -228,7 +228,10 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
painter->setPen(pen);
// 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 *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment