Fix clip drag broken

parent 9cec2845
...@@ -35,7 +35,7 @@ Rectangle { ...@@ -35,7 +35,7 @@ Rectangle {
property int clipDuration: 0 property int clipDuration: 0
property bool isBlank: false property bool isBlank: false
property bool isAudio: false property bool isAudio: false
property bool isTransition: false property bool isComposition: false
property bool grouped: false property bool grouped: false
property var audioLevels property var audioLevels
property var markers : [] property var markers : []
...@@ -154,7 +154,7 @@ Rectangle { ...@@ -154,7 +154,7 @@ Rectangle {
} }
/*TimelineTransition { /*TimelineTransition {
visible: isTransition visible: isComposition
anchors.fill: parent anchors.fill: parent
property var color: isAudio? 'darkseagreen' : 'blue' property var color: isAudio? 'darkseagreen' : 'blue'
//root.shotcutBlue //root.shotcutBlue
...@@ -203,7 +203,7 @@ Rectangle { ...@@ -203,7 +203,7 @@ Rectangle {
Rectangle { Rectangle {
// text background // text background
color: 'lightgray' color: 'lightgray'
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
opacity: 0.7 opacity: 0.7
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
...@@ -217,7 +217,7 @@ Rectangle { ...@@ -217,7 +217,7 @@ Rectangle {
Text { Text {
id: label id: label
text: clipName text: clipName
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
font.pixelSize: root.baseUnit font.pixelSize: root.baseUnit
anchors { anchors {
top: parent.top top: parent.top
...@@ -255,7 +255,7 @@ Rectangle { ...@@ -255,7 +255,7 @@ Rectangle {
Text { Text {
id: mlabel id: mlabel
text: markers[2 * modelData + 1] text: markers[2 * modelData + 1]
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
font.pixelSize: root.baseUnit font.pixelSize: root.baseUnit
x: markerBase.x x: markerBase.x
anchors { anchors {
...@@ -356,7 +356,7 @@ Rectangle { ...@@ -356,7 +356,7 @@ Rectangle {
TimelineTriangle { TimelineTriangle {
id: fadeInTriangle id: fadeInTriangle
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
width: parent.fadeIn * timeScale width: parent.fadeIn * timeScale
height: parent.height - parent.border.width * 2 height: parent.height - parent.border.width * 2
anchors.left: parent.left anchors.left: parent.left
...@@ -366,7 +366,7 @@ Rectangle { ...@@ -366,7 +366,7 @@ Rectangle {
} }
Rectangle { Rectangle {
id: fadeInControl id: fadeInControl
enabled: !isBlank && !isTransition enabled: !isBlank && !isComposition
anchors.left: fadeInTriangle.width > radius? undefined : fadeInTriangle.left anchors.left: fadeInTriangle.width > radius? undefined : fadeInTriangle.left
anchors.horizontalCenter: fadeInTriangle.width > radius? fadeInTriangle.right : undefined anchors.horizontalCenter: fadeInTriangle.width > radius? fadeInTriangle.right : undefined
anchors.top: fadeInTriangle.top anchors.top: fadeInTriangle.top
...@@ -439,7 +439,7 @@ Rectangle { ...@@ -439,7 +439,7 @@ Rectangle {
TimelineTriangle { TimelineTriangle {
id: fadeOutCanvas id: fadeOutCanvas
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
width: parent.fadeOut * timeScale width: parent.fadeOut * timeScale
height: parent.height - parent.border.width * 2 height: parent.height - parent.border.width * 2
anchors.right: parent.right anchors.right: parent.right
...@@ -450,7 +450,7 @@ Rectangle { ...@@ -450,7 +450,7 @@ Rectangle {
} }
Rectangle { Rectangle {
id: fadeOutControl id: fadeOutControl
enabled: !isBlank && !isTransition enabled: !isBlank && !isComposition
anchors.right: fadeOutCanvas.width > radius? undefined : fadeOutCanvas.right anchors.right: fadeOutCanvas.width > radius? undefined : fadeOutCanvas.right
anchors.horizontalCenter: fadeOutCanvas.width > radius? fadeOutCanvas.left : undefined anchors.horizontalCenter: fadeOutCanvas.width > radius? fadeOutCanvas.left : undefined
anchors.top: fadeOutCanvas.top anchors.top: fadeOutCanvas.top
...@@ -613,7 +613,7 @@ Rectangle { ...@@ -613,7 +613,7 @@ Rectangle {
popup() popup()
} }
MenuItem { MenuItem {
visible: true // !isBlank && !isTransition visible: true // !isBlank && !isComposition
text: i18n('Cut') text: i18n('Cut')
onTriggered: { onTriggered: {
if (!trackRoot.isLocked) { if (!trackRoot.isLocked) {
...@@ -636,12 +636,12 @@ Rectangle { ...@@ -636,12 +636,12 @@ Rectangle {
} }
MenuItem { MenuItem {
visible: true //!isBlank && !isTransition visible: true //!isBlank && !isComposition
text: i18n('Copy') text: i18n('Copy')
onTriggered: timeline.copyClip(trackIndex, index) onTriggered: timeline.copyClip(trackIndex, index)
} }
MenuSeparator { MenuSeparator {
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
} }
MenuItem { MenuItem {
text: i18n('Remove') text: i18n('Remove')
...@@ -653,10 +653,10 @@ Rectangle { ...@@ -653,10 +653,10 @@ Rectangle {
onTriggered: timeline.lift(trackIndex, index) onTriggered: timeline.lift(trackIndex, index)
} }
MenuSeparator { MenuSeparator {
visible: true //!isBlank && !isTransition visible: true //!isBlank && !isComposition
} }
MenuItem { MenuItem {
visible: true //!isBlank && !isTransition visible: true //!isBlank && !isComposition
text: i18n('Split At Playhead (S)') text: i18n('Split At Playhead (S)')
onTriggered: timeline.splitClip(trackIndex, index) onTriggered: timeline.splitClip(trackIndex, index)
} }
...@@ -666,7 +666,7 @@ Rectangle { ...@@ -666,7 +666,7 @@ Rectangle {
onTriggered: timeline.mergeClipWithNext(trackIndex, index, false) onTriggered: timeline.mergeClipWithNext(trackIndex, index, false)
} }
MenuItem { MenuItem {
visible: !isBlank && !isTransition visible: !isBlank && !isComposition
text: i18n('Rebuild Audio Waveform') text: i18n('Rebuild Audio Waveform')
onTriggered: timeline.remakeAudioLevels(trackIndex, index) onTriggered: timeline.remakeAudioLevels(trackIndex, index)
} }
......
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