Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Label "value" field reset on selection in editor #22

Open
maxgraf96 opened this issue Jun 22, 2020 · 3 comments
Open

Label "value" field reset on selection in editor #22

maxgraf96 opened this issue Jun 22, 2020 · 3 comments

Comments

@maxgraf96
Copy link

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
Copy link
Author

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.

@ffAudio
Copy link
Owner

ffAudio commented Jun 22, 2020

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

@maxgraf96
Copy link
Author

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants