X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Faddclipcommand.cpp;h=44df4d5b11c9f57ef593ceb3bc7ba7a919f3773a;hb=5143c0fd6b774ee8a036427bb1630126270a6364;hp=e1e5ca736d12cd7e8a32aa910556e075becba8e5;hpb=6ebc4a2b41a1ac5c1edcdbe927bd8011f66d4834;p=kdenlive diff --git a/src/addclipcommand.cpp b/src/addclipcommand.cpp index e1e5ca73..44df4d5b 100644 --- a/src/addclipcommand.cpp +++ b/src/addclipcommand.cpp @@ -17,29 +17,36 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#include #include "addclipcommand.h" #include "kdenlivedoc.h" -AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const uint id, bool doIt) - : m_doc(doc), m_xml(xml), m_id(id), m_doIt(doIt) { +#include + +AddClipCommand::AddClipCommand(KdenliveDoc *doc, const QDomElement &xml, const QString &id, bool doIt, QUndoCommand * parent) : + QUndoCommand(parent), + m_doc(doc), + m_xml(xml), + m_id(id), + m_doIt(doIt) +{ if (doIt) setText(i18n("Add clip")); else setText(i18n("Delete clip")); } // virtual -void AddClipCommand::undo() { +void AddClipCommand::undo() +{ kDebug() << "---- undoing action"; if (m_doIt) m_doc->deleteClip(m_id); else m_doc->addClip(m_xml, m_id); } // virtual -void AddClipCommand::redo() { +void AddClipCommand::redo() +{ kDebug() << "---- redoing action"; if (m_doIt) m_doc->addClip(m_xml, m_id); else m_doc->deleteClip(m_id); } -#include "addclipcommand.moc"