]> git.sesse.net Git - kdenlive/blobdiff - src/editkeyframecommand.cpp
Introducing template based title clips
[kdenlive] / src / editkeyframecommand.cpp
index ab8ab5fd66205c4e1a6552818e01ed947e60f2d1..d946cc459772b2dab03cfdf39dc62abf4dd86ffd 100644 (file)
 
 #include <KLocale>
 
-EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) : m_view(view), m_track(track), m_pos(pos), m_index(effectIndex), m_oldkfr(oldkeyframes), m_newkfr(newkeyframes), m_doIt(doIt) {
+EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) :
+        QUndoCommand(),
+        m_view(view),
+        m_oldkfr(oldkeyframes),
+        m_newkfr(newkeyframes),
+        m_track(track),
+        m_index(effectIndex),
+        m_pos(pos),
+        m_doIt(doIt)
+{
     int prev = m_oldkfr.split(';', QString::SkipEmptyParts).count();
     int next = m_newkfr.split(';', QString::SkipEmptyParts).count();
     if (prev == next) setText(i18n("Edit keyframe"));
@@ -32,11 +41,13 @@ EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track,
 
 
 // virtual
-void EditKeyFrameCommand::undo() {
+void EditKeyFrameCommand::undo()
+{
     m_view->editKeyFrame(m_pos, m_track, m_index, m_oldkfr);
 }
 // virtual
-void EditKeyFrameCommand::redo() {
+void EditKeyFrameCommand::redo()
+{
     if (m_doIt) {
         m_view->editKeyFrame(m_pos, m_track, m_index, m_newkfr);
     }