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

Fix compile failure after last merge

parent 476ab336
Pipeline #104729 passed with stage
in 11 minutes and 8 seconds
......@@ -410,3 +410,13 @@ bool EffectsRepository::isAudioEffect(const QString &assetId) const
}
return false;
}
bool EffectsRepository::isTextEffect(const QString &assetId) const
{
if (m_assets.count(assetId) > 0) {
if (m_assets.at(assetId).type == AssetListType::AssetType::Text) {
return true;
}
}
return false;
}
......@@ -40,7 +40,10 @@ public:
/** @brief Returns true if this is an effect group */
bool isGroup(const QString &assetId) const;
void deleteEffect(const QString &id);
/** @brief Returns true if effect is audio */
bool isAudioEffect(const QString &assetId) const;
/** @brief Returns true if effect is text */
bool isTextEffect(const QString &assetId) const;
protected:
/** @brief Constructor is protected because class is a Singleton */
......
......@@ -727,7 +727,7 @@ bool ClipModel::addEffect(const QString &effectId)
} else if (m_currentState == PlaylistState::AudioOnly) {
return false;
}
if (type == AssetListType::AssetType::Text && m_clipType != ClipType::Text) {
if (EffectsRepository::get()->isTextEffect(effectId) && m_clipType != ClipType::Text) {
return false;
}
m_effectStack->appendEffect(effectId, true);
......
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