forked from qt-creator/qt-creator
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 <thomas.hartmann@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user