Commit 141beca3 by luyikei

TransitionItem.qml: Implement a dialog for removing a transition

parent 81ad008f
import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
Rectangle {
id: transition
......@@ -153,6 +155,12 @@ Rectangle {
workflow.moveTransitionBetweenTracks( uuid, trackId - 1, trackId );
}
onClicked: {
if ( mouse.button & Qt.RightButton ) {
transitionContextMenu.popup();
}
}
states: [
State {
name: "Move"
......@@ -171,4 +179,28 @@ Rectangle {
}
]
}
Menu {
id: transitionContextMenu
title: "Edit"
MenuItem {
text: "Delete"
onTriggered: {
removeTransitionDialog.visible = true;
}
}
MessageDialog {
id: removeTransitionDialog
title: "VLMC"
text: qsTr( "Do you really want to remove the transition?" )
icon: StandardIcon.Question
standardButtons: StandardButton.Yes | StandardButton.No
onYes: {
workflow.removeTransition( uuid );
}
}
}
}
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