Commit 14971b3e authored by Sashmita Raghav's avatar Sashmita Raghav
Browse files

Enable subtitle text editing on double click

parent 3d952925
Pipeline #38187 passed with stage
in 21 minutes and 37 seconds
......@@ -1481,6 +1481,7 @@ Rectangle {
width: duration * timeScale // to make width change wrt timeline scale factor
height: parent.height
x: model.startframe * timeScale;
property bool textEditBegin: false
/*Text {
id: subtitleText
anchors.fill: parent
......@@ -1537,6 +1538,9 @@ Rectangle {
}
console.log("originalDuration after shifting",originalDuration)
}
onDoubleClicked: {
parent.textEditBegin = true
}
}
TextField {
id: subtitleEdit
......@@ -1545,9 +1549,11 @@ Rectangle {
onEditingFinished: {
subtitleEdit.focus = false
timeline.editSubtitle(subtitleBase.x / timeline.scaleFactor, subtitleEdit.displayText, (subtitleBase.x + subtitleBase.width)/ timeline.scaleFactor)
parent.textEditBegin = false
}
anchors.fill: parent
visible: text != "" && timeScale >= 6
enabled: parent.textEditBegin
text: model.subtitle
height: subtitleBase.height
width: subtitleBase.width
......@@ -1599,8 +1605,6 @@ Rectangle {
oldStartFrame = subtitleBase.x // the original start frame of subtitle
console.log(oldStartFrame)
console.log(subtitleBase.x)
}
onPositionChanged: {
if (pressed) {
......
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