]> git.sesse.net Git - kdenlive/blobdiff - src/abstractclipitem.cpp
Fix keyframes in timeline cannot be dragged to beginning of clip. Also fixes painting...
[kdenlive] / src / abstractclipitem.cpp
index c6f879fd7ebf1eef7868bb941e11a30ae9919a79..b78aed2e41480f133e06fe2f1bd148d23e5c8446 100644 (file)
@@ -343,9 +343,9 @@ void AbstractClipItem::updateSelectedKeyFrame()
     QRectF br = sceneBoundingRect();
     double maxw = br.width() / cropDuration().frames(m_fps);
     double maxh = br.height() / 100.0 * m_keyframeFactor;
-    update(br.x() + maxw *(m_selectedKeyframe - cropStart().frames(m_fps)) - 3, br.bottom() - m_keyframes[m_selectedKeyframe] * maxh - 3, 12, 12);
+    update(br.x() + maxw *(m_selectedKeyframe - cropStart().frames(m_fps)) - 3, br.bottom() - m_keyframes.value(m_selectedKeyframe) * maxh - 3, 12, 12);
     m_selectedKeyframe = m_editedKeyframe;
-    update(br.x() + maxw *(m_selectedKeyframe - cropStart().frames(m_fps)) - 3, br.bottom() - m_keyframes[m_selectedKeyframe] * maxh - 3, 12, 12);
+    update(br.x() + maxw *(m_selectedKeyframe - cropStart().frames(m_fps)) - 3, br.bottom() - m_keyframes.value(m_selectedKeyframe) * maxh - 3, 12, 12);
 }
 
 int AbstractClipItem::editedKeyFramePos() const