Skip to content
GitLab
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
8f0ae230
Commit
8f0ae230
authored
Feb 24, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix regression and crash in effect focusing
parent
b5a51256
Pipeline
#15566
passed with stage
in 17 minutes and 6 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/effects/effectstack/view/effectstackview.cpp
View file @
8f0ae230
...
...
@@ -202,9 +202,9 @@ void EffectStackView::setModel(std::shared_ptr<EffectStackModel> model, const QS
void
EffectStackView
::
loadEffects
()
{
qDebug
()
<<
"MUTEX LOCK!!!!!!!!!!!! loadEffects: "
;
//QMutexLocker lock(&m_mutex);
int
max
=
m_model
->
rowCount
();
qDebug
()
<<
"MUTEX LOCK!!!!!!!!!!!! loadEffects COUNT: "
<<
max
;
if
(
max
==
0
)
{
// blank stack
ObjectId
item
=
m_model
->
getOwnerId
();
...
...
@@ -249,10 +249,10 @@ void EffectStackView::loadEffects()
activeIndex
=
ix
;
}
}
updateTreeHeight
();
if
(
activeIndex
.
isValid
())
{
doActivateEffect
(
active
,
activeIndex
);
doActivateEffect
(
active
,
activeIndex
,
true
);
}
updateTreeHeight
();
qDebug
()
<<
"MUTEX UNLOCK!!!!!!!!!!!! loadEffects"
;
}
...
...
@@ -411,14 +411,14 @@ void EffectStackView::switchCollapsed()
}
}
void
EffectStackView
::
doActivateEffect
(
int
row
,
QModelIndex
activeIx
)
void
EffectStackView
::
doActivateEffect
(
int
row
,
QModelIndex
activeIx
,
bool
force
)
{
int
currentActive
=
m_model
->
getActiveEffect
();
if
(
row
>
0
&&
row
==
currentActive
)
{
if
(
row
==
currentActive
&&
!
force
)
{
// Effect is already active
return
;
}
if
(
row
!=
currentActive
)
{
if
(
row
!=
currentActive
&&
currentActive
>
-
1
)
{
auto
item
=
m_model
->
getEffectStackRow
(
currentActive
);
QModelIndex
ix
=
m_model
->
getIndexFromItem
(
item
);
CollapsibleEffectView
*
w
=
static_cast
<
CollapsibleEffectView
*>
(
m_effectsTree
->
indexWidget
(
ix
));
...
...
src/effects/effectstack/view/effectstackview.hpp
View file @
8f0ae230
...
...
@@ -104,7 +104,7 @@ private slots:
void
slotActivateEffect
(
const
std
::
shared_ptr
<
EffectItemModel
>
&
effectModel
);
void
loadEffects
();
void
updateTreeHeight
();
void
doActivateEffect
(
int
row
,
QModelIndex
ix
);
void
doActivateEffect
(
int
row
,
QModelIndex
ix
,
bool
force
=
false
);
// void switchBuiltStack(bool show);
...
...
Eugen Mohr
@emohr
mentioned in issue
#578 (closed)
·
Feb 24, 2020
mentioned in issue
#578 (closed)
mentioned in issue #578
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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