X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcommands%2Feditkeyframecommand.cpp;h=87676bbf979cd2e216ea1e538456085e0a126b10;hb=17adadd166051add81f88643f9192172b367ead6;hp=29c341ca24e47991373dbe0f55cd9c5ef2dd760a;hpb=87914857d36c5b051b006f3f74d489af3801af4d;p=kdenlive diff --git a/src/commands/editkeyframecommand.cpp b/src/commands/editkeyframecommand.cpp index 29c341ca..87676bbf 100644 --- a/src/commands/editkeyframecommand.cpp +++ b/src/commands/editkeyframecommand.cpp @@ -19,23 +19,26 @@ #include "editkeyframecommand.h" #include "customtrackview.h" -#include - -EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, GenTime pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) : - QUndoCommand(), - m_view(view), - m_oldkfr(oldkeyframes), - m_newkfr(newkeyframes), - m_track(track), - m_index(effectIndex), - m_pos(pos), - m_doIt(doIt) +#include + +EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, const GenTime &pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) : + QUndoCommand(), + m_view(view), + m_oldkfr(oldkeyframes), + m_newkfr(newkeyframes), + m_track(track), + m_index(effectIndex), + m_pos(pos), + m_doIt(doIt) { - int prev = m_oldkfr.split(';', QString::SkipEmptyParts).count(); - int next = m_newkfr.split(';', QString::SkipEmptyParts).count(); - if (prev == next) setText(i18n("Edit keyframe")); - else if (prev > next) setText(i18n("Delete keyframe")); - else setText(i18n("Add keyframe")); + int prev = m_oldkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count(); + int next = m_newkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count(); + if (prev == next) + setText(i18n("Edit keyframe")); + else if (prev > next) + setText(i18n("Delete keyframe")); + else + setText(i18n("Add keyframe")); //kDebug() << "/// CREATE GUIDE COMMAND, TIMES: " << m_oldPos.frames(25) << "x" << m_pos.frames(25); }