From 9b74fbe71510e02a317ff8a36f754a09757e08f3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Fri, 12 Jun 2009 23:02:07 +0000 Subject: [PATCH] Fix bug in add /paste effect to clip group svn path=/trunk/kdenlive/; revision=3525 --- src/addeffectcommand.cpp | 2 +- src/customtrackview.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/addeffectcommand.cpp b/src/addeffectcommand.cpp index 91e1eb95..1ee52974 100644 --- a/src/addeffectcommand.cpp +++ b/src/addeffectcommand.cpp @@ -27,7 +27,7 @@ AddEffectCommand::AddEffectCommand(CustomTrackView *view, const int track, GenTi QUndoCommand(parent), m_view(view), m_track(track), - m_effect(effect), + m_effect(effect.cloneNode().toElement()), m_pos(pos), m_doIt(doIt) { diff --git a/src/customtrackview.cpp b/src/customtrackview.cpp index d48c697e..f73e49c3 100644 --- a/src/customtrackview.cpp +++ b/src/customtrackview.cpp @@ -1269,14 +1269,13 @@ void CustomTrackView::slotAddGroupEffect(QDomElement effect, AbstractGroupItem * if (item->isItemLocked()) { continue; } - QDomElement itemEffect = effect.cloneNode().toElement(); - item->initEffect(itemEffect); + item->initEffect(effect); if (effect.attribute("tag") == "ladspa") { QString ladpsaFile = m_document->getLadspaFile(); initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect)); - itemEffect.setAttribute("src", ladpsaFile); + effect.setAttribute("src", ladpsaFile); } - new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), itemEffect, true, effectCommand); + new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), effect, true, effectCommand); count++; } } -- 2.39.2