From 1cd3667dcea2cfb7e033a8d7c8c6e41bd3daaa6e Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 27 May 2024 12:22:08 +0300 Subject: [PATCH] EffectComposer: Fix channel property saving Channel properties were saved as regular int properties to .qep files, making the property control incorrect once you reopened it in effect composer. Fixes: QDS-12835 Change-Id: I833763f385e64420bc5f1a1da9266869e739d3be Reviewed-by: Mahmoud Badri --- src/plugins/effectcomposer/effectcomposermodel.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/effectcomposer/effectcomposermodel.cpp b/src/plugins/effectcomposer/effectcomposermodel.cpp index f90b450e7a4..43efefe51d6 100644 --- a/src/plugins/effectcomposer/effectcomposermodel.cpp +++ b/src/plugins/effectcomposer/effectcomposermodel.cpp @@ -518,11 +518,9 @@ QJsonObject nodeToJson(const CompositionNode &node) uniformObject.insert("type", type); - if (uniform->type() == Uniform::Type::Define || uniform->type() == Uniform::Type::Channel) { - QString controlType = Uniform::stringFromType(uniform->controlType()); - if (controlType != type) - uniformObject.insert("controlType", controlType); - } + QString controlType = Uniform::stringFromType(uniform->controlType()); + if (controlType != type) + uniformObject.insert("controlType", controlType); if (!uniform->displayName().isEmpty()) uniformObject.insert("displayName", QString(uniform->displayName())); @@ -544,7 +542,8 @@ QJsonObject nodeToJson(const CompositionNode &node) if (!uniform->description().isEmpty()) uniformObject.insert("description", uniform->description()); if (uniform->type() == Uniform::Type::Float - || uniform->type() == Uniform::Type::Int + || (uniform->type() == Uniform::Type::Int + && uniform->controlType() != Uniform::Type::Channel) || uniform->type() == Uniform::Type::Vec2 || uniform->type() == Uniform::Type::Vec3 || uniform->type() == Uniform::Type::Vec4