]> git.sesse.net Git - kdenlive/blobdiff - src/commands/addtransitioncommand.cpp
Integrate with the required MLT hooks for getting Movit to work.
[kdenlive] / src / commands / addtransitioncommand.cpp
index 6e372bb26af5c0b9c6eab00b0976e988afec6eca..ead49b62172c8174b4953b5ff79a383fdfb8383a 100644 (file)
@@ -19,7 +19,7 @@
 #include "addtransitioncommand.h"
 #include "customtrackview.h"
 
-#include <KLocale>
+#include <KLocalizedString>
 
 AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement &params, bool remove, bool doIt, QUndoCommand * parent) :
         QUndoCommand(parent),
@@ -30,27 +30,36 @@ AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo
         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;
 }