From 05d53c1454bef1e5d3e6aeb46265ae0e219cc90d Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 23 Sep 2019 16:22:24 +0300 Subject: [PATCH] Correct playhead position after releasing out of range When dragging the playhead and releasing it out of the range of the timeline, the playhead took wrong position. This happens if the timeline does not start at frame 0. The value of timeline.startKeyframe() is already taken into account by mapFromFrameToScene() in setPosition(). Therefore the offset was added twice. Task-number: QDS-1074 Change-Id: I72ec13176af473ac9851580e2367117f98ddfc65 Reviewed-by: Thomas Hartmann Reviewed-by: Miikka Heikkinen --- .../components/timelineeditor/timelinegraphicsscene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp index 7baa6d4dd47..a5f61108122 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinegraphicsscene.cpp @@ -187,7 +187,7 @@ void TimelineGraphicsScene::setCurrentFrame(int frame) if (timeline.isValid()) { timeline.modelNode().setAuxiliaryData("currentFrame@NodeInstance", frame); - m_currentFrameIndicator->setPosition(frame + timeline.startKeyframe()); + m_currentFrameIndicator->setPosition(frame); } else { m_currentFrameIndicator->setPosition(0); }