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:
parent
6e82569c24
commit
bd17993caa
1 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue