Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdenlive
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Akhil K Gangadharan
kdenlive
Commits
4bc1aee3
Commit
4bc1aee3
authored
Apr 11, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix corruption when clicking in timeline after undo or clip offset correction
parent
0803d6ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
8 deletions
+24
-8
src/timeline2/view/qml/Clip.qml
src/timeline2/view/qml/Clip.qml
+3
-1
src/timeline2/view/qml/Composition.qml
src/timeline2/view/qml/Composition.qml
+1
-0
src/timeline2/view/qml/Timeline.js
src/timeline2/view/qml/Timeline.js
+2
-2
src/timeline2/view/qml/timeline.qml
src/timeline2/view/qml/timeline.qml
+18
-5
No files found.
src/timeline2/view/qml/Clip.qml
View file @
4bc1aee3
...
@@ -70,6 +70,7 @@ Rectangle {
...
@@ -70,6 +70,7 @@ Rectangle {
property
double
speed
:
1.0
property
double
speed
:
1.0
property
color
borderColor
:
'
black
'
property
color
borderColor
:
'
black
'
property
bool
forceReloadThumb
property
bool
forceReloadThumb
property
bool
isComposition
:
false
width
:
clipDuration
*
timeScale
;
width
:
clipDuration
*
timeScale
;
opacity
:
dragProxyArea
.
drag
.
active
&&
dragProxy
.
draggedItem
==
clipId
?
0.8
:
1.0
opacity
:
dragProxyArea
.
drag
.
active
&&
dragProxy
.
draggedItem
==
clipId
?
0.8
:
1.0
...
@@ -87,7 +88,8 @@ Rectangle {
...
@@ -87,7 +88,8 @@ Rectangle {
function
clearAndMove
(
offset
)
{
function
clearAndMove
(
offset
)
{
controller
.
requestClearSelection
()
controller
.
requestClearSelection
()
controller
.
requestClipMove
(
clipRoot
.
clipId
,
clipRoot
.
trackId
,
clipRoot
.
modelStart
-
offset
,
true
,
true
,
true
);
controller
.
requestClipMove
(
clipRoot
.
clipId
,
clipRoot
.
trackId
,
clipRoot
.
modelStart
-
offset
,
true
,
true
,
true
)
controller
.
requestAddToSelection
(
clipRoot
.
clipId
)
}
}
onInPointChanged
:
{
onInPointChanged
:
{
...
...
src/timeline2/view/qml/Composition.qml
View file @
4bc1aee3
...
@@ -52,6 +52,7 @@ Item {
...
@@ -52,6 +52,7 @@ Item {
property
int
aTrack
:
-
1
property
int
aTrack
:
-
1
property
int
clipId
//Id of the clip in the model
property
int
clipId
//Id of the clip in the model
property
int
originalTrackId
:
trackId
property
int
originalTrackId
:
trackId
property
bool
isComposition
:
true
property
int
originalX
:
x
property
int
originalX
:
x
property
int
originalDuration
:
clipDuration
property
int
originalDuration
:
clipDuration
property
int
lastValidDuration
:
clipDuration
property
int
lastValidDuration
:
clipDuration
...
...
src/timeline2/view/qml/Timeline.js
View file @
4bc1aee3
...
@@ -71,8 +71,8 @@ function getTrackIndexFromId(id) {
...
@@ -71,8 +71,8 @@ function getTrackIndexFromId(id) {
function
getTrackById
(
id
)
{
function
getTrackById
(
id
)
{
var
i
=
0
;
var
i
=
0
;
for
(;
i
<
track
Header
Repeater
.
count
;
i
++
)
{
for
(;
i
<
track
s
Repeater
.
count
;
i
++
)
{
if
(
track
HeaderRepeater
.
itemAt
(
i
).
track
Id
==
id
)
{
if
(
track
sRepeater
.
itemAt
(
i
).
trackInternal
Id
==
id
)
{
return
tracksRepeater
.
itemAt
(
i
);
return
tracksRepeater
.
itemAt
(
i
);
}
}
}
}
...
...
src/timeline2/view/qml/timeline.qml
View file @
4bc1aee3
...
@@ -1021,8 +1021,8 @@ Rectangle {
...
@@ -1021,8 +1021,8 @@ Rectangle {
property
bool
isComposition
property
bool
isComposition
property
int
verticalOffset
property
int
verticalOffset
property
var
masterObject
property
var
masterObject
color
:
'
green
'
color
:
'
transparent
'
opacity
:
0.8
//
opacity: 0.8
MouseArea
{
MouseArea
{
id
:
dragProxyArea
id
:
dragProxyArea
anchors.fill
:
parent
anchors.fill
:
parent
...
@@ -1068,11 +1068,23 @@ Rectangle {
...
@@ -1068,11 +1068,23 @@ Rectangle {
var
posx
=
Math
.
round
((
parent
.
x
)
/
root
.
timeScale
)
var
posx
=
Math
.
round
((
parent
.
x
)
/
root
.
timeScale
)
var
clickAccepted
=
true
var
clickAccepted
=
true
if
(
controller
.
normalEdit
()
&&
(
tk
!=
Logic
.
getTrackIdFromPos
(
parent
.
y
)
||
x
!=
posx
))
{
if
(
controller
.
normalEdit
()
&&
(
tk
!=
Logic
.
getTrackIdFromPos
(
parent
.
y
)
||
x
!=
posx
))
{
console
.
log
(
'
INCORRECT DRAG, Trying to recover item:
'
,
parent
.
y
,
'
XPOS:
'
,
x
,
'
=
'
,
posx
,
'
\n
!!!!!!!!!!
'
)
console
.
log
(
'
INCORRECT DRAG, Trying to recover item:
'
,
parent
.
y
,
'
XPOS:
'
,
x
,
'
=
'
,
posx
,
'
on track:
'
,
tk
,
'
\n
!!!!!!!!!!
'
)
// Try to find correct item
// Try to find correct item
var
track
=
Logic
.
getTrackById
(
tk
)
var
track
=
Logic
.
getTrackById
(
tk
)
var
container
=
track
.
children
[
0
].
children
[
0
].
children
[
0
]
var
container
=
track
.
children
[
0
]
var
tentativeClip
=
container
.
childAt
(
mouseX
+
parent
.
x
,
5
)
var
tentativeClip
=
undefined
var
realX
=
mouseX
+
parent
.
x
for
(
var
i
=
0
;
i
<
container
.
children
.
length
;
i
++
)
{
if
(
container
.
children
[
i
].
children
.
length
==
0
||
container
.
children
[
i
].
children
[
0
].
children
.
length
==
0
)
{
continue
}
var
testX
=
container
.
children
[
i
].
children
[
0
].
children
[
0
].
x
-
realX
if
(
dragProxy
.
isComposition
==
container
.
children
[
i
].
children
[
0
].
children
[
0
].
isComposition
&&
testX
<
0
&&
testX
+
container
.
children
[
i
].
children
[
0
].
children
[
0
].
width
>
0
)
{
// Found clip in place
tentativeClip
=
container
.
children
[
i
].
children
[
0
].
children
[
0
]
break
}
}
if
(
tentativeClip
&&
tentativeClip
.
clipId
)
{
if
(
tentativeClip
&&
tentativeClip
.
clipId
)
{
clickAccepted
=
true
clickAccepted
=
true
dragProxy
.
draggedItem
=
tentativeClip
.
clipId
dragProxy
.
draggedItem
=
tentativeClip
.
clipId
...
@@ -1089,6 +1101,7 @@ Rectangle {
...
@@ -1089,6 +1101,7 @@ Rectangle {
mouse
.
accepted
=
false
mouse
.
accepted
=
false
dragProxy
.
draggedItem
=
-
1
dragProxy
.
draggedItem
=
-
1
dragProxy
.
masterObject
=
undefined
dragProxy
.
masterObject
=
undefined
dragProxy
.
sourceFrame
=
-
1
parent
.
x
=
0
parent
.
x
=
0
parent
.
y
=
0
parent
.
y
=
0
parent
.
width
=
0
parent
.
width
=
0
...
...
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