X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Faddmarkercommand.cpp;h=bc6d73207d874b55f167ede86b9f01a4b3b1a52c;hb=d5577be106561d978a574f393fadc27ae8fcbd2a;hp=e3287ec96a66ec85f815d816cca9d2a3a6eb336c;hpb=c42a026234a44a2d766e57bc64a6ac7bbd094000;p=kdenlive diff --git a/src/addmarkercommand.cpp b/src/addmarkercommand.cpp index e3287ec9..bc6d7320 100644 --- a/src/addmarkercommand.cpp +++ b/src/addmarkercommand.cpp @@ -21,7 +21,13 @@ #include -AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldcomment(oldcomment), m_comment(comment), m_id(id), m_pos(pos), m_doIt(doIt) +AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const QString &oldcomment, const QString &comment, const QString &id, const GenTime &pos, QUndoCommand * parent) : + QUndoCommand(parent), + m_view(view), + m_oldcomment(oldcomment), + m_comment(comment), + m_id(id), + m_pos(pos) { if (m_comment.isEmpty()) setText(i18n("Delete marker")); else if (m_oldcomment.isEmpty()) setText(i18n("Add marker")); @@ -37,9 +43,6 @@ void AddMarkerCommand::undo() // virtual void AddMarkerCommand::redo() { - if (m_doIt) { - m_view->addMarker(m_id, m_pos, m_comment); - } - m_doIt = true; + m_view->addMarker(m_id, m_pos, m_comment); }