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
3739fe99
Commit
3739fe99
authored
Jan 14, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix slideshow duration not updated on profile change
parent
433572a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/project/projectmanager.cpp
View file @
3739fe99
...
...
@@ -952,7 +952,7 @@ bool ProjectManager::updateTimeline(int pos, const QString &chunks, const QStrin
return
false
;
}
m_mainTimelineModel
=
TimelineItemModel
::
construct
(
pCore
->
getProjectProfile
(),
m_project
->
getGuideModel
(),
m_project
->
commandStack
());
// Add snap point at projec start
// Add snap point at projec
t
start
m_mainTimelineModel
->
addSnap
(
0
);
pCore
->
window
()
->
getMainTimeline
()
->
setModel
(
m_mainTimelineModel
,
pCore
->
monitorManager
()
->
projectMonitor
()
->
getControllerProxy
());
bool
projectErrors
=
false
;
...
...
@@ -960,6 +960,8 @@ bool ProjectManager::updateTimeline(int pos, const QString &chunks, const QStrin
//TODO: act on project load failure
qDebug
()
<<
"// Project failed to load!!"
;
}
// Free memory used by original playlist
xmlProd
.
reset
(
nullptr
);
const
QString
groupsData
=
m_project
->
getDocumentProperty
(
QStringLiteral
(
"groups"
));
// update track compositing
int
compositing
=
pCore
->
currentDoc
()
->
getDocumentProperty
(
QStringLiteral
(
"compositing"
),
QStringLiteral
(
"2"
)).
toInt
();
...
...
@@ -1154,6 +1156,13 @@ void ProjectManager::saveWithUpdatedProfile(const QString &updatedProfile)
for
(
int
i
=
0
;
i
<
producers
.
count
();
++
i
)
{
QDomElement
e
=
producers
.
at
(
i
).
toElement
();
bool
ok
;
if
(
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"mlt_service"
))
==
QLatin1String
(
"qimage"
)
&&
Xml
::
hasXmlProperty
(
e
,
QStringLiteral
(
"ttl"
)))
{
// Slideshow, duration is frame based, should be calculated again
Xml
::
setXmlProperty
(
e
,
QStringLiteral
(
"length"
),
QStringLiteral
(
"0"
));
Xml
::
removeXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:duration"
));
e
.
setAttribute
(
QStringLiteral
(
"out"
),
-
1
);
continue
;
}
int
length
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"length"
)).
toInt
(
&
ok
);
if
(
ok
&&
length
>
0
)
{
// calculate updated length
...
...
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