]> git.sesse.net Git - kdenlive/blobdiff - src/commands/addtransitioncommand.cpp
Const'ref
[kdenlive] / src / commands / addtransitioncommand.cpp
index 22912c325f9f5a9f1c06170c7dd271e6bfc60280..8a8002f2b077bf2a9026bdcf26b75489ab5f517c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <KLocale>
 
-AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent) :
+AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent) :
         QUndoCommand(parent),
         m_view(view),
         m_info(info),
@@ -30,27 +30,36 @@ AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info,
         m_doIt(doIt),
         m_remove(remove)
 {
-    if (m_remove) setText(i18n("Delete transition from clip"));
-    else setText(i18n("Add transition to clip"));
+    if (m_remove)
+        setText(i18n("Delete transition from clip"));
+    else
+        setText(i18n("Add transition to clip"));
+
     if (parent) {
         // command has a parent, so there are several operations ongoing, do not refresh monitor
         m_refresh = false;
-    } else m_refresh = true;
+    } else {
+        m_refresh = true;
+    }
 }
 
 
 // virtual
 void AddTransitionCommand::undo()
 {
-    if (m_remove) m_view->addTransition(m_info, m_track, m_params, m_refresh);
-    else m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
+    if (m_remove)
+        m_view->addTransition(m_info, m_track, m_params, m_refresh);
+    else
+        m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
 }
 // virtual
 void AddTransitionCommand::redo()
 {
     if (m_doIt) {
-        if (m_remove) m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
-        else m_view->addTransition(m_info, m_track, m_params, m_refresh);
+        if (m_remove)
+            m_view->deleteTransition(m_info, m_track, m_params, m_refresh);
+        else
+            m_view->addTransition(m_info, m_track, m_params, m_refresh);
     }
     m_doIt = true;
 }