Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
14971b3e
Commit
14971b3e
authored
Oct 20, 2020
by
Sashmita Raghav
Browse files
Enable subtitle text editing on double click
parent
3d952925
Pipeline
#38187
passed with stage
in 21 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timeline.qml
View file @
14971b3e
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment