]> git.sesse.net Git - kdenlive/blobdiff - src/commands/addtimelineclipcommand.cpp
Const'ref
[kdenlive] / src / commands / addtimelineclipcommand.cpp
index 3a13ad54dc26844641b578695153a695a62e0379..5cc0fe70b096fabee11aba00a7ddaf955e19ae01 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <KLocale>
 
-AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent) :
+AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, const QDomElement &xml, const QString &clipId, const ItemInfo &info, const EffectsList &effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent) :
         QUndoCommand(parent),
         m_view(view),
         m_clipInfo(info),
@@ -37,25 +37,25 @@ AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElemen
 {
     if (!m_remove) setText(i18n("Add timeline clip"));
     else setText(i18n("Delete timeline clip"));
-    if (parent) {
-        // command has a parent, so there are several operations ongoing, do not refresh monitor
-        m_refresh = false;
-    } else m_refresh = true;
 }
 
 
 // virtual
 void AddTimelineClipCommand::undo()
 {
-    if (!m_remove) m_view->deleteClip(m_clipInfo, m_refresh);
-    else m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects, m_overwrite, m_push, m_refresh);
+    if (!m_remove)
+        m_view->deleteClip(m_clipInfo);
+    else
+        m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects, m_overwrite, m_push);
 }
 // virtual
 void AddTimelineClipCommand::redo()
 {
     if (m_doIt) {
-        if (!m_remove) m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects, m_overwrite, m_push, m_refresh);
-        else m_view->deleteClip(m_clipInfo, m_refresh);
+        if (!m_remove)
+            m_view->addClip(m_xml, m_clipId, m_clipInfo, m_effects, m_overwrite, m_push);
+        else
+            m_view->deleteClip(m_clipInfo);
     }
     m_doIt = true;
 }