diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-12-16 16:34:34 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-12-16 16:57:29 +0000 |
commit | 9a65b10e827b9bb09911feb9bd06ed10312463fc (patch) | |
tree | 722c817efff54946d77d12e0572441525aca7aac /src/templates/qquickstackview_p.cpp | |
parent | 235bcc4bc6a24e5e0b79359e76ef28fb5b77f62b (diff) |
Fix StackView resizing
Change-Id: Ib09996a9f12b669ae10fb7197f1e5b443540f7b0
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/templates/qquickstackview_p.cpp')
-rw-r--r-- | src/templates/qquickstackview_p.cpp | 10 |
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); |