aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp')
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
index 5f877b53c0..e882df9363 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
+++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
@@ -338,7 +338,10 @@ void FormEditorItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *,
if (isInStackedContainer)
showPlaceHolder = qmlItemNode().instanceIsRenderPixmapNull() && isContentVisible();
- painter->setClipRegion(boundingRect().toRect());
+ QRegion clipRegion = painter->clipRegion();
+ if (clipRegion.contains(m_selectionBoundingRect.toRect().topLeft())
+ && clipRegion.contains(m_selectionBoundingRect.toRect().bottomRight()))
+ painter->setClipRegion(boundingRect().toRect());
painter->setClipping(true);
if (!hideCompletely) {