PluginGuiMagic
PluginGuiMagic copied to clipboard
Label "value" field reset on selection in editor
Hi!
I found a small bug regarding interaction behaviour with Labels. To illustrate, when defining a Label as
<Label text="" id="pitchYinLabel" font-size="16" value="pitchYINValue"/>
in the markup xml file, the value for the field "value" is reset to a default state when selecting the label either through the treeview or using the "Edit" mode. That's a bit tricky because sometimes saving an updated xml file leads to faulty values because a click can go unnoticed easily.
I debugged the scenario and found out that the node parameter in the Stylesheet::getStyleProperty (const juce::Identifier& name, const juce::ValueTree& node, bool inherit, juce::ValueTree* definedHere) method is NULL when this happens.
I wanted to ask if there is a way around this, since the same click action works flawlessly with the other fields.
Best, Max
Update: When defining the value term with a leading colon in the xml file, e.g.
<Label text="" id="pitchYinLabel" font-size="16" value=":pitchYINValue"/>
the value is not overridden when clicking the label in edit view.
I see, thank you for the report.
The intended use was tree:property or tree:tree:property. I would have thought adding a property to the root ValueTree should work as well, but I'll have a look...
Thank you!