forked from qt-creator/qt-creator
EffectMaker: Fix node enabled doesn't save
Fixes: QDS-11611 Change-Id: Ib9dbe5794fa5700f74756eae43efc1db8bfb8a40 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -113,6 +113,9 @@ void CompositionNode::parse(const QString &effectName, const QString &qenPath, c
|
||||
m_fragmentCode = EffectUtils::codeFromJsonArray(json.value("fragmentCode").toArray());
|
||||
m_vertexCode = EffectUtils::codeFromJsonArray(json.value("vertexCode").toArray());
|
||||
|
||||
if (json.contains("enabled"))
|
||||
m_isEnabled = json["enabled"].toBool();
|
||||
|
||||
m_id = json.value("id").toString();
|
||||
if (m_id.isEmpty() && !qenPath.isEmpty()) {
|
||||
QString fileName = qenPath.split('/').last();
|
||||
|
@@ -87,6 +87,7 @@ bool EffectMakerModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
if (role == EnabledRole) {
|
||||
m_nodes.at(index.row())->setIsEnabled(value.toBool());
|
||||
bakeShaders();
|
||||
setHasUnsavedChanges(true);
|
||||
|
||||
emit dataChanged(index, index, {role});
|
||||
}
|
||||
|
Reference in New Issue
Block a user