X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Frazorclipcommand.cpp;h=ba2099ab3912d33557a196ff013bb856ede28f14;hb=5d4746e4c3e8665de83e6d281dcd08a46cd22c31;hp=023f39f8c7ab8d33253aa4d52c80bf012ff3e696;hpb=bae96d4b906092465a7624195a55b6527529cd7c;p=kdenlive diff --git a/src/commands/razorclipcommand.cpp b/src/commands/razorclipcommand.cpp index 023f39f8..ba2099ab 100644 --- a/src/commands/razorclipcommand.cpp +++ b/src/commands/razorclipcommand.cpp @@ -21,15 +21,16 @@ #include "razorclipcommand.h" #include "customtrackview.h" -#include +#include -RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, bool doIt, QUndoCommand * parent) : - QUndoCommand(parent), - m_view(view), - m_info(info), - m_cutTime(cutTime), - m_doIt(doIt) +RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt, QUndoCommand * parent) : + QUndoCommand(parent), + m_view(view), + m_info(info), + m_cutTime(cutTime), + m_doIt(doIt) { + m_originalStack.clone(stack); setText(i18n("Razor clip")); } @@ -37,13 +38,15 @@ RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, c void RazorClipCommand::undo() { // kDebug()<<"---- undoing action"; - m_view->cutClip(m_info, m_cutTime, false); + m_view->cutClip(m_info, m_cutTime, false, m_originalStack); } // virtual void RazorClipCommand::redo() { // kDebug() << "---- redoing action cut: " << m_cutTime.frames(25); - if (m_doIt) m_view->cutClip(m_info, m_cutTime, true); + if (m_doIt) { + m_view->cutClip(m_info, m_cutTime, true); + } m_doIt = true; }