From f71136fd4666d36e0504118fce3bd84d6c468779 Mon Sep 17 00:00:00 2001 From: Almamu Date: Fri, 8 Nov 2024 03:44:44 +0100 Subject: [PATCH] fix: #256 non-string properties weren't supported --- src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp b/src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp index c6aeac4..60d782f 100644 --- a/src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp +++ b/src/WallpaperEngine/Core/Projects/CPropertyCombo.cpp @@ -13,7 +13,7 @@ CPropertyCombo* CPropertyCombo::fromJSON (json data, const std::string& name) { const auto text = jsonFindDefault (data, "text", ""); const auto options = jsonFindRequired (data, "options", "Options for a property combo is required"); - auto* combo = new CPropertyCombo (name, text, *value); + auto* combo = new CPropertyCombo (name, text, value->dump ()); if (!options->is_array ()) sLog.exception ("Property combo options should be an array"); @@ -27,7 +27,7 @@ CPropertyCombo* CPropertyCombo::fromJSON (json data, const std::string& name) { auto label = jsonFindRequired (cur, "label", "Label is required for a property combo option"); auto propertyValue = jsonFindRequired (cur, "value", "Value is required for a property combo option"); - combo->addValue (*label, *propertyValue); + combo->addValue (*label, propertyValue->dump()); } return combo;