]> git.sesse.net Git - kdenlive/commitdiff
Resetting an effect should not loose the filter id
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 2 Mar 2008 20:33:00 +0000 (20:33 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 2 Mar 2008 20:33:00 +0000 (20:33 +0000)
svn path=/branches/KDE4/; revision=1983

src/customtrackview.cpp
src/effectstackview.cpp

index 82dc57de1df51dcebf8a298926bacd0954d77c98..0a6a78c29976c083ae9728684fb8d8a028cd0435 100644 (file)
@@ -409,7 +409,8 @@ void CustomTrackView::slotAddEffect(QDomElement effect, GenTime pos, int track)
       ClipItem *item = (ClipItem *)itemList.at(i);
       // the kdenlive_ix int is used to identify an effect in mlt's playlist, should
       // not be changed
-      effect.setAttribute("kdenlive_ix", QString::number(item->effectsCounter()));
+      if (effect.attribute("kdenlive_ix").toInt() == 0)
+       effect.setAttribute("kdenlive_ix", QString::number(item->effectsCounter()));
       AddEffectCommand *command = new AddEffectCommand(this, m_tracksCount - item->track(),GenTime(item->startPos(), m_document->fps()), effect, true);
       m_commandStack->push(command);    
     }
index 4f5a4b25934241e20e22852178a39eebae90819f..655b0d5888f6b3889ac456fc5418c3111d0fde4b 100644 (file)
@@ -176,6 +176,7 @@ void EffectStackView::slotResetEffect()
                }
        }
        if (!dom.isNull()) {
+           dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
            emit updateClipEffect(clipref, old, dom);
            slotItemSelectionChanged();
        }