From b1948f86556ef3c5a347d4f077b6655cfd586580 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 24 Feb 2021 13:31:03 +0100 Subject: [PATCH] always setting QQuickItemPrivate::Transform when cleaning unnecessary nodes to ensure, that they will be recreatd in the next cycle --- src/controls/QskControlPrivate.cpp | 10 ---------- src/controls/QskControlPrivate.h | 3 --- src/controls/QskQuickItemPrivate.cpp | 11 +++++++++++ src/controls/QskQuickItemPrivate.h | 3 +++ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/controls/QskControlPrivate.cpp b/src/controls/QskControlPrivate.cpp index e45900d5..290e698d 100644 --- a/src/controls/QskControlPrivate.cpp +++ b/src/controls/QskControlPrivate.cpp @@ -239,16 +239,6 @@ bool QskControlPrivate::maybeGesture( QQuickItem* child, QEvent* event ) return q->gestureFilter( child, event ); } -QSGTransformNode* QskControlPrivate::createTransformNode() -{ - return Inherited::createTransformNode(); -} - -void QskControlPrivate::transformChanged() -{ - Inherited::transformChanged(); -} - bool QskControlPrivate::inheritLocale( QskControl* control, const QLocale& locale ) { auto d = static_cast< QskControlPrivate* >( QQuickItemPrivate::get( control ) ); diff --git a/src/controls/QskControlPrivate.h b/src/controls/QskControlPrivate.h index 4f012b3e..e7fdb4c0 100644 --- a/src/controls/QskControlPrivate.h +++ b/src/controls/QskControlPrivate.h @@ -23,9 +23,6 @@ class QskControlPrivate : public QskQuickItemPrivate ~QskControlPrivate() override; private: - QSGTransformNode* createTransformNode() override; - void transformChanged() override; - void setExplicitSizeHint( Qt::SizeHint, const QSizeF& ); void resetExplicitSizeHint( Qt::SizeHint ); QSizeF explicitSizeHint( Qt::SizeHint ) const; diff --git a/src/controls/QskQuickItemPrivate.cpp b/src/controls/QskQuickItemPrivate.cpp index f7dd7d8b..f17f6dfd 100644 --- a/src/controls/QskQuickItemPrivate.cpp +++ b/src/controls/QskQuickItemPrivate.cpp @@ -193,6 +193,8 @@ void QskQuickItemPrivate::cleanupNodes() // setting the dirty flags, so that nodes will be recreated // the next time we participate in a scene graph update + dirtyAttributes |= QQuickItemPrivate::Transform; + if ( !itemNodeInstance->matrix().isIdentity() ) dirtyAttributes |= QQuickItemPrivate::Position; @@ -229,3 +231,12 @@ void QskQuickItemPrivate::cleanupNodes() } } +QSGTransformNode* QskQuickItemPrivate::createTransformNode() +{ + return Inherited::createTransformNode(); +} + +void QskQuickItemPrivate::transformChanged() +{ + Inherited::transformChanged(); +} diff --git a/src/controls/QskQuickItemPrivate.h b/src/controls/QskQuickItemPrivate.h index 63cae3be..160fbf6e 100644 --- a/src/controls/QskQuickItemPrivate.h +++ b/src/controls/QskQuickItemPrivate.h @@ -29,6 +29,9 @@ class QskQuickItemPrivate : public QQuickItemPrivate virtual void implicitSizeChanged(); private: + QSGTransformNode* createTransformNode() override; + void transformChanged() override; + void cleanupNodes(); void mirrorChange() override;