1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

Introjucer: fix for stuck sliding panels in new project wizard.

This commit is contained in:
jules 2015-03-06 11:13:46 +00:00
parent 1359a6b895
commit 013b1ce000

View file

@ -86,12 +86,10 @@ void SlidingPanelComponent::addTab (const String& tabName,
void SlidingPanelComponent::goToTab (int targetTabIndex)
{
const int xTranslation = (currentIndex - targetTabIndex) * getWidth();
currentIndex = targetTabIndex;
Desktop::getInstance().getAnimator()
.animateComponent (&pageHolder, pageHolder.getBounds().translated (xTranslation, 0),
.animateComponent (&pageHolder, pageHolder.getBounds().withX (-targetTabIndex * getWidth()),
1.0f, 600, false, 0.0, 0.0);
repaint();