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
769b551b
Commit
769b551b
authored
Apr 15, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix crash on fade deletion from timeline
parent
06879371
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/effects/effectstack/view/effectstackview.cpp
View file @
769b551b
...
...
@@ -200,17 +200,20 @@ void EffectStackView::setModel(std::shared_ptr<EffectStackModel> model, const QS
m_scrollTimer
.
start
();
connect
(
m_model
.
get
(),
&
EffectStackModel
::
dataChanged
,
this
,
&
EffectStackView
::
refresh
);
connect
(
m_model
.
get
(),
&
EffectStackModel
::
enabledStateChanged
,
this
,
&
EffectStackView
::
changeEnabledState
);
connect
(
m_model
.
get
(),
&
EffectStackModel
::
currentChanged
,
this
,
[
=
](
QModelIndex
ix
,
bool
active
)
{
m_effectsTree
->
setCurrentIndex
(
ix
);
auto
*
w
=
static_cast
<
CollapsibleEffectView
*>
(
m_effectsTree
->
indexWidget
(
ix
));
if
(
w
)
{
w
->
slotActivateEffect
(
active
);
}
});
connect
(
m_model
.
get
(),
&
EffectStackModel
::
currentChanged
,
this
,
&
EffectStackView
::
activateEffect
,
Qt
::
DirectConnection
);
connect
(
this
,
&
EffectStackView
::
removeCurrentEffect
,
m_model
.
get
(),
&
EffectStackModel
::
removeCurrentEffect
);
// m_builtStack->setModel(model, stackOwner());
}
void
EffectStackView
::
activateEffect
(
QModelIndex
ix
,
bool
active
)
{
m_effectsTree
->
setCurrentIndex
(
ix
);
auto
*
w
=
static_cast
<
CollapsibleEffectView
*>
(
m_effectsTree
->
indexWidget
(
ix
));
if
(
w
)
{
w
->
slotActivateEffect
(
active
);
}
}
void
EffectStackView
::
changeEnabledState
()
{
int
max
=
m_model
->
rowCount
();
...
...
@@ -405,6 +408,7 @@ void EffectStackView::unsetModel(bool reset)
disconnect
(
m_model
.
get
(),
&
EffectStackModel
::
dataChanged
,
this
,
&
EffectStackView
::
refresh
);
disconnect
(
m_model
.
get
(),
&
EffectStackModel
::
enabledStateChanged
,
this
,
&
EffectStackView
::
changeEnabledState
);
disconnect
(
this
,
&
EffectStackView
::
removeCurrentEffect
,
m_model
.
get
(),
&
EffectStackModel
::
removeCurrentEffect
);
disconnect
(
m_model
.
get
(),
&
EffectStackModel
::
currentChanged
,
this
,
&
EffectStackView
::
activateEffect
);
disconnect
(
&
m_timerHeight
,
&
QTimer
::
timeout
,
this
,
&
EffectStackView
::
updateTreeHeight
);
emit
pCore
->
disconnectEffectStack
();
}
...
...
src/effects/effectstack/view/effectstackview.hpp
View file @
769b551b
...
...
@@ -111,6 +111,9 @@ private slots:
/** @brief Refresh the enabled state on widgets
*/
void
changeEnabledState
();
/** @brief Activate an effect in the view
*/
void
activateEffect
(
QModelIndex
ix
,
bool
active
);
// void switchBuiltStack(bool show);
...
...
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