Commit 919d26a7 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Do not reset keyframe type when editing effect with only one keyframe

parent 48d70a68
......@@ -871,14 +871,19 @@ void AnimationWidget::slotAdjustKeyframeValue(double value)
m_animController = m_animProperties.get_animation(m_inTimeline.toUtf8().constData());
int pos = m_ruler->position() - m_offset;
mlt_keyframe_type type = m_selectType->isEnabled() ? (mlt_keyframe_type) m_selectType->currentAction()->data().toInt() : (mlt_keyframe_type) KdenliveSettings::defaultkeyframeinterp();
if (m_animController.is_key(pos)) {
// This is a keyframe
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, (mlt_keyframe_type) m_selectType->currentAction()->data().toInt());
type = m_animController.keyframe_type(pos);
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged();
} else if (m_animController.key_count() <= 1) {
pos = m_animController.key_get_frame(0);
if (pos >= 0) {
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, (mlt_keyframe_type) m_selectType->currentAction()->data().toInt());
if (m_animController.is_key(pos)) {
type = m_animController.keyframe_type(pos);
}
m_animProperties.anim_set(m_inTimeline.toUtf8().constData(), value / slider->factor, pos, m_outPoint, type);
emit parameterChanged();
}
}
......
......@@ -277,7 +277,6 @@ EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, con
{
QString effectName;
QDomElement namenode = effect.firstChildElement(QStringLiteral("name"));
qDebug()<<"editing EFFECT; "<<namenode.text();
if (!namenode.isNull())
effectName = i18n(namenode.text().toUtf8().constData());
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment