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
4d7d7127
Commit
4d7d7127
authored
Nov 25, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix disabled effect stack state.
BUG: 408242
FIXED-IN: 19.12.0
parent
076be02b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/effects/effectstack/model/effectstackmodel.cpp
View file @
4d7d7127
...
...
@@ -845,11 +845,24 @@ bool EffectStackModel::importEffects(const std::shared_ptr<EffectStackModel> &so
QWriteLocker
locker
(
&
m_lock
);
// TODO: manage fades, keyframes if clips don't have same size / in point
bool
found
=
false
;
bool
effectEnabled
=
false
;
for
(
int
i
=
0
;
i
<
sourceStack
->
rowCount
();
i
++
)
{
auto
item
=
sourceStack
->
getEffectStackRow
(
i
);
// NO undo. this should only be used on project opening
if
(
copyEffect
(
item
,
state
))
{
found
=
true
;
if
(
item
->
isEnabled
())
{
effectEnabled
=
true
;
}
}
}
m_effectStackEnabled
=
effectEnabled
;
if
(
!
m_effectStackEnabled
)
{
// Mark all effects as disabled by stack
for
(
int
i
=
0
;
i
<
rootItem
->
childCount
();
++
i
)
{
std
::
shared_ptr
<
EffectItemModel
>
sourceEffect
=
std
::
static_pointer_cast
<
EffectItemModel
>
(
rootItem
->
child
(
i
));
sourceEffect
->
setEffectStackEnabled
(
false
);
sourceEffect
->
setEnabled
(
true
);
}
}
if
(
found
)
{
...
...
@@ -862,6 +875,7 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service,
{
QWriteLocker
locker
(
&
m_lock
);
m_loadingExisting
=
alreadyExist
;
bool
effectEnabled
=
false
;
if
(
auto
ptr
=
service
.
lock
())
{
for
(
int
i
=
0
;
i
<
ptr
->
filter_count
();
i
++
)
{
std
::
unique_ptr
<
Mlt
::
Filter
>
filter
(
ptr
->
filter
(
i
));
...
...
@@ -876,6 +890,9 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service,
continue
;
}
const
QString
effectId
=
qstrdup
(
filter
->
get
(
"kdenlive_id"
));
if
(
filter
->
get_int
(
"disable"
)
==
0
)
{
effectEnabled
=
true
;
}
// The MLT filter already exists, use it directly to create the effect
std
::
shared_ptr
<
EffectItemModel
>
effect
;
if
(
alreadyExist
)
{
...
...
@@ -923,6 +940,15 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service,
}
}
}
m_effectStackEnabled
=
effectEnabled
;
if
(
!
m_effectStackEnabled
)
{
// Mark all effects as disabled by stack
for
(
int
i
=
0
;
i
<
rootItem
->
childCount
();
++
i
)
{
std
::
shared_ptr
<
EffectItemModel
>
sourceEffect
=
std
::
static_pointer_cast
<
EffectItemModel
>
(
rootItem
->
child
(
i
));
sourceEffect
->
setEffectStackEnabled
(
false
);
sourceEffect
->
setEnabled
(
true
);
}
}
m_loadingExisting
=
false
;
modelChanged
();
}
...
...
src/effects/effectstack/view/effectstackview.cpp
View file @
4d7d7127
...
...
@@ -98,7 +98,7 @@ EffectStackView::EffectStackView(AssetPanel *parent)
m_effectsTree
->
setVisible
(
!
KdenliveSettings
::
showbuiltstack
());
m_lay
->
addWidget
(
m_effectsTree
);
m_lay
->
addStretch
(
10
);
m_scrollTimer
.
setSingleShot
(
true
);
m_scrollTimer
.
setInterval
(
250
);
connect
(
&
m_scrollTimer
,
&
QTimer
::
timeout
,
this
,
&
EffectStackView
::
checkScrollBar
);
...
...
Jean-Baptiste Mardelle
@mardelle
mentioned in commit
31259763
·
Nov 27, 2019
mentioned in commit
31259763
mentioned in commit 3125976376d1f95efae420502cfd8daa56f08710
Toggle commit list
Write
Preview
Supports
Markdown
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