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
59a69978
Commit
59a69978
authored
Jul 17, 2021
by
Jean-Baptiste Mardelle
Browse files
Upgrade document version and fix wipe params for MLT 7 when opening older project file
parent
8f54fb2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/doc/documentvalidator.cpp
View file @
59a69978
...
...
@@ -1741,6 +1741,24 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
Xml
::
setXmlProperty
(
masterProducers
.
at
(
i
).
toElement
(),
QStringLiteral
(
"kdenlive:clipzones"
),
QString
(
json
.
toJson
()));
}
}
if
(
version
<
1.01
)
{
// Upgrade wipe composition (replace old mlt geometry with mlt rect
// Warn about deprecated automask
// Some tracks were added, adjust compositions
QDomNodeList
transitions
=
m_doc
.
elementsByTagName
(
QStringLiteral
(
"transition"
));
int
max
=
transitions
.
count
();
for
(
int
i
=
0
;
i
<
max
;
++
i
)
{
QDomElement
t
=
transitions
.
at
(
i
).
toElement
();
if
(
Xml
::
getXmlProperty
(
t
,
QStringLiteral
(
"kdenlive_id"
))
==
QLatin1String
(
"wipe"
))
{
QString
animation
=
Xml
::
getXmlProperty
(
t
,
QStringLiteral
(
"geometry"
));
if
(
animation
==
QLatin1String
(
"0%/0%:100%x100%:100;-1=0%/0%:100%x100%:0"
))
{
Xml
::
setXmlProperty
(
t
,
QStringLiteral
(
"geometry"
),
QStringLiteral
(
"0=0% 0% 100% 100% 1;-1=0% 0% 100% 100% 0"
));
}
else
if
(
animation
==
QLatin1String
(
"0%/0%:100%x100%:0;-1=0%/0%:100%x100%:100"
))
{
Xml
::
setXmlProperty
(
t
,
QStringLiteral
(
"geometry"
),
QStringLiteral
(
"0=0% 0% 100% 100% 0;-1=0% 0% 100% 100% 1"
));
}
}
}
}
m_modified
=
true
;
return
true
;
}
...
...
src/doc/kdenlivedoc.cpp
View file @
59a69978
...
...
@@ -68,7 +68,7 @@
#include <xlocale.h>
#endif
const
double
DOCUMENTVERSION
=
1.0
0
;
const
double
DOCUMENTVERSION
=
1.0
1
;
KdenliveDoc
::
KdenliveDoc
(
const
QUrl
&
url
,
QString
projectFolder
,
QUndoGroup
*
undoGroup
,
const
QString
&
profileName
,
const
QMap
<
QString
,
QString
>
&
properties
,
const
QMap
<
QString
,
QString
>
&
metadata
,
const
QPair
<
int
,
int
>
&
tracks
,
int
audioChannels
,
bool
*
openBackup
,
MainWindow
*
parent
)
...
...
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