Defaults / Presets?
-
Default Values
Can someone pls tell me what the defaultValue does in terms of startup values? (I know it also controls what happens when a control is double-clicked.)
If I set a vdefault alue, and then reload my project, the default value shows correctly in the property editor—but the control isn't set to that value. (For example, if I set the Default to '1', then when I reload the project, the button does not appear to be on.)
Do I need to explicitly send a repaint message?
Also, the HISE menu item "Reset UI Controls to Default Values" has the same issue.
Presets
Is there a way to load a preset, but not have the control callbacks called? (Perhaps restoreAllControlsFromPreset)?
Also, is there a work-around for the bug where Default presets are called before and after onInit?
Thank you.
-
@clevername27 said in Defaults / Presets?:
Default Values
If I set a vdefault alue, and then reload my project, the default value shows correctly in the property editor—but the control isn't set to that value. (For example, if I set the Default to '1', then when I reload the project, the button does not appear to be on.)
If the control is
saveInPreset
then it's normal behaviour since the last value is kept and recalled.
But if it's not then you have found an issue, because to my opinion a control should be reset to default value at compile time.Also, the HISE menu item "Reset UI Controls to Default Values" has the same issue.
It works if the control is
savedInPreset
, but not the opposite so yes, bug confirmed for non-saved in preset items -
@ustk Thank you for your reply and confirmation. I've narrowed it down (on my end) to buttons with LAFs.
-
@clevername27 it happens with sliders too, and without LAF as well