Linear Slider text entry only on double click

    void updateTextBoxEnablement()
    {
        if (valueBox != nullptr)
        {
            bool shouldBeEditable = editableText && owner.isEnabled();

            if (valueBox->isEditable() != shouldBeEditable) // (to avoid changing the single/double click flags unless we need to)
                doubleClickToValue ? valueBox->setEditable (shouldBeEditable) : valueBox->setEditable (false, shouldBeEditable);  // Changed this!
        }
    }

My client wanted the linear slider Label to only enter edit mode when you double click (not single click) on the slider… I had to make the above change to the Slider class…

This perhaps should be the correct/standard behaviour.

I added the option click reset by subclassing the Slider class:

void LinearSlider::mouseDown (const MouseEvent& e)
{
    if (e.mods.isAltDown())
        {
        setValue (getDoubleClickReturnValue());
        
        return;
        }
    
    Slider::mouseDown (e);
}

Rail