Fix timeline doesn't scroll with cursor.

BUG: 407433
parent 74072058
Pipeline #3606 passed with stage
in 14 minutes and 40 seconds
......@@ -148,6 +148,9 @@ Item {
compositionMenu.popup()
}
}
onReleased: {
root.stopScrolling = false
}
onEntered: {
var itemPos = mapToItem(tracksContainerArea, 0, 0, width, height)
initDrag(compositionRoot, itemPos, compositionRoot.clipId, compositionRoot.modelStart, compositionRoot.trackId, true)
......
......@@ -111,7 +111,6 @@ Rectangle {
} else {
scrollTimer.stop()
}
}
function getTrackYFromId(a_track) {
return Logic.getTrackYFromId(a_track)
......@@ -998,20 +997,6 @@ Rectangle {
}
scim = false
}
Timer {
id: scrubTimer
interval: 25
repeat: true
running: parent.scim && parent.containsMouse
&& (parent.mouseX < 50 || parent.mouseX > parent.width - 50)
&& (timeline.position * timeline.scaleFactor >= 50)
onTriggered: {
if (parent.mouseX < 50)
timeline.seekPosition = Math.max(0, timeline.position - 10)
else
timeline.seekPosition = Math.min(timeline.position + 10, timeline.fullDuration - 1)
}
}
Column {
Flickable {
......@@ -1210,6 +1195,7 @@ Rectangle {
}
onReleased: {
clipBeingMovedId = -1
root.stopScrolling = false
if (!shiftClick && dragProxy.draggedItem > -1 && dragFrame > -1 && (controller.isClip(dragProxy.draggedItem) || controller.isComposition(dragProxy.draggedItem))) {
var tId = controller.getItemTrackId(dragProxy.draggedItem)
if (dragProxy.isComposition) {
......
......@@ -564,12 +564,17 @@ void TimelineController::showConfig(int page, int tab)
void TimelineController::gotoNextSnap()
{
setPosition(m_model->getNextSnapPos(timelinePosition()));
int nextSnap = m_model->getNextSnapPos(timelinePosition());
if (nextSnap > timelinePosition()) {
setPosition(nextSnap);
}
}
void TimelineController::gotoPreviousSnap()
{
setPosition(m_model->getPreviousSnapPos(timelinePosition()));
if (timelinePosition() > 0) {
setPosition(m_model->getPreviousSnapPos(timelinePosition()));
}
}
void TimelineController::groupSelection()
......
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