]> git.sesse.net Git - kdenlive/blobdiff - src/movetransitioncommand.cpp
Fetch audio thumbs one after another, so that we don't create hundreds of threads:
[kdenlive] / src / movetransitioncommand.cpp
index 40ba3e3f831024db5cde15023f233158613dae36..f825ed77c8b7cd987a52483b42402943baf2090a 100644 (file)
 
 #include <KLocale>
 
-MoveTransitionCommand::MoveTransitionCommand(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)
+MoveTransitionCommand::MoveTransitionCommand(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)
 {
     setText(i18n("Move transition"));
+    if (parent) {
+        // command has a parent, so there are several operations ongoing, do not refresh monitor
+        m_refresh = false;
+    } else m_refresh = true;
 }
 
 
@@ -31,14 +40,14 @@ void MoveTransitionCommand::undo()
 {
 // kDebug()<<"----  undoing action";
     m_doIt = true;
-    m_view->moveTransition(m_endPos, m_startPos);
+    m_view->moveTransition(m_endPos, m_startPos, m_refresh);
 }
 // virtual
 void MoveTransitionCommand::redo()
 {
-    kDebug() << "----  redoing action";
-    if (m_doIt) m_view->moveTransition(m_startPos, m_endPos);
+    //kDebug() << "----  redoing action";
+    if (m_doIt) m_view->moveTransition(m_startPos, m_endPos, m_refresh);
     m_doIt = true;
 }
 
-#include "moveclipcommand.moc"
+