From ad7ce4d41797792d4552ad264724f29750a858d5 Mon Sep 17 00:00:00 2001 From: Till Theato Date: Sat, 29 Jan 2011 22:22:50 +0000 Subject: [PATCH] keyframe editor: when adding a keyframe with last keyframe selected and not at the of the clip add keyframe at the end: http://kdenlive.org/mantis/view.php?id=1983 svn path=/trunk/kdenlive/; revision=5363 --- src/keyframeedit.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp index dcad0062..fd70c71a 100644 --- a/src/keyframeedit.cpp +++ b/src/keyframeedit.cpp @@ -204,8 +204,14 @@ void KeyframeEdit::slotAddKeyframe() result = m_min; } } else { - int pos2 = getPos(row - 1); - result = pos2 + (pos1 - pos2) / 2; + if (pos1 < m_max - 1) { + // last keyframe selected and it is not at end of clip -> add keyframe at the end + result = m_max - 1; + newrow++; + } else { + int pos2 = getPos(row - 1); + result = pos2 + (pos1 - pos2) / 2; + } } keyframe_list->insertRow(newrow); -- 2.39.2