aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/designer
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-04-21 14:32:30 +0200
committerRobin Burchell <robin.burchell@crimson.no>2017-04-22 10:05:39 +0000
commita9f6abde4ad71bf013ba465dd9171e9c445aae13 (patch)
tree841d713f6dc689040d303bb3a865eee48de57039 /src/quick/designer
parentb94be73b551b31473e4239ae1d77c6e21ffbc849 (diff)
QQuickDesignerSupport: Port away from boundingRect
This is undocumented and internal, as well as being virtual. It is usually (but not always) at a 0,0 position too, so I suspect that for the few items like text that aren't, this may have been incorrect. Change-Id: I948eceb5df052fdd137b37e211c244036b74299f Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Diffstat (limited to 'src/quick/designer')
-rw-r--r--src/quick/designer/qquickdesignersupport.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp
index 749ece8221..88971e3172 100644
--- a/src/quick/designer/qquickdesignersupport.cpp
+++ b/src/quick/designer/qquickdesignersupport.cpp
@@ -90,10 +90,11 @@ void QQuickDesignerSupport::refFromEffectItem(QQuickItem *referencedItem, bool h
QSGRenderContext *rc = QQuickWindowPrivate::get(referencedItem->window())->context;
QSGLayer *texture = rc->sceneGraphContext()->createLayer(rc);
+ QSizeF itemSize = referencedItem->size();
texture->setLive(true);
texture->setItem(QQuickItemPrivate::get(referencedItem)->rootNode());
- texture->setRect(referencedItem->boundingRect());
- texture->setSize(referencedItem->boundingRect().size().toSize());
+ texture->setRect(QRectF(QPointF(0, 0), itemSize));
+ texture->setSize(itemSize.toSize());
texture->setRecursive(true);
#if QT_CONFIG(opengl)
#ifndef QT_OPENGL_ES