From 331bd17aa54d3b40dfee2d2047dd58be484ca564 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 23 Oct 2017 11:48:57 +0100 Subject: [PATCH] Fixed a bug where the Slider popup display was being shown at the wrong position --- modules/juce_gui_basics/widgets/juce_Slider.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index a8f37bc608..36ffd10da4 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -980,6 +980,11 @@ public: { popupDisplay = new PopupDisplayComponent (owner); + if (parentForPopupDisplay != nullptr) + parentForPopupDisplay->addChildComponent (popupDisplay); + else + popupDisplay->addToDesktop (ComponentPeer::windowIsTemporary); + if (style == SliderStyle::TwoValueHorizontal || style == SliderStyle::TwoValueVertical) { @@ -991,11 +996,6 @@ public: updatePopupDisplay (getValue()); } - if (parentForPopupDisplay != nullptr) - parentForPopupDisplay->addChildComponent (popupDisplay); - else - popupDisplay->addToDesktop (ComponentPeer::windowIsTemporary); - popupDisplay->setVisible (true); } }