Commit 96d86795 authored by Nicolas Carion's avatar Nicolas Carion

Fix refreshing producer when changing tracks

parent 54674d45
Pipeline #1453 passed with stage
in 14 minutes and 45 seconds
......@@ -515,10 +515,10 @@ void ClipModel::setCurrentTrackId(int tid, bool finalMove)
if (tid == m_currentTrackId) {
return;
}
MoveableItem::setCurrentTrackId(tid, finalMove);
if (finalMove) {
if (finalMove && tid != -1) {
refreshProducerFromBin(m_currentState);
}
MoveableItem::setCurrentTrackId(tid, finalMove);
}
Fun ClipModel::setClipState_lambda(PlaylistState::ClipState state)
......
......@@ -126,6 +126,12 @@ Fun TrackModel::requestClipInsertion_lambda(int clipId, int position, bool updat
// Find out the clip id at position
int target_clip = m_playlists[0].get_clip_index_at(position);
int count = m_playlists[0].count();
if (auto ptr = m_parent.lock()) {
Q_ASSERT(ptr->getClipPtr(clipId)->getCurrentTrackId() == -1);
} else {
qDebug() << "impossible to get parent timeline";
Q_ASSERT(false);
}
// we create the function that has to be executed after the melt order. This is essentially book-keeping
auto end_function = [clipId, this, position, updateView, finalMove]() {
......
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