Commit 7536ab68 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix editing bin clip does not invalidate timeline preview.

Fixes #307
parent 35b7decc
......@@ -3295,3 +3295,14 @@ void Bin::showBinFrame(QModelIndex ix, int frame)
}
}
}
void Bin::invalidateClip(const QString &binId)
{
std::shared_ptr<ProjectClip> clip = getBinClip(binId);
if (clip) {
QList<int> ids = clip->timelineInstances();
for (int i : ids) {
pCore->invalidateItem({ObjectType::TimelineClip,i});
}
}
}
......@@ -266,6 +266,8 @@ public:
QString getCurrentFolder();
/** @brief Save a clip zone as MLT playlist */
void saveZone(const QStringList &info, const QDir &dir);
/** @brief A bin clip changed (its effects), invalidate preview */
void invalidateClip(const QString &binId);
// TODO refac: remove this and call directly the function in ProjectItemModel
void cleanup();
......
......@@ -627,8 +627,11 @@ void Core::invalidateItem(ObjectId itemId)
case ObjectType::TimelineTrack:
// TODO: invalidate all clips in track
break;
case ObjectType::BinClip:
m_binWidget->invalidateClip(QString::number(itemId.second));
break;
default:
// bin clip should automatically be reloaded, compositions should not have effects
// compositions should not have effects
break;
}
}
......
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