diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index a9aedbd8ac..e441362a66 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1529,7 +1529,7 @@ bool Slider::isVertical() const noexcept { return pimpl->isVe bool Slider::isRotary() const noexcept { return pimpl->isRotary(); } bool Slider::isBar() const noexcept { return pimpl->isBar(); } -float Slider::getPositionOfValue (const double value) { return pimpl->getPositionOfValue (value); } +float Slider::getPositionOfValue (const double value) const { return pimpl->getPositionOfValue (value); } //============================================================================== void Slider::paint (Graphics& g) { pimpl->paint (g, getLookAndFeel()); } diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index b96d648bb6..ce0270f31f 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -726,7 +726,7 @@ public: If the slider is rotary, this will throw an assertion and return 0. If the value is out-of-range, it will be constrained to the length of the slider. */ - float getPositionOfValue (double value); + float getPositionOfValue (double value) const; //============================================================================== /** This can be overridden to allow the slider to snap to user-definable values.