always accept transitions for items without QQuickItem::ItemHasContents

This commit is contained in:
Uwe Rathmann 2023-10-16 19:19:38 +02:00
parent 7cf88e7b45
commit 3b5e6aa0fd

View File

@ -1259,14 +1259,20 @@ bool QskSkinnable::isTransitionAccepted( QskAspect aspect ) const
{ {
Q_UNUSED( aspect ) Q_UNUSED( aspect )
if ( auto control = qskControlCast( owningItem() ) )
{
/* /*
Usually we only need smooth transitions, when state changes Usually we only need smooth transitions, when state changes
happen while the skinnable is visible. There are few exceptions happen while the skinnable is visible. There are few exceptions
like QskPopup::Closed, that is used to slide/fade in. like QskPopup::Closed, that is used to slide/fade in.
*/ */
if ( auto control = qskControlCast( owningItem() ) )
if ( control->flags() & QQuickItem::ItemHasContents )
return control->isInitiallyPainted(); return control->isInitiallyPainted();
return true;
}
return false; return false;
} }