Commit 37f2d6a6 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix track effects don't invalidate timeline preview

parent 95193a44
......@@ -625,7 +625,7 @@ void Core::invalidateItem(ObjectId itemId)
m_mainWindow->getCurrentTimeline()->controller()->invalidateItem(itemId.second);
break;
case ObjectType::TimelineTrack:
// TODO: invalidate all clips in track
m_mainWindow->getCurrentTimeline()->controller()->invalidateTrack(itemId.second);
break;
case ObjectType::BinClip:
m_binWidget->invalidateClip(QString::number(itemId.second));
......
......@@ -1511,6 +1511,16 @@ void TimelineController::invalidateItem(int cid)
m_timelinePreview->invalidatePreview(start, end);
}
void TimelineController::invalidateTrack(int tid)
{
if (!m_timelinePreview || !m_model->isTrack(tid)) {
return;
}
for (auto clp : m_model->getTrackById_const(tid)->m_allClips) {
invalidateItem(clp.first);
}
}
void TimelineController::invalidateZone(int in, int out)
{
if (!m_timelinePreview) {
......
......@@ -476,6 +476,7 @@ public slots:
/** @brief Dis / enable timeline preview. */
void disablePreview(bool disable);
void invalidateItem(int cid);
void invalidateTrack(int tid);
void invalidateZone(int in, int out);
void checkDuration();
/** @brief Dis / enable multi track view. */
......
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