Please add constructors for BooleanPropertyComponent and SliderPropertyComponent that use ValueWithDefault
for their &valueToControl parameter.
I call these “missing” because ChoicePropertyComponent, MultiChoicePropertyComponent, and TextPropertyComponent all have alternate constructors, allowing the use of either Value
or ValueWithDefault
. BooleanPropertyComponent and SliderPropertyComponent, however, have only the Value
forms.
Why does this matter? Aside from convenience, SliderPropertyComponent will cause an assert (in NormalisableRange::clampTo0To1
), if the Value given is void, and the resulting 0 value for the member Slider is out of its range. This could happen if the Value given at construction is from ValueTree::getPropertyAsValue
, but that property is empty or missing.