Question about SliderAttachment constructor

I notice that in the contructor function of SliderParameterAttachment:

At line 120, the attachment enables the double-clicking and set the default value of it. However, I would not expect an attachment to change whether double-clicking is enabled. Why not query it from the slider (I haven’t tried the following code):

slider.setDoubleClickReturnValue (slider.isDoubleClickReturnEnabled(), param.convertFrom0to1 (param.getDefaultValue()));

in every parameter change the attachment needs to change the actual parameter value with gestures. but i think you can still disable doubleclicks from your slider after adding the attachment

1 Like

Thanks for your suggestion. Yes, it does make sense. I always add the attachment after setting all attributes of the slider. And it actually takes me a while to figure out why double-clicking is enabled again :smile:

understandable. i have written my own attachments. that’s why i’m familiar with the processes of such a class’s constructor