]> git.sesse.net Git - kdenlive/blobdiff - src/razorclipcommand.cpp
Improve reloading of externally modified clips (wait for 1.5 second before reloading...
[kdenlive] / src / razorclipcommand.cpp
index 32f4194dacfc16bdfd77342a83f32e19ca02e4a6..023f39f8c7ab8d33253aa4d52c80bf012ff3e696 100644 (file)
 
 #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)
+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)
 {
     setText(i18n("Razor clip"));
 }
@@ -38,6 +43,7 @@ void RazorClipCommand::undo()
 void RazorClipCommand::redo()
 {
     // kDebug() << "----  redoing action cut: " << m_cutTime.frames(25);
-        m_view->cutClip(m_info, m_cutTime, true);
+    if (m_doIt) m_view->cutClip(m_info, m_cutTime, true);
+    m_doIt = true;
 }