]> git.sesse.net Git - kdenlive/blobdiff - src/resizeclipcommand.cpp
Refactor representation of 2pass in profiles.
[kdenlive] / src / resizeclipcommand.cpp
index f76c7687069d1de9f8973c63aa94fff6449c19dd..9cde2c4bf7a16e5c2b35f253d1280c11559e0996 100644 (file)
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA          *
  ***************************************************************************/
 
-#include <KLocale>
 
 #include "resizeclipcommand.h"
 #include "customtrackview.h"
 
-ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), m_endPos(end), m_doIt(doIt) {
+#include <KLocale>
+
+ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, bool dontWorry, QUndoCommand * parent) :
+        QUndoCommand(parent),
+        m_view(view),
+        m_startPos(start),
+        m_endPos(end),
+        m_doIt(doIt),
+        m_dontWorry(dontWorry)
+{
     setText(i18n("Resize clip"));
 }
 
 // virtual
-void ResizeClipCommand::undo() {
-// kDebug()<<"----  undoing action";
-    m_doIt = true;
-    if (m_doIt) m_view->resizeClip(m_endPos, m_startPos);
+void ResizeClipCommand::undo()
+{
+    m_view->resizeClip(m_endPos, m_startPos, m_dontWorry);
 }
 // virtual
-void ResizeClipCommand::redo() {
-    kDebug() << "----  redoing action";
-    if (m_doIt) m_view->resizeClip(m_startPos, m_endPos);
+void ResizeClipCommand::redo()
+{
+    if (m_doIt) m_view->resizeClip(m_startPos, m_endPos, m_dontWorry);
     m_doIt = true;
 }