1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

SidePanel: Call onPanelShowHide when animation has completed

This commit is contained in:
ed 2021-04-26 17:22:18 +01:00
parent 6e82569c24
commit bd17993caa

View file

@ -108,9 +108,6 @@ void SidePanel::showOrHide (bool show)
if (isShowing && ! isVisible())
setVisible (true);
if (onPanelShowHide != nullptr)
onPanelShowHide (isShowing);
}
}
@ -255,8 +252,14 @@ void SidePanel::componentMovedOrResized (Component& component, bool wasMoved, bo
void SidePanel::changeListenerCallback (ChangeBroadcaster*)
{
if (isVisible() && ! isShowing && ! Desktop::getInstance().getAnimator().isAnimating (this))
setVisible (false);
if (! Desktop::getInstance().getAnimator().isAnimating (this))
{
if (onPanelShowHide != nullptr)
onPanelShowHide (isShowing);
if (isVisible() && ! isShowing)
setVisible (false);
}
}
Rectangle<int> SidePanel::calculateBoundsInParent (Component& parentComp) const