Commit 0e2843f2 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

If clip resize not sticking to start/end

parent 61433717
Pipeline #11646 passed with stage
in 14 minutes and 16 seconds
......@@ -857,8 +857,8 @@ Rectangle {
if (mouse.buttons === Qt.LeftButton) {
var delta = Math.round((trimIn.x) / timeScale)
if (delta !== 0) {
if (delta < -modelStart) {
delta = -modelStart
if (maxDuration > 0 && delta < -inPoint) {
delta = -inPoint
}
var newDuration = clipDuration - delta
sizeChanged = true
......@@ -938,6 +938,9 @@ Rectangle {
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
var newDuration = Math.round((parent.x + parent.width) / timeScale)
if (maxDuration > 0 && newDuration > maxDuration - inPoint) {
newDuration = maxDuration - inPoint
}
if (newDuration != clipDuration) {
sizeChanged = true
clipRoot.trimmingOut(clipRoot, newDuration, mouse, shiftTrim, controlTrim)
......
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