From f83fcafb8472e1b47d7be30cb5ef28b60d6410f3 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 22 Sep 2017 10:29:30 +0100 Subject: [PATCH] Fixed a bug where a Slider popup display set to show on mouse hover wouldn't show when dragging the mouse over the Slider and releasing --- modules/juce_gui_basics/widgets/juce_Slider.cpp | 4 ++++ modules/juce_gui_basics/widgets/juce_Slider.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index bd6b0a268f..5b40afb9c4 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -1602,6 +1602,10 @@ void Slider::mouseUp (const MouseEvent&) { pimpl->mouseUp(); } void Slider::mouseMove (const MouseEvent&) { pimpl->mouseMove(); } void Slider::mouseExit (const MouseEvent&) { pimpl->mouseExit(); } +// If popup display is enabled and set to show on mouse hover, this makes sure +// it is shown when dragging the mouse over a slider and releasing +void Slider::mouseEnter (const MouseEvent&) { pimpl->mouseMove(); } + void Slider::modifierKeysChanged (const ModifierKeys& modifiers) { if (isEnabled()) diff --git a/modules/juce_gui_basics/widgets/juce_Slider.h b/modules/juce_gui_basics/widgets/juce_Slider.h index ae60454c96..ff20d95bd4 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.h +++ b/modules/juce_gui_basics/widgets/juce_Slider.h @@ -910,6 +910,8 @@ public: void mouseMove (const MouseEvent&) override; /** @internal */ void mouseExit (const MouseEvent&) override; + /** @internal */ + void mouseEnter (const MouseEvent&) override; private: //==============================================================================