Fix compilation

Fix effect presets
parent c0c83897
...@@ -152,7 +152,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int ...@@ -152,7 +152,7 @@ AnimationWidget::AnimationWidget(EffectMetaInfo *info, int clipPos, int min, int
break; break;
} }
connect(defaultInterp, SIGNAL(triggered(QAction*)), this, SLOT(slotSetDefaultInterp(QAction*))); connect(defaultInterp, SIGNAL(triggered(QAction*)), this, SLOT(slotSetDefaultInterp(QAction*)));
m_selectType->setToolBarMode(KSelectAction::MenuMode); m_selectType->setToolBarMode(KSelectAction::ComboBoxMode);
m_endAttach = new QAction(i18n("Attach keyframe to end"), this); m_endAttach = new QAction(i18n("Attach keyframe to end"), this);
m_endAttach->setCheckable(true); m_endAttach->setCheckable(true);
...@@ -988,11 +988,20 @@ void AnimationWidget::applyPreset(int ix) ...@@ -988,11 +988,20 @@ void AnimationWidget::applyPreset(int ix)
QStringList presetNames = entries.keys(); QStringList presetNames = entries.keys();
QStringList paramNames = m_doubleWidgets.keys(); QStringList paramNames = m_doubleWidgets.keys();
for (int i = 0; i < paramNames.count() && i < presetNames.count(); i++) { for (int i = 0; i < paramNames.count() && i < presetNames.count(); i++) {
QString keyframes = entries.value(presetNames.at(i)).toString(); QString keyframes = entries.value(paramNames.at(i)).toString();
m_animProperties.set(paramNames.at(i).toUtf8().constData(), keyframes.toUtf8().constData()); if (!keyframes.isEmpty()) {
m_animProperties.set(paramNames.at(i).toUtf8().constData(), keyframes.toUtf8().constData());
// Required to initialize anim property
m_animProperties.anim_get_int(m_inTimeline.toUtf8().constData(), 0, m_outPoint);
}
}
if (!m_rectParameter.isEmpty()) {
QString keyframes = entries.value(m_rectParameter).toString();
if (!keyframes.isEmpty()) {
m_animProperties.set(m_rectParameter.toUtf8().constData(), keyframes.toUtf8().constData());
m_animProperties.anim_get_rect(m_rectParameter.toUtf8().constData(), 0, m_outPoint);
}
} }
// Required to initialize anim property
m_animProperties.anim_get_int(m_inTimeline.toUtf8().constData(), 0);
m_animController = m_animProperties.get_animation(m_inTimeline.toUtf8().constData()); m_animController = m_animProperties.get_animation(m_inTimeline.toUtf8().constData());
rebuildKeyframes(); rebuildKeyframes();
emit parameterChanged(); emit parameterChanged();
......
...@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "klocalizedstring.h" #include "klocalizedstring.h"
#include "keyframeview.h" #include "keyframeview.h"
#include <../../media/home/data/downloads/git/kdenlive/src/mltcontroller/effectscontroller.h> #include "../mltcontroller/effectscontroller.h"
KeyframeView::KeyframeView(int handleSize, QObject *parent) : QObject(parent) KeyframeView::KeyframeView(int handleSize, QObject *parent) : QObject(parent)
, activeKeyframe(-1) , activeKeyframe(-1)
......
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