...
 
Commits (3)
......@@ -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)
......
/***************************************************************************
* Copyright (C) 2019 by Jean-Baptiste Mardelle *
* This file is part of Kdenlive. See www.kdenlive.org. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) version 3 or any later version accepted by the *
* membership of KDE e.V. (or its successor approved by the membership *
* of KDE e.V.), which shall act as a proxy defined in Section 14 of *
* version 3 of the license. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
import QtQuick 2.6
import QtQuick.Controls 1.5
import QtQuick.Window 2.2
import QtQml.Models 2.2
Menu {
id: menuRoot
property alias menuModel: itemRepeater.model
signal guideSelected(int assetFrame)
Instantiator {
id: itemRepeater
onObjectAdded: menuRoot.insertItem( index, object )
onObjectRemoved: menuRoot.removeItem( object )
delegate: MenuItem {
text: model.comment
property int assetFrame: model.frame
onTriggered: {
menuRoot.guideSelected(assetFrame)
}
}
}
}
......@@ -111,7 +111,6 @@ Rectangle {
} else {
scrollTimer.stop()
}
}
function getTrackYFromId(a_track) {
return Logic.getTrackYFromId(a_track)
......@@ -520,6 +519,15 @@ Rectangle {
timeline.switchGuide(timeline.position);
}
}
GuidesMenu {
title: i18n('Go to guide...')
menuModel: guidesModel
enabled: guidesDelegateModel.count > 0
onGuideSelected: {
timeline.seekPosition = assetFrame
timeline.position = timeline.seekPosition
}
}
OLD.MenuItem {
id: editGuideMenu
text: i18n('Edit Guide')
......@@ -567,6 +575,15 @@ Rectangle {
timeline.switchGuide(timeline.position);
}
}
GuidesMenu {
title: i18n('Go to guide...')
menuModel: guidesModel
enabled: guidesDelegateModel.count > 0
onGuideSelected: {
timeline.seekPosition = assetFrame
timeline.position = timeline.seekPosition
}
}
OLD.MenuItem {
id: editGuideMenu2
text: i18n('Edit Guide')
......@@ -998,20 +1015,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 +1213,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()
......
......@@ -37,6 +37,7 @@
<file alias="AssetView.qml">assets/view/qml/AssetView.qml</file>
<file alias="transitionView.qml">transitions/view/qml/transitionView.qml</file>
<file alias="AssetMenu.qml">timeline2/view/qml/AssetMenu.qml</file>
<file alias="GuidesMenu.qml">timeline2/view/qml/GuidesMenu.qml</file>
<file alias="BuiltStack.qml">effects/effectstack/view/qml/BuiltStack.qml</file>
<file alias="EffectSlider.qml">effects/effectstack/view/qml/EffectSlider.qml</file>
<file alias="LiftGammaGain.qml">effects/effectstack/view/qml/LiftGammaGain.qml</file>
......