* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#include <KLocale>
#include "razorclipcommand.h"
#include "customtrackview.h"
-RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, bool doIt) : m_view(view), m_info(info), m_cutTime(cutTime), m_doIt(doIt) {
+#include <KLocale>
+
+RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo info, const GenTime cutTime, QUndoCommand * parent) :
+ QUndoCommand(parent),
+ m_view(view),
+ m_info(info),
+ m_cutTime(cutTime)
+{
setText(i18n("Razor clip"));
}
-
// virtual
-void RazorClipCommand::undo() {
-// kDebug()<<"---- undoing action";
- m_doIt = true;
+void RazorClipCommand::undo()
+{
+ // kDebug()<<"---- undoing action";
m_view->cutClip(m_info, m_cutTime, false);
}
// virtual
-void RazorClipCommand::redo() {
- kDebug() << "---- redoing action cut: " << m_cutTime.frames(25);
- if (m_doIt)
+void RazorClipCommand::redo()
+{
+ // kDebug() << "---- redoing action cut: " << m_cutTime.frames(25);
m_view->cutClip(m_info, m_cutTime, true);
- m_doIt = true;
}