Commit 62e74b17 authored by Julius Künzel's avatar Julius Künzel
Browse files

Grapped clips: jump to next free track if neighbour is occupied

Fixes #284
parent 00959165
Pipeline #52550 passed with stage
in 10 minutes and 40 seconds
......@@ -291,10 +291,16 @@ Rectangle {
}
}
Keys.onUpPressed: {
controller.requestClipMove(clipRoot.clipId, controller.getNextTrackId(clipRoot.trackId), clipRoot.modelStart, true, true, true);
var nextTrack = controller.getNextTrackId(clipRoot.trackId);
while(!controller.requestClipMove(clipRoot.clipId, nextTrack, clipRoot.modelStart, true, true, true) && nextTrack !== controller.getNextTrackId(nextTrack)) {
nextTrack = controller.getNextTrackId(nextTrack);
}
}
Keys.onDownPressed: {
controller.requestClipMove(clipRoot.clipId, controller.getPreviousTrackId(clipRoot.trackId), clipRoot.modelStart, true, true, true);
var previousTrack = controller.getPreviousTrackId(clipRoot.trackId);
while(!controller.requestClipMove(clipRoot.clipId, previousTrack, clipRoot.modelStart, true, true, true) && previousTrack !== controller.getPreviousTrackId(previousTrack)) {
previousTrack = controller.getPreviousTrackId(previousTrack);
}
}
Keys.onEscapePressed: {
timeline.grabCurrent()
......
  • @jlskuz could you add this behaviour to the same track? So we can move clip over another clip in the same track?

  • Done! fe7bb6ec However it can have a bad performance if keep holding the left arrow key and there is no space available.

  • Thanks! Will test a post feedback on that commit. :)

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