From 1086e387702980af6b7de4aed26b0d27626b01ad Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Thu, 15 Sep 2011 13:30:56 +0200 Subject: [PATCH] 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> --- .../qmldesigner/components/formeditor/formeditoritem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index bc687ac3a21..946b96c0898 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -239,6 +239,9 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const || (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth))) return; + if (boundingRect().width() < 8 || boundingRect().height() < 8) + return; + QPen pen; pen.setJoinStyle(Qt::MiterJoin); pen.setStyle(Qt::DotLine); -- GitLab