]> git.sesse.net Git - kdenlive/commitdiff
Rotoscoping: Fix add/delete keyframes button icon incorrectly updated.
authorTill Theato <root@ttill.de>
Tue, 5 Apr 2011 14:32:20 +0000 (14:32 +0000)
committerTill Theato <root@ttill.de>
Tue, 5 Apr 2011 14:32:20 +0000 (14:32 +0000)
When at beginning and using "go to previous keyframe" or at the end and using "go to next keyframe" + there was a keyframe the icon turned to "add keyframe"

svn path=/trunk/kdenlive/; revision=5534

src/simplekeyframes/simpletimelinewidget.cpp

index e2c409bbdbdb4346256149d481bc31df625f2651..ab181e0b99b9420108a88fb1d90b3af7e2414b5d 100644 (file)
@@ -107,6 +107,9 @@ void SimpleTimelineWidget::setDuration(int dur)
 
 void SimpleTimelineWidget::slotGoToNext()
 {
+    if (m_position == m_duration)
+        return;
+
     foreach (const int &keyframe, m_keyframes) {
         if (keyframe > m_position) {
             slotSetPosition(keyframe);
@@ -124,6 +127,9 @@ void SimpleTimelineWidget::slotGoToNext()
 
 void SimpleTimelineWidget::slotGoToPrev()
 {
+    if (m_position == 0)
+        return;
+
     for (int i = m_keyframes.count() - 1; i >= 0; --i) {
         if (m_keyframes.at(i) < m_position) {
             slotSetPosition(m_keyframes.at(i));