aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickstackview_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/qquickstackview_p.cpp')
-rw-r--r--src/templates/qquickstackview_p.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/templates/qquickstackview_p.cpp b/src/templates/qquickstackview_p.cpp
index 92bfcbf4..06c605d2 100644
--- a/src/templates/qquickstackview_p.cpp
+++ b/src/templates/qquickstackview_p.cpp
@@ -69,7 +69,7 @@ private:
};
QQuickStackElement::QQuickStackElement() : QQuickItemViewTransitionableItem(Q_NULLPTR),
- index(-1), init(false), removal(false), ownItem(false), ownComponent(false),
+ index(-1), init(false), removal(false), ownItem(false), ownComponent(false), widthValid(false), heightValid(false),
context(Q_NULLPTR), component(Q_NULLPTR), incubator(Q_NULLPTR), view(Q_NULLPTR),
status(QQuickStackView::Inactive)
{
@@ -162,14 +162,10 @@ void QQuickStackElement::initialize()
return;
QQuickItemPrivate *p = QQuickItemPrivate::get(item);
- if (!p->widthValid) {
+ if (!(widthValid = p->widthValid))
item->setWidth(view->width());
- p->widthValid = false;
- }
- if (!p->heightValid) {
+ if (!(heightValid = p->heightValid))
item->setHeight(view->height());
- p->heightValid = false;
- }
item->setParentItem(view);
p->addItemChangeListener(this, QQuickItemPrivate::Destroyed);