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
4cff4653
Commit
4cff4653
authored
May 31, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix fade in broken on cut clips.
Related to #209
parent
7c03f900
Changes
2
Show whitespace changes
Inline
Side-by-side
src/assets/model/assetparametermodel.cpp
View file @
4cff4653
...
@@ -94,7 +94,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
...
@@ -94,7 +94,7 @@ AssetParameterModel::AssetParameterModel(std::unique_ptr<Mlt::Properties> asset,
int
val
=
value
.
toInt
();
int
val
=
value
.
toInt
();
if
(
val
<
0
)
{
if
(
val
<
0
)
{
int
in
=
pCore
->
getItemIn
(
m_ownerId
);
int
in
=
pCore
->
getItemIn
(
m_ownerId
);
int
out
=
in
+
pCore
->
getItemDuration
(
m_ownerId
);
int
out
=
in
+
pCore
->
getItemDuration
(
m_ownerId
)
-
1
;
val
+=
out
;
val
+=
out
;
value
=
QString
::
number
(
val
);
value
=
QString
::
number
(
val
);
}
}
...
...
src/effects/effectstack/model/effectstackmodel.cpp
View file @
4cff4653
...
@@ -394,8 +394,16 @@ bool EffectStackModel::appendEffect(const QString &effectId, bool makeCurrent)
...
@@ -394,8 +394,16 @@ bool EffectStackModel::appendEffect(const QString &effectId, bool makeCurrent)
int
inFades
=
0
;
int
inFades
=
0
;
int
outFades
=
0
;
int
outFades
=
0
;
if
(
effectId
==
QLatin1String
(
"fadein"
)
||
effectId
==
QLatin1String
(
"fade_from_black"
))
{
if
(
effectId
==
QLatin1String
(
"fadein"
)
||
effectId
==
QLatin1String
(
"fade_from_black"
))
{
int
duration
=
effect
->
filter
().
get_length
()
-
1
;
int
in
=
pCore
->
getItemIn
(
m_ownerId
);
effect
->
filter
().
set
(
"in"
,
in
);
effect
->
filter
().
set
(
"out"
,
in
+
duration
);
inFades
++
;
inFades
++
;
}
else
if
(
effectId
==
QLatin1String
(
"fadeout"
)
||
effectId
==
QLatin1String
(
"fade_to_black"
))
{
}
else
if
(
effectId
==
QLatin1String
(
"fadeout"
)
||
effectId
==
QLatin1String
(
"fade_to_black"
))
{
/*int duration = effect->filter().get_length() - 1;
int out = pCore->getItemIn(m_ownerId) + pCore->getItemDuration(m_ownerId) - 1;
effect->filter().set("in", out - duration);
effect->filter().set("out", out);*/
outFades
++
;
outFades
++
;
}
}
QString
effectName
=
EffectsRepository
::
get
()
->
getName
(
effectId
);
QString
effectName
=
EffectsRepository
::
get
()
->
getName
(
effectId
);
...
...
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