From cc442211bc4a473116009920b495bd9c5ac09284 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 17 Jan 2019 22:36:17 +1100 Subject: [PATCH] fixed bug copying clip with unkeyframable rows --- project/effectrow.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/project/effectrow.cpp b/project/effectrow.cpp index 9998ad189..d40c77bcf 100644 --- a/project/effectrow.cpp +++ b/project/effectrow.cpp @@ -31,9 +31,10 @@ EffectRow::EffectRow(Effect *parent, bool save, QGridLayout *uilayout, const QSt column_count = 1; - if (parent_effect->meta != nullptr - && parent_effect->meta->type != EFFECT_TYPE_TRANSITION - && keyframable) { + keyframe_nav = nullptr; + if (parent_effect->meta != nullptr + && parent_effect->meta->type != EFFECT_TYPE_TRANSITION + && keyframable) { connect(label, SIGNAL(clicked()), this, SLOT(focus_row())); keyframe_nav = new KeyframeNavigator(); @@ -53,7 +54,9 @@ bool EffectRow::isKeyframing() { void EffectRow::setKeyframing(bool b) { if (parent_effect->meta->type != EFFECT_TYPE_TRANSITION) { keyframing = b; - keyframe_nav->enable_keyframes(b); + if (keyframe_nav != nullptr) { + keyframe_nav->enable_keyframes(b); + } } } @@ -64,10 +67,10 @@ void EffectRow::set_keyframe_enabled(bool enabled) { set_keyframe_now(ca); undo_stack.push(ca); } else { - if (QMessageBox::question(panel_effect_controls, - tr("Disable Keyframes"), - tr("Disabling keyframes will delete all current keyframes. Are you sure you want to do this?"), - QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) { + if (QMessageBox::question(panel_effect_controls, + tr("Disable Keyframes"), + tr("Disabling keyframes will delete all current keyframes. Are you sure you want to do this?"), + QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes) { // clear ComboAction* ca = new ComboAction(); for (int i=0;i