QmlDesigner.formEditor: usablity fix

Displaying the bounding Rectangle  makes no sense for small/thin items.

Change-Id: Ia30692e0cfa2641cfe3b4962a2f54f9eafe50201
Reviewed-on: http://codereview.qt-project.org/4984
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marco Bubke <marco.bubke@nokia.com>
This commit is contained in:
Thomas Hartmann
2011-09-15 13:30:56 +02:00
parent 04510ee264
commit 1086e38770

View File

@@ -239,6 +239,9 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const
|| (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth))) || (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth)))
return; return;
if (boundingRect().width() < 8 || boundingRect().height() < 8)
return;
QPen pen; QPen pen;
pen.setJoinStyle(Qt::MiterJoin); pen.setJoinStyle(Qt::MiterJoin);
pen.setStyle(Qt::DotLine); pen.setStyle(Qt::DotLine);