Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0 RC2
-
cc49e68bdf (qt/qtdeclarative/dev) cc49e68bdf (qt/tqtc-qtdeclarative/dev) 684645ea52 (qt/qtdeclarative/6.3) 684645ea52 (qt/tqtc-qtdeclarative/6.3) 684645ea52 (qt/tqtc-qtdeclarative/6.3.1)
Description
Attached application has infinite loops and when it is on the last frame of the animation, it seems to start the next run and reads the current 'from' value from the item and starts another loop from that value of the last frame to the actual end. This causes it to slow down more and more until it eventually gets to from==to and stops.
It probably doesn't make any sense have loops > 1 without setting 'from', but I don't think the behavior with the last frame of the animation should slow down.
At least some error/warning could be printed that this doesn't make sense, and/or just have the same behavior as loops==1.
import QtQuick 2.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 NumberAnimation { // from: 90 to: from+360 // loops: Animation.Infinite target: rect properties: "rotation" running: true duration: 1000 } Rectangle { id: rect width: 300 height: 10 color: "red" anchors.centerIn: parent transformOrigin: Item.Center onRotationChanged: console.log("rotation changed to", rotation) } }