]> git.sesse.net Git - kdenlive/blobdiff - src/commands/moveeffectcommand.cpp
Use const'ref
[kdenlive] / src / commands / moveeffectcommand.cpp
index ba87dc3ddcb54ef9a25066f49376606a0f6de10d..c077128803d5e048199b9069d956e23eca13dc19 100644 (file)
 
 #include <KLocale>
 
-MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, int oldPos, int newPos, QUndoCommand * parent) :
+MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QList<int> &oldPos, int newPos, QUndoCommand * parent) :
         QUndoCommand(parent),
         m_view(view),
         m_track(track),
         m_oldindex(oldPos),
-        m_newindex(newPos),
         m_pos(pos)
 {
+    for (int i = 0; i < m_oldindex.count(); i++) {
+       m_newindex << newPos + i;
+    }
     /*    QString effectName;
         QDomElement namenode = effect.firstChildElement("name");
         if (!namenode.isNull()) effectName = i18n(namenode.text().toUtf8().data());
@@ -48,6 +50,7 @@ int MoveEffectCommand::id() const
 // virtual
 bool MoveEffectCommand::mergeWith(const QUndoCommand * other)
 {
+    return false;
     if (other->id() != id()) return false;
     if (m_track != static_cast<const MoveEffectCommand*>(other)->m_track) return false;
     if (m_pos != static_cast<const MoveEffectCommand*>(other)->m_pos) return false;