From 9be27b5c06463db569559fdf190a722218b28e88 Mon Sep 17 00:00:00 2001 From: Till Theato Date: Tue, 5 Apr 2011 14:32:20 +0000 Subject: [PATCH] Rotoscoping: Fix add/delete keyframes button icon incorrectly updated. 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/simplekeyframes/simpletimelinewidget.cpp b/src/simplekeyframes/simpletimelinewidget.cpp index e2c409bb..ab181e0b 100644 --- a/src/simplekeyframes/simpletimelinewidget.cpp +++ b/src/simplekeyframes/simpletimelinewidget.cpp @@ -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)); -- 2.39.2