diff options
Diffstat (limited to 'src/runtime/Qt3DSQmlEngine.cpp')
-rw-r--r-- | src/runtime/Qt3DSQmlEngine.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/runtime/Qt3DSQmlEngine.cpp b/src/runtime/Qt3DSQmlEngine.cpp index 2c44b7d..0988880 100644 --- a/src/runtime/Qt3DSQmlEngine.cpp +++ b/src/runtime/Qt3DSQmlEngine.cpp @@ -794,15 +794,9 @@ void CQmlEngineImpl::SetDataInputValue( case ATTRIBUTETYPE_DATAINPUT_TIMELINE: { // Quietly ignore other than number type data inputs when adjusting timeline if (diDef.type == qt3ds::runtime::DataInOutTypeRangedNumber) { - TTimeUnit endTime = 0; - TElement *element = getTarget(ctrlElem.elementPath.constData()); - TComponent *component = static_cast<TComponent *>(element); - endTime = component->GetTimePolicy().GetLoopingDuration(); - - // Normalize the value to dataInput range - qreal newTime = qreal(endTime) * (qreal(value.toFloat() - diDef.min) + qreal newTime = (qreal(value.toFloat() - diDef.min) / qreal(diDef.max - diDef.min)); - GotoTime(ctrlElem.elementPath.constData(), float(newTime / 1000.0)); + GotoTime(ctrlElem.elementPath.constData(), float(newTime)); } break; } |