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

Fix timeline corruption on title clips resize.

Fixes #1231
parent e858aed6
Pipeline #94281 canceled with stage
......@@ -195,6 +195,11 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
inPoint = 0;
}
bool closing = false;
// Ensure producer is long enough
if (m_endlessResize && outPoint > m_producer->parent().get_length()) {
m_producer->parent().set("length", outPoint + 1);
m_producer->parent().set("out", outPoint);
}
if (m_currentTrackId != -1) {
if (auto ptr = m_parent.lock()) {
if (ptr->getTrackById(m_currentTrackId)->isLocked()) {
......@@ -209,12 +214,6 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
qDebug() << "Error : Moving clip failed because parent timeline is not available anymore";
Q_ASSERT(false);
}
} else {
// Ensure producer is long enough
if (m_endlessResize && outPoint > m_producer->parent().get_length()) {
m_producer->set("length", outPoint + 1);
m_producer->set("out", outPoint);
}
}
QVector<int> roles{TimelineModel::DurationRole};
if (!right) {
......
Supports Markdown
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