Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Prevent crash when loading clip if producer is not ready, clear effectstack...

Prevent crash when loading clip if producer is not ready, clear effectstack when deselecting bin clip
parent 5eca0d46
......@@ -64,6 +64,10 @@ void AssetPanel::showTransition(int tid, std::shared_ptr<AssetParameterModel> tr
void AssetPanel::showEffectStack(const QString &clipName, std::shared_ptr<EffectStackModel> effectsModel, QPair<int, int> range)
{
clear();
if (effectsModel == nullptr) {
// Item is not ready
return;
}
m_assetTitle->setText(i18n("%1 effects", clipName));
m_effectStackWidget->setVisible(true);
m_effectStackWidget->setModel(effectsModel, range);
......
......@@ -1488,6 +1488,8 @@ void Bin::selectProxyModel(const QModelIndex &id)
showClipProperties(nullptr);
emit findInTimeline(QString());
emit requestClipShow(nullptr);
// clear effect stack
emit requestShowEffectStack(QString(), nullptr, QPair<int, int>());
// Display black bg in clip monitor
emit openClip(std::shared_ptr<ProjectClip>());
}
......@@ -2474,7 +2476,7 @@ void Bin::editMasterEffect(std::shared_ptr<AbstractProjectItem> clip)
return;
}
}
emit requestHideEffectStack();
emit requestShowEffectStack(QString(), nullptr, QPair<int, int>());
}
void Bin::slotGotFocus()
......
......@@ -532,8 +532,6 @@ signals:
void refreshTimeCode();
/** @brief Request display of effect stack for a Bin clip. */
void requestShowEffectStack(const QString &clipName, std::shared_ptr<EffectStackModel>, QPair<int, int> range);
/** @brief Request that the current effect stack is hidden */
void requestHideEffectStack();
/** @brief Request that the given clip is displayed in the clip monitor */
void requestClipShow(std::shared_ptr<ProjectClip>);
void displayBinMessage(const QString &, KMessageWidget::MessageType);
......
......@@ -89,6 +89,7 @@ ClipController::ClipController(std::shared_ptr<BinController> bincontroller)
, m_hasLimitedDuration(true)
, m_binController(bincontroller)
, m_snapMarkers(QList<CommentedTime>())
, m_effectStack(nullptr)
{
m_producerLock.lock();
}
......
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