Skip to content
GitLab
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
dffcd796
Commit
dffcd796
authored
Feb 14, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix changing of title clip duration broken
BUG: 417505
parent
6fd83d69
Pipeline
#15032
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
dffcd796
...
...
@@ -902,10 +902,14 @@ const QString ProjectClip::getFileHash()
fileHash
=
QCryptographicHash
::
hash
(
fileData
,
QCryptographicHash
::
Md5
);
break
;
case
ClipType
::
Text
:
case
ClipType
::
TextTemplate
:
fileData
=
getProducerProperty
(
QStringLiteral
(
"xmldata"
)).
toUtf8
();
fileHash
=
QCryptographicHash
::
hash
(
fileData
,
QCryptographicHash
::
Md5
);
break
;
case
ClipType
::
TextTemplate
:
fileData
=
getProducerProperty
(
QStringLiteral
(
"resource"
)).
toUtf8
();
fileData
.
append
(
getProducerProperty
(
QStringLiteral
(
"templatetext"
)).
toUtf8
());
fileHash
=
QCryptographicHash
::
hash
(
fileData
,
QCryptographicHash
::
Md5
);
break
;
case
ClipType
::
QText
:
fileData
=
getProducerProperty
(
QStringLiteral
(
"text"
)).
toUtf8
();
fileHash
=
QCryptographicHash
::
hash
(
fileData
,
QCryptographicHash
::
Md5
);
...
...
@@ -1043,6 +1047,12 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r
emit
refreshAnalysisPanel
();
}
if
(
properties
.
contains
(
QStringLiteral
(
"length"
))
||
properties
.
contains
(
QStringLiteral
(
"kdenlive:duration"
)))
{
// Make sure length is >= kdenlive:duration
int
producerLength
=
getProducerIntProperty
(
QStringLiteral
(
"length"
));
int
kdenliveLength
=
getFramePlaytime
();
if
(
producerLength
<
kdenliveLength
)
{
setProducerProperty
(
QStringLiteral
(
"length"
),
kdenliveLength
);
}
m_duration
=
getStringDuration
();
if
(
auto
ptr
=
m_model
.
lock
())
std
::
static_pointer_cast
<
ProjectItemModel
>
(
ptr
)
->
onItemUpdated
(
std
::
static_pointer_cast
<
ProjectClip
>
(
shared_from_this
()),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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