Skip to content

Commit

Permalink
Merge pull request sudara#111 from ImJimmi/fix-object-properties
Browse files Browse the repository at this point in the history
Make copy of stringified value when displaying properties with Object values
  • Loading branch information
sudara authored May 11, 2024
2 parents 0026aaa + fd7923b commit fdaffde
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion melatonin/components/properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ namespace melatonin
}
else if (!propertiesToIgnore.contains (nv.name))
{
auto customProperty = new juce::TextPropertyComponent (nv.value, nv.name, 200, false);
const auto value = nv.value.getValue().isObject()
? juce::Value (nv.value.getValue().toString())
: nv.value;
auto customProperty = new juce::TextPropertyComponent (value, nv.name, 200, false);
customProperty->getProperties().set ("isUserProperty", true);
props.add (customProperty);
}
Expand Down

0 comments on commit fdaffde

Please sign in to comment.