aspect resolving of animated values fixed ( placement/section bits )

This commit is contained in:
Uwe Rathmann 2022-07-17 15:59:53 +02:00
parent e6fb38d383
commit 0a6ed7deb1
1 changed files with 41 additions and 2 deletions

View File

@ -904,7 +904,36 @@ QVariant QskSkinnable::animatedValue(
But that might change ...
*/
auto a = aspect;
Q_FOREVER
{
v = m_data->animators.currentValue( aspect );
if ( !v.isValid() )
{
if ( aspect.placement() )
{
// clear the placement bits and restart
aspect = a;
aspect.setPlacement( QskAspect::NoPlacement );
continue;
}
}
if ( aspect.section() != QskAspect::Body )
{
// try to resolve from QskAspect::Body
a.setSection( QskAspect::Body );
aspect = a;
continue;
}
break;
}
}
if ( !v.isValid() )
@ -923,7 +952,7 @@ QVariant QskSkinnable::animatedValue(
if ( !aspect.hasStates() )
aspect.setStates( skinStates() );
const auto a = aspect;
auto a = aspect;
Q_FOREVER
{
@ -947,6 +976,16 @@ QVariant QskSkinnable::animatedValue(
}
}
if ( aspect.section() != QskAspect::Body )
{
// try to resolve from QskAspect::Body
a.setSection( QskAspect::Body );
aspect = a;
continue;
}
break;
}
}