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

Fix crash on exit when a mix is selected

parent 91601f5a
Pipeline #64876 canceled with stage
......@@ -98,6 +98,8 @@ void TimelineController::prepareClose()
disconnect(m_model.get(), &TimelineModel::selectionChanged, this, &TimelineController::selectionChanged);
disconnect(this, &TimelineController::videoTargetChanged, this, &TimelineController::updateVideoTarget);
disconnect(this, &TimelineController::audioTargetChanged, this, &TimelineController::updateAudioTarget);
disconnect(m_model.get(), &TimelineModel::selectedMixChanged, this, &TimelineController::showMixModel);
disconnect(m_model.get(), &TimelineModel::selectedMixChanged, this, &TimelineController::selectedMixChanged);
m_ready = false;
m_root = nullptr;
// Delete timeline preview before resetting model so that removing clips from timeline doesn't invalidate
......@@ -133,10 +135,8 @@ void TimelineController::setModel(std::shared_ptr<TimelineItemModel> model)
connect(m_model.get(), &TimelineModel::invalidateZone, this, &TimelineController::invalidateZone, Qt::DirectConnection);
connect(m_model.get(), &TimelineModel::durationUpdated, this, &TimelineController::checkDuration);
connect(m_model.get(), &TimelineModel::selectionChanged, this, &TimelineController::selectionChanged);
connect(m_model.get(), &TimelineModel::selectedMixChanged, [this] (int cid, const std::shared_ptr<AssetParameterModel> &asset) {
emit showMixModel(cid, asset);
emit selectedMixChanged();
});
connect(m_model.get(), &TimelineModel::selectedMixChanged, this, &TimelineController::showMixModel);
connect(m_model.get(), &TimelineModel::selectedMixChanged, this, &TimelineController::selectedMixChanged);
connect(m_model.get(), &TimelineModel::checkTrackDeletion, this, &TimelineController::checkTrackDeletion, Qt::DirectConnection);
}
......
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