mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed an assertion when enabling the popup display with a two-value slider and disabled the popup display when using an IncDec slider
This commit is contained in:
parent
2b01c39aae
commit
1cb2d8143e
1 changed files with 18 additions and 3 deletions
|
|
@ -953,9 +953,12 @@ public:
|
|||
|
||||
void mouseMove()
|
||||
{
|
||||
auto isTwoValue = (style == TwoValueHorizontal || style == TwoValueVertical);
|
||||
auto isThreeValue = (style == ThreeValueHorizontal || style == ThreeValueVertical);
|
||||
|
||||
if (showPopupOnHover
|
||||
&& style != TwoValueHorizontal
|
||||
&& style != TwoValueVertical)
|
||||
&& ! isTwoValue
|
||||
&& ! isThreeValue)
|
||||
{
|
||||
if (owner.isMouseOver (true))
|
||||
{
|
||||
|
|
@ -975,11 +978,23 @@ public:
|
|||
|
||||
void showPopupDisplay()
|
||||
{
|
||||
if (style == IncDecButtons)
|
||||
return;
|
||||
|
||||
if (popupDisplay == nullptr)
|
||||
{
|
||||
popupDisplay = new PopupDisplayComponent (owner);
|
||||
|
||||
updatePopupDisplay (getValue());
|
||||
if (style == SliderStyle::TwoValueHorizontal
|
||||
|| style == SliderStyle::TwoValueVertical)
|
||||
{
|
||||
updatePopupDisplay (sliderBeingDragged == 2 ? getMaxValue()
|
||||
: getMinValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
updatePopupDisplay (getValue());
|
||||
}
|
||||
|
||||
if (parentForPopupDisplay != nullptr)
|
||||
parentForPopupDisplay->addChildComponent (popupDisplay);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue