X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Faddtimelineclipcommand.cpp;h=4cd39a7a9aaee807378ec94256efa9d288d01b84;hb=56aee6aedeeed3efd10ada8fe3c229eddc01ef05;hp=3a13ad54dc26844641b578695153a695a62e0379;hpb=bae96d4b906092465a7624195a55b6527529cd7c;p=kdenlive diff --git a/src/commands/addtimelineclipcommand.cpp b/src/commands/addtimelineclipcommand.cpp index 3a13ad54..4cd39a7a 100644 --- a/src/commands/addtimelineclipcommand.cpp +++ b/src/commands/addtimelineclipcommand.cpp @@ -21,9 +21,9 @@ #include "addtimelineclipcommand.h" #include "customtrackview.h" -#include +#include -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; }