Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
39a52bb4
Commit
39a52bb4
authored
Oct 27, 2020
by
Sashmita Raghav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix subtitle clip movement
parent
14971b3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+14
-4
No files found.
src/timeline2/view/qml/timeline.qml
View file @
39a52bb4
...
...
@@ -1482,6 +1482,7 @@ Rectangle {
height
:
parent
.
height
x
:
model
.
startframe
*
timeScale
;
property
bool
textEditBegin
:
false
color
:
'
yellow
'
/*Text {
id: subtitleText
anchors.fill: parent
...
...
@@ -1546,6 +1547,7 @@ Rectangle {
id
:
subtitleEdit
font
:
miniFont
activeFocusOnPress
:
true
selectByMouse
:
true
onEditingFinished
:
{
subtitleEdit
.
focus
=
false
timeline
.
editSubtitle
(
subtitleBase
.
x
/
timeline
.
scaleFactor
,
subtitleEdit
.
displayText
,
(
subtitleBase
.
x
+
subtitleBase
.
width
)
/
timeline
.
scaleFactor
)
...
...
@@ -1589,6 +1591,7 @@ Rectangle {
enabled
:
true
property
bool
sizeChanged
:
false
property
int
newStart
:
-
1
property
double
originalDuration
:
-
1
property
int
diff
:
-
1
property
double
delta
:
-
1
property
double
oldDelta
:
0
...
...
@@ -1605,6 +1608,8 @@ Rectangle {
oldStartFrame
=
subtitleBase
.
x
// the original start frame of subtitle
console
.
log
(
oldStartFrame
)
console
.
log
(
subtitleBase
.
x
)
originalDuration
=
subtitleBase
.
width
/
timeScale
console
.
log
(
"
originalDuration
"
,
originalDuration
)
}
onPositionChanged
:
{
if
(
pressed
)
{
...
...
@@ -1615,15 +1620,20 @@ Rectangle {
sizeChanged
=
true
diff
=
(
mouseX
-
oldStartX
)
/
timeScale
subtitleBase
.
x
=
subtitleBase
.
x
+
diff
console
.
log
(
"
oldStartFrame
"
,
oldStartFrame
/
timeline
.
scaleFactor
,
"
subtitleBase
"
,
subtitleBase
.
x
/
timeline
.
scaleFactor
)
console
.
log
(
"
D
uration:
"
,
duration
)
//
console.log("oldStartFrame",oldStartFrame/timeline.scaleFactor,"subtitleBase",subtitleBase.x/timeline.scaleFactor)
//console.log("d
uration:", duration)
delta
=
subtitleBase
.
x
/
timeline
.
scaleFactor
-
oldStartFrame
/
timeline
.
scaleFactor
var
diffDelta
=
delta
-
oldDelta
//update the change in start frame differece
oldDelta
=
delta
//console.log("Diff:",diff,"Delta:", delta, "Delta_Diff",diffDelta)
console
.
log
(
"
New duration =
"
,
subtitleBase
.
width
/
timeScale
-
delta
)
//console.log("new duration =", subtitleBase.width/timeScale - delta )
//subtitleBase.width = (originalDuration - delta)*timeScale
duration
=
duration
-
diffDelta
//update duration to enable resizing
//duration = (originalDuration - diffDelta)
//console.log("Delta duration =", duration )
//console.log("originalDuration",originalDuration- diffDelta)
//console.log("Delta_Duaration:",subtitleBase.width/timeScale)
//timeline.moveSubtitle(oldStartX/ timeScale, subtitleBase.x/timeline.scaleFactor)
}
}
}
...
...
@@ -1664,7 +1674,7 @@ Rectangle {
cursorShape
:
Qt
.
SizeHorCursor
drag.target
:
rightend
drag.axis
:
Drag
.
XAxis
drag.smoothed
:
false
//
drag.smoothed: false
onPressed
:
{
root
.
autoScrolling
=
false
...
...
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