Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix clip move not always correctly terminating

parent bbec7420
......@@ -76,7 +76,7 @@ Rectangle {
onGroupedChanged: {
//console.log('Clip ', clipId, ' is grouped : ', grouped)
flashclip.start()
//flashclip.start()
}
SequentialAnimation on color {
......@@ -257,7 +257,7 @@ Rectangle {
originalX = parent.x
clipRoot.y = 0
originalTrackId = trackId
} else if (Math.abs(delta) >= 1.0) {
} else {
parent.dropped(clipRoot)
originalX = parent.x
}
......
......@@ -251,15 +251,16 @@ Column{
var cIndex = clip.clipId
var frame = Math.round(clip.x / timeScale)
var origFrame = clip.modelStart
controller.requestClipMove(cIndex, toTrack, origFrame, false, false, false)
controller.requestClipMove(cIndex, toTrack, frame, true, true, true)
if (frame != origFrame) {
controller.requestClipMove(cIndex, toTrack, origFrame, false, false, false)
controller.requestClipMove(cIndex, toTrack, frame, true, true, true)
}
}
onDragged: { //called when the move is in process
var toTrack = clip.trackId
var cIndex = clip.clipId
clip.x = Math.max(0, clip.x)
var frame = Math.round(clip.x / timeScale)
frame = controller.suggestClipMove(cIndex, toTrack, frame, root.snapping);
if (!controller.requestClipMove(cIndex, toTrack, frame, false, false, false)) {
// Abort move
......@@ -324,19 +325,6 @@ Column{
opacity: 0.8
selected: trackRoot.selection.indexOf(clipId) !== -1
onGroupedChanged: {
console.log('Composition ', clipId, ' is grouped : ', grouped)
//flashclip.start()
}
SequentialAnimation on color {
id: flashclip
loops: 2
running: false
ColorAnimation { from: Qt.darker('mediumpurple'); to: "#ff3300"; duration: 100 }
ColorAnimation { from: "#ff3300"; to: Qt.darker('mediumpurple'); duration: 100 }
}
onClicked: {
console.log("Composition clicked",clip.clipId)
trackRoot.clipClicked(clip, trackRoot, shiftClick);
......
......@@ -815,7 +815,7 @@ Rectangle {
onClipDragged: {
continuousScrolling(x)
// Show distance moved as time in a "bubble" help.
var delta = Math.round((clip.x - clip.originalX) / timeline.scaleFactor)
var delta = Math.round((clip.x / timeline.scaleFactor) - Math.round(clip.originalX) / timeline.scaleFactor)
if (delta != 0) {
var track = tracksRepeater.itemAt(clip.trackIndex)
var s = timeline.timecode(Math.abs(delta))
......@@ -825,7 +825,7 @@ Rectangle {
s = ((delta < 0)? '-' : (delta > 0)? '+' : '') + s
bubbleHelp.show(x, track.y + height/2, s)
clipBeingMovedId = clip.clipId
}
} else bubbleHelp.hide()
}
onClipDropped: {
console.log(" + + + ++ + DROPPED + + + + + + +");
......
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