PluginGuiMagic icon indicating copy to clipboard operation
PluginGuiMagic copied to clipboard

Label "value" field reset on selection in editor

Open maxgraf96 opened this issue 5 years ago • 3 comments

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

maxgraf96 avatar Jun 22 '20 13:06 maxgraf96

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.

maxgraf96 avatar Jun 22 '20 13:06 maxgraf96

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...

ffAudio avatar Jun 22 '20 15:06 ffAudio

Thank you!

maxgraf96 avatar Jun 22 '20 15:06 maxgraf96