Commit e5e3c24e authored by Marco Bubke's avatar Marco Bubke
Browse files

Change formeditor bounding rect painting

parent 285cc418
......@@ -198,7 +198,8 @@ FormEditorItem* FormEditorItem::fromQGraphicsItem(QGraphicsItem *graphicsItem)
void FormEditorItem::paintBoundingRect(QPainter *painter) const
{
if (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth))
if (!boundingRect().isValid()
|| (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth)))
return;
QPen pen;
......@@ -234,9 +235,7 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
painter->setPen(pen);
// int offset = m_borderWidth / 2;
const QRectF br = boundingRect();
if (br.isValid())
painter->drawRect(br.adjusted(0., 0., -1., -1.));
painter->drawRect(boundingRect().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