Fix track effects cannot be disabled / deleted

Fix effects staying in track effectstack after redoing deletion
CCBUG: 357856
parent efede114
......@@ -318,7 +318,9 @@ void CollapsibleEffect::slotDisable(bool disable, bool emitInfo)
if (!disable || KdenliveSettings::disable_effect_parameters()) {
widgetFrame->setEnabled(!disable);
}
if (emitInfo) emit effectStateChanged(disable, effectIndex(), needsMonitorEffectScene());
if (emitInfo) {
emit effectStateChanged(disable, effectIndex(), needsMonitorEffectScene());
}
}
void CollapsibleEffect::slotDeleteEffect()
......
......@@ -265,20 +265,18 @@ void EffectStackView2::slotMasterClipItemSelected(ClipController* c, Monitor *m)
void EffectStackView2::slotTrackItemSelected(int ix, const TrackInfo &info, Monitor *m)
{
if (m_status == TIMELINE_TRACK && ix == m_trackindex) {
// Track effects already displayed
return;
if (m_status != TIMELINE_TRACK || ix != m_trackindex) {
m_clipref = NULL;
m_status = TIMELINE_TRACK;
m_effectMetaInfo.monitor = m;
m_currentEffectList = info.effectsList;
m_trackInfo = info;
m_clipref = NULL;
m_masterclipref = NULL;
m_ui.checkAll->setToolTip(QString());
m_ui.checkAll->setText(i18n("Effects for track %1", info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
}
m_clipref = NULL;
m_status = TIMELINE_TRACK;
m_effectMetaInfo.monitor = m;
m_currentEffectList = info.effectsList;
m_trackInfo = info;
m_clipref = NULL;
m_masterclipref = NULL;
setEnabled(true);
m_ui.checkAll->setToolTip(QString());
m_ui.checkAll->setText(i18n("Effects for track %1", info.trackName.isEmpty() ? QString::number(ix) : info.trackName));
m_ui.checkAll->setEnabled(true);
m_trackindex = ix;
setupListView();
......
......@@ -2388,12 +2388,13 @@ void CustomTrackView::updateEffectState(int track, GenTime pos, QList <int> effe
{
if (pos < GenTime()) {
// editing a track effect
if (!m_document->renderer()->mltEnableEffects(m_timeline->tracksCount() - track, pos, effectIndexes, disable)) {
if (!m_document->renderer()->mltEnableEffects(track, pos, effectIndexes, disable)) {
emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
return;
}
m_timeline->enableTrackEffects(track - 1, effectIndexes, disable);
m_timeline->enableTrackEffects(track, effectIndexes, disable);
emit updateTrackEffectState(track);
emit showTrackEffects(track, m_timeline->getTrackInfo(track));
return;
}
// editing a clip effect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment