X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Frazorclipcommand.cpp;h=ba2099ab3912d33557a196ff013bb856ede28f14;hb=483f57143911f2c00a63e418e78ff8403340e33a;hp=d3b8a5cd44ad510c799de50d3ea0de77df3ad398;hpb=e0a70e0428309070f6ed2716beaeaaba05edd3b5;p=kdenlive diff --git a/src/commands/razorclipcommand.cpp b/src/commands/razorclipcommand.cpp index d3b8a5cd..ba2099ab 100644 --- a/src/commands/razorclipcommand.cpp +++ b/src/commands/razorclipcommand.cpp @@ -18,18 +18,19 @@ ***************************************************************************/ -#include "commands/razorclipcommand.h" +#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; }