Commit ed4b2265 authored by luyikei's avatar luyikei

ClipContextMenu: Add Delete

parent 5ed944ab
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
Menu {
id: clipContextMenu
......@@ -36,6 +37,27 @@ Menu {
}
}
MenuSeparator { }
MenuItem {
text: "Delete"
onTriggered: {
removeClipDialog.visible = true;
}
}
MessageDialog {
id: removeClipDialog
title: "VLMC"
text: qsTr( "Do you really want to remove the clip?" )
icon: StandardIcon.Question
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
workflow.removeClip( clip.uuid );
}
}
onAboutToShow: {
grouped = findGroup( clip.uuid );
}
......
......@@ -459,7 +459,7 @@ Rectangle {
}
MessageDialog {
id: removeClipDialog
id: removeSelectedClipsDialog
title: "VLMC"
text: qsTr( "Do you really want to remove selected clips?" )
icon: StandardIcon.Question
......@@ -472,7 +472,7 @@ Rectangle {
Keys.onPressed: {
if ( event.key === Qt.Key_Delete ) {
removeClipDialog.visible = true;
removeSelectedClipsDialog.visible = true;
}
else if ( event.key === Qt.Key_Plus && event.modifiers & Qt.ControlModifier )
{
......
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