always setting QQuickItemPrivate::Transform when cleaning unnecessary nodes to

ensure, that they will be recreatd in the next cycle
This commit is contained in:
Uwe Rathmann 2021-02-24 13:31:03 +01:00
parent b1ba6d1369
commit b1948f8655
4 changed files with 14 additions and 13 deletions

View File

@ -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 ) );

View File

@ -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;

View File

@ -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();
}

View File

@ -29,6 +29,9 @@ class QskQuickItemPrivate : public QQuickItemPrivate
virtual void implicitSizeChanged();
private:
QSGTransformNode* createTransformNode() override;
void transformChanged() override;
void cleanupNodes();
void mirrorChange() override;