]> git.sesse.net Git - kdenlive/blobdiff - src/keyframeedit.cpp
Fix keyframes in keyframeedit not added at the very end
[kdenlive] / src / keyframeedit.cpp
index fe26d5cdb3f88d9568d17ec57bcb3e3364df0a56..317cd90c818927bfce327fd4f04ea5cf1d4e95f1 100644 (file)
@@ -192,15 +192,15 @@ void KeyframeEdit::slotAddKeyframe()
         newrow++;
     } else if (row == 0) {
         if (pos1 == m_min) {
-            result = m_max - 1;
+            result = m_max;
             newrow++;
         } else {
             result = m_min;
         }
     } else {
-        if (pos1 < m_max - 1) {
+        if (pos1 < m_max) {
             // last keyframe selected and it is not at end of clip -> add keyframe at the end
-            result = m_max - 1;
+            result = m_max;
             newrow++;
         } else {
             int pos2 = getPos(row - 1);