Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
fd9a00fb
Commit
fd9a00fb
authored
Oct 29, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compositions disappear after reopening project with locked track.
BUG: 412369
parent
32d8c095
Pipeline
#9647
failed with stage
in 3 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
src/timeline2/model/builders/meltBuilder.cpp
src/timeline2/model/builders/meltBuilder.cpp
+13
-9
No files found.
src/timeline2/model/builders/meltBuilder.cpp
View file @
fd9a00fb
...
...
@@ -62,6 +62,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
bool
ok
=
true
;
qDebug
()
<<
"//////////////////////
\n
Trying to construct"
<<
tractor
.
count
()
<<
"tracks.
\n
////////////////////////////////"
;
QList
<
int
>
videoTracksIndexes
;
QList
<
int
>
lockedTracksIndexes
;
// Black track index
videoTracksIndexes
<<
0
;
for
(
int
i
=
0
;
i
<
tractor
.
count
()
&&
ok
;
i
++
)
{
...
...
@@ -83,14 +84,13 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
videoTracksIndexes
<<
i
;
}
ok
=
timeline
->
requestTrackInsertion
(
-
1
,
tid
,
QString
(),
audioTrack
,
undo
,
redo
,
false
);
int
lockState
=
track
->
get_int
(
"kdenlive:locked_track"
);
if
(
track
->
get_int
(
"kdenlive:locked_track"
)
>
0
)
{
lockedTracksIndexes
<<
tid
;
}
Mlt
::
Tractor
local_tractor
(
*
track
);
ok
=
ok
&&
constructTrackFromMelt
(
timeline
,
tid
,
local_tractor
,
binIdCorresp
,
undo
,
redo
,
audioTrack
,
progressDialog
);
timeline
->
setTrackProperty
(
tid
,
QStringLiteral
(
"kdenlive:thumbs_format"
),
track
->
get
(
"kdenlive:thumbs_format"
));
timeline
->
setTrackProperty
(
tid
,
QStringLiteral
(
"kdenlive:audio_rec"
),
track
->
get
(
"kdenlive:audio_rec"
));
if
(
lockState
>
0
)
{
timeline
->
setTrackLockedState
(
tid
,
true
);
}
break
;
}
case
playlist_type
:
{
...
...
@@ -108,13 +108,13 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
if
(
muteState
>
0
&&
(
!
audioTrack
||
(
audioTrack
&&
muteState
!=
1
)))
{
timeline
->
setTrackProperty
(
tid
,
QStringLiteral
(
"hide"
),
QString
::
number
(
muteState
));
}
int
lockState
=
local_playlist
.
get_int
(
"kdenlive:locked_track"
);
ok
=
ok
&&
constructTrackFromMelt
(
timeline
,
tid
,
local_playlist
,
binIdCorresp
,
undo
,
redo
,
audioTrack
,
progressDialog
);
if
(
local_playlist
.
get_int
(
"kdenlive:locked_track"
)
>
0
)
{
lockedTracksIndexes
<<
tid
;
}
timeline
->
setTrackProperty
(
tid
,
QStringLiteral
(
"kdenlive:thumbs_format"
),
local_playlist
.
get
(
"kdenlive:thumbs_format"
));
timeline
->
setTrackProperty
(
tid
,
QStringLiteral
(
"kdenlive:audio_rec"
),
track
->
get
(
"kdenlive:audio_rec"
));
if
(
lockState
>
0
)
{
timeline
->
setTrackLockedState
(
tid
,
true
);
}
break
;
}
default:
...
...
@@ -176,7 +176,11 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
// build internal track compositing
timeline
->
buildTrackCompositing
();
//timeline->updateDuration();
// load locked state as last step
for
(
int
tid
:
lockedTracksIndexes
)
{
timeline
->
setTrackLockedState
(
tid
,
true
);
}
if
(
!
ok
)
{
// TODO log error
...
...
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