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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
Scott Petrovic
kdenlive
Commits
d7852ca1
Commit
d7852ca1
authored
Apr 07, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly cleaner handling of composition load failure
parent
88c0e8b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
src/project/projectmanager.cpp
src/project/projectmanager.cpp
+4
-1
src/timeline2/model/builders/meltBuilder.cpp
src/timeline2/model/builders/meltBuilder.cpp
+5
-5
No files found.
src/project/projectmanager.cpp
View file @
d7852ca1
...
...
@@ -844,7 +844,10 @@ void ProjectManager::updateTimeline(int pos, int scrollPos)
Mlt
::
Tractor
tractor
(
s
);
m_mainTimelineModel
=
TimelineItemModel
::
construct
(
&
pCore
->
getCurrentProfile
()
->
profile
(),
m_project
->
getGuideModel
(),
m_project
->
commandStack
());
pCore
->
window
()
->
getMainTimeline
()
->
setModel
(
m_mainTimelineModel
);
constructTimelineFromMelt
(
m_mainTimelineModel
,
tractor
);
if
(
!
constructTimelineFromMelt
(
m_mainTimelineModel
,
tractor
))
{
//TODO: act on project load failure
qDebug
()
<<
"// Project failed to load!!"
;
}
const
QString
groupsData
=
m_project
->
getDocumentProperty
(
QStringLiteral
(
"groups"
));
if
(
!
groupsData
.
isEmpty
())
{
m_mainTimelineModel
->
loadGroups
(
groupsData
);
...
...
src/timeline2/model/builders/meltBuilder.cpp
View file @
d7852ca1
...
...
@@ -112,7 +112,6 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
qDebug
()
<<
"ERROR: Unexpected item in the timeline"
;
}
}
ok
=
true
;
// Loading compositions
QScopedPointer
<
Mlt
::
Service
>
service
(
tractor
.
producer
());
...
...
@@ -133,6 +132,7 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
service
.
reset
(
service
->
producer
());
}
// Sort compositions and insert
bool
compositionOk
=
true
;
if
(
!
compositions
.
isEmpty
())
{
std
::
sort
(
compositions
.
begin
(),
compositions
.
end
(),
[](
Mlt
::
Transition
*
a
,
Mlt
::
Transition
*
b
)
{
return
a
->
get_b_track
()
<
b
->
get_b_track
();
});
while
(
!
compositions
.
isEmpty
())
{
...
...
@@ -147,9 +147,9 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
continue
;
}
o
k
=
timeline
->
requestCompositionInsertion
(
id
,
timeline
->
getTrackIndexFromPosition
(
t
->
get_b_track
()
-
1
),
t
->
get_a_track
(),
t
->
get_in
(),
compositionO
k
=
timeline
->
requestCompositionInsertion
(
id
,
timeline
->
getTrackIndexFromPosition
(
t
->
get_b_track
()
-
1
),
t
->
get_a_track
(),
t
->
get_in
(),
t
->
get_length
(),
std
::
move
(
transProps
),
compoId
,
undo
,
redo
);
if
(
!
o
k
)
{
if
(
!
compositionO
k
)
{
qDebug
()
<<
"ERROR : failed to insert composition in track "
<<
t
->
get_b_track
()
<<
", position"
<<
t
->
get_in
()
<<
", ID: "
<<
id
<<
", MLT ID: "
<<
t
->
get
(
"id"
);
//timeline->requestItemDeletion(compoId, false);
...
...
@@ -164,12 +164,12 @@ bool constructTimelineFromMelt(const std::shared_ptr<TimelineItemModel> &timelin
timeline
->
buildTrackCompositing
();
timeline
->
updateDuration
();
/*
if (!ok) {
if
(
!
ok
)
{
// TODO log error
// Don't abort loading because of failed composition
undo
();
return
false
;
}
*/
}
if
(
!
m_errorMessage
.
isEmpty
())
{
KMessageBox
::
sorry
(
qApp
->
activeWindow
(),
m_errorMessage
.
join
(
"
\n
"
),
i18n
(
"Problems found in your project file"
));
}
...
...
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