Allow custom comments in effect groups

parent c9fda75c
Pipeline #37627 passed with stage
in 15 minutes and 16 seconds
......@@ -219,8 +219,11 @@ void EffectTreeModel::editCustomAsset(const QString newName,const QString newDes
QDomElement newNodeTag = doc.createElement(QString("description"));
QDomText text = doc.createTextNode(newDescription);
newNodeTag.appendChild(text);
root.replaceChild(newNodeTag, nodelist);
if (!nodelist.isNull()) {
root.replaceChild(newNodeTag, nodelist);
} else {
root.appendChild(newNodeTag);
}
}
if(!newName.trimmed().isEmpty() && newName != currentName)
......
......@@ -80,6 +80,7 @@ void EffectsRepository::parseCustomAssetFile(const QString &file_name, std::unor
//qDebug() << "Error: found unsupported effect group" << base.attribute(QStringLiteral("name"))<<" : "<<file_name;
Info result;
result.xml = base;
result.description = Xml::getSubTagContent(base, QStringLiteral("description"));
for (int i = 0; i < effects.count(); ++i) {
QDomNode currentNode = effects.item(i);
if (currentNode.isNull()) {
......
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