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

Grapped clips: jump to next free space within a track (left/right)

parent 221a1dd1
Pipeline #52711 passed with stage
in 10 minutes and 28 seconds
...@@ -280,15 +280,17 @@ Rectangle { ...@@ -280,15 +280,17 @@ Rectangle {
Keys.onShortcutOverride: event.accepted = clipRoot.isGrabbed && (event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Up || event.key === Qt.Key_Down || event.key === Qt.Key_Escape) Keys.onShortcutOverride: event.accepted = clipRoot.isGrabbed && (event.key === Qt.Key_Left || event.key === Qt.Key_Right || event.key === Qt.Key_Up || event.key === Qt.Key_Down || event.key === Qt.Key_Escape)
Keys.onLeftPressed: { Keys.onLeftPressed: {
var offset = event.modifiers === Qt.ShiftModifier ? timeline.fps() : 1 var offset = event.modifiers === Qt.ShiftModifier ? timeline.fps() : 1
if (controller.requestClipMove(clipRoot.clipId, clipRoot.trackId, clipRoot.modelStart - offset, true, true, true)) { while((clipRoot.modelStart >= offset) && !controller.requestClipMove(clipRoot.clipId, clipRoot.trackId, clipRoot.modelStart - offset, true, true, true)) {
timeline.showToolTip(i18n("Position: %1", timeline.simplifiedTC(clipRoot.modelStart))); offset++;
} }
timeline.showToolTip(i18n("Position: %1", timeline.simplifiedTC(clipRoot.modelStart)));
} }
Keys.onRightPressed: { Keys.onRightPressed: {
var offset = event.modifiers === Qt.ShiftModifier ? timeline.fps() : 1 var offset = event.modifiers === Qt.ShiftModifier ? timeline.fps() : 1
if (controller.requestClipMove(clipRoot.clipId, clipRoot.trackId, clipRoot.modelStart + offset, true, true, true)) { while(!controller.requestClipMove(clipRoot.clipId, clipRoot.trackId, clipRoot.modelStart + offset, true, true, true)) {
timeline.showToolTip(i18n("Position: %1", timeline.simplifiedTC(clipRoot.modelStart))); offset++;
} }
timeline.showToolTip(i18n("Position: %1", timeline.simplifiedTC(clipRoot.modelStart)));
} }
Keys.onUpPressed: { Keys.onUpPressed: {
var nextTrack = controller.getNextTrackId(clipRoot.trackId); var nextTrack = controller.getNextTrackId(clipRoot.trackId);
......
  • mentioned in commit 62e74b17

    Toggle commit list
  • Yes, to the left if kind of doesn't work well when the jump is too big. kdenlive freezes while it is calculating where to move the clip for a while, even with ample space to put the clip. Well I hope this isn't such a problem for most use cases (changing the order of clips, for example).

  • I'm also getting some weird behaviour with image clips for some reason, the clips some times can move under the image clips (not video).

    Sorry for giving you more work! :-\

    Edited by Bruno Santos
  • I am not sure I understood the problem from your description. Can you give some more details?

  • I'll try to screen record.

    I had clips moved with this new feature going to tracks with picture clips (video clips didn't seem to allow this), staying in the same track hidden below them. Can't say if this is a problem of the feature or something else we uncovered with this feature.

    Edited by Bruno Santos
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