Commit a3f4e351 authored by luyikei's avatar luyikei

Timeline: Implement removing clips

parent 61fe7ae4
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
Rectangle {
id: page
anchors.fill: parent
color: "#777777"
border.width: 0
focus: true
property int initPosOfCursor: 100
property int ppu: 10 // Pixels Per minimum Unit
......@@ -267,6 +269,27 @@ Rectangle {
property point initPos
}
MessageDialog {
id: removeClipDialog
title: "VLMC"
text: qsTr( "Do you really want to remove selected clips?" )
icon: StandardIcon.Question
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
while ( selectedClips.length ) {
workflow.removeClip( selectedClips[0]["uuid"] );
removeClipFromTrackContainer( selectedClips[0]["item"].type, selectedClips[0]["uuid"] );
}
}
}
Keys.onPressed: {
if ( event.key === Qt.Key_Delete ) {
removeClipDialog.visible = true;
event.accepted = true;
}
}
Connections {
target: workflow
onLengthChanged: {
......
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