Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Farid Abdelnour
kdenlive
Commits
5706601b
Commit
5706601b
authored
Jun 19, 2012
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pasting fade effect in a group
parent
50fb1bfe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
src/clipitem.cpp
src/clipitem.cpp
+6
-6
src/effectstack/effectstackview2.cpp
src/effectstack/effectstackview2.cpp
+6
-0
No files found.
src/clipitem.cpp
View file @
5706601b
...
...
@@ -283,7 +283,7 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
int
start
=
end
;
if
(
effect
.
attribute
(
"id"
)
==
"fadeout"
)
{
if
(
m_effectList
.
hasEffect
(
QString
(),
"fade_to_black"
)
==
-
1
)
{
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"in"
).
toInt
();
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"out"
).
toInt
()
-
EffectsList
::
parameter
(
effect
,
"in"
).
toInt
();
if
(
effectDuration
>
cropDuration
().
frames
(
m_fps
))
{
effectDuration
=
cropDuration
().
frames
(
m_fps
)
/
2
;
}
...
...
@@ -294,7 +294,7 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
}
}
else
if
(
effect
.
attribute
(
"id"
)
==
"fade_to_black"
)
{
if
(
m_effectList
.
hasEffect
(
QString
(),
"fadeout"
)
==
-
1
)
{
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"in"
).
toInt
();
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"out"
).
toInt
()
-
EffectsList
::
parameter
(
effect
,
"in"
).
toInt
();
if
(
effectDuration
>
cropDuration
().
frames
(
m_fps
))
{
effectDuration
=
cropDuration
().
frames
(
m_fps
)
/
2
;
}
...
...
@@ -312,23 +312,23 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
if
(
effect
.
attribute
(
"id"
)
==
"fadein"
)
{
if
(
m_effectList
.
hasEffect
(
QString
(),
"fade_from_black"
)
==
-
1
)
{
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"out"
).
toInt
();
if
(
offset
!=
0
)
effectDuration
-=
offset
-
cropStart
().
frames
(
m_fps
)
;
if
(
offset
!=
0
)
effectDuration
-=
offset
;
if
(
effectDuration
>
cropDuration
().
frames
(
m_fps
))
{
effectDuration
=
cropDuration
().
frames
(
m_fps
)
/
2
;
}
end
+=
effectDuration
;
}
else
end
+=
EffectsList
::
parameter
(
m_effectList
.
getEffectByTag
(
QString
(),
"fade_from_black"
),
"out"
).
toInt
();
end
+=
EffectsList
::
parameter
(
m_effectList
.
getEffectByTag
(
QString
(),
"fade_from_black"
),
"out"
).
toInt
()
-
offset
;
}
else
if
(
effect
.
attribute
(
"id"
)
==
"fade_from_black"
)
{
if
(
m_effectList
.
hasEffect
(
QString
(),
"fadein"
)
==
-
1
)
{
int
effectDuration
=
EffectsList
::
parameter
(
effect
,
"out"
).
toInt
();
if
(
offset
!=
0
)
effectDuration
-=
offset
-
cropStart
().
frames
(
m_fps
)
;
if
(
offset
!=
0
)
effectDuration
-=
offset
;
if
(
effectDuration
>
cropDuration
().
frames
(
m_fps
))
{
effectDuration
=
cropDuration
().
frames
(
m_fps
)
/
2
;
}
end
+=
effectDuration
;
}
else
end
+=
EffectsList
::
parameter
(
m_effectList
.
getEffectByTag
(
QString
(),
"fadein"
),
"out"
).
toInt
();
end
+=
EffectsList
::
parameter
(
m_effectList
.
getEffectByTag
(
QString
(),
"fadein"
),
"out"
).
toInt
()
-
offset
;
}
EffectsList
::
setParameter
(
effect
,
"in"
,
QString
::
number
(
start
));
EffectsList
::
setParameter
(
effect
,
"out"
,
QString
::
number
(
end
));
...
...
src/effectstack/effectstackview2.cpp
View file @
5706601b
...
...
@@ -388,6 +388,12 @@ void EffectStackView2::startDrag()
}
else
if
(
m_draggedGroup
)
{
doc
=
m_draggedGroup
->
effectsData
();
if
(
m_effectMetaInfo
.
trackMode
)
{
doc
.
documentElement
().
setAttribute
(
"clipstart"
,
0
);
}
else
{
doc
.
documentElement
().
setAttribute
(
"clipstart"
,
m_clipref
->
cropStart
().
frames
(
KdenliveSettings
::
project_fps
()));
}
pixmap
=
QPixmap
::
grabWidget
(
m_draggedGroup
->
title
());
}
else
return
;
...
...
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