Fix freeze and fade ins allowed to go past last frame.

Fixes #327
parent dfd33ac6
Pipeline #6474 passed with stage
in 18 minutes and 18 seconds
......@@ -115,8 +115,8 @@ void PositionEditWidget::slotRefresh()
}
}
}
m_slider->setRange(0, max - min);
m_display->setRange(0, max - min);
m_slider->setRange(0, max - min - 1);
m_display->setRange(0, max - min - 1);
if (!m_inverted && !m_model->data(m_index, AssetParameterModel::RelativePosRole).toBool()) {
val -= min;
}
......
......@@ -669,7 +669,7 @@ Rectangle {
if (mouse.buttons === Qt.LeftButton) {
var delta = Math.round(parent.x / timeScale) - startX
var duration = Math.max(0, startFadeIn + delta)
duration = Math.min(duration, clipRoot.clipDuration)
duration = Math.min(duration, clipRoot.clipDuration - 1)
if (duration != clipRoot.fadeIn) {
timeline.adjustFade(clipRoot.clipId, 'fadein', duration, -1)
// Show fade duration as time in a "bubble" help.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment