Commit 9e4d9f5e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Don't allow undo when resizing clip/composition (fixes crash)

parent 6d2d09cc
......@@ -414,6 +414,7 @@ Rectangle {
property bool sizeChanged: false
cursorShape: (containsMouse ? Qt.SizeHorCursor : Qt.ClosedHandCursor)
onPressed: {
root.trimInProgress = true;
previousMix = clipRoot.mixDuration
root.autoScrolling = false
mixOut.color = 'red'
......@@ -432,6 +433,7 @@ Rectangle {
mixBackground.anchors.bottom = mixContainer.bottom
mixOut.color = clipRoot.border.color
mixCutPos.anchors.right = mixCutPos.parent.right
root.trimInProgress = false;
}
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
......@@ -547,6 +549,7 @@ Rectangle {
cursorShape: (enabled && (containsMouse || pressed) ? Qt.SizeHorCursor : Qt.OpenHandCursor)
onPressed: {
root.autoScrolling = false
root.trimInProgress = true;
clipRoot.originalX = clipRoot.x
clipRoot.originalDuration = clipDuration
shiftTrim = mouse.modifiers & Qt.ShiftModifier
......@@ -576,6 +579,7 @@ Rectangle {
}
root.groupTrimData = undefined
}
root.trimInProgress = false;
}
onDoubleClicked: {
timeline.mixClip(clipRoot.clipId, -1)
......@@ -675,6 +679,7 @@ Rectangle {
onPressed: {
root.autoScrolling = false
root.trimInProgress = true;
clipRoot.originalDuration = clipDuration
anchors.right = undefined
shiftTrim = mouse.modifiers & Qt.ShiftModifier
......@@ -705,6 +710,7 @@ Rectangle {
}
root.groupTrimData = undefined
}
root.trimInProgress = false;
}
onDoubleClicked: {
timeline.mixClip(clipRoot.clipId, 1)
......
......@@ -256,6 +256,7 @@ Item {
drag.smoothed: false
onPressed: {
root.autoScrolling = false
root.trimInProgress = true;
compositionRoot.originalX = compositionRoot.x
compositionRoot.originalDuration = clipDuration
anchors.left = undefined
......@@ -267,6 +268,7 @@ Item {
compositionRoot.trimmedIn(compositionRoot)
trimIn.opacity = 0
updateDrag()
root.trimInProgress = false;
}
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
......@@ -322,6 +324,7 @@ Item {
onPressed: {
root.autoScrolling = false
root.trimInProgress = true;
compositionRoot.originalDuration = clipDuration
anchors.right = undefined
trimOut.opacity = 0
......@@ -331,6 +334,7 @@ Item {
anchors.right = parent.right
compositionRoot.trimmedOut(compositionRoot)
updateDrag()
root.trimInProgress = false;
}
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
......
......@@ -13,7 +13,8 @@ Rectangle {
property bool validMenu: false
property color textColor: activePalette.text
property var groupTrimData
property bool dragInProgress: dragProxyArea.pressed || dragProxyArea.drag.active || groupTrimData !== undefined || spacerGroup > -1
property bool trimInProgress: false
property bool dragInProgress: dragProxyArea.pressed || dragProxyArea.drag.active || groupTrimData !== undefined || spacerGroup > -1 || trimInProgress
property int trimmingOffset: 0
property int trimmingClickFrame: -1
......
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