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

Fix for JUCE_LIVE_CONSTANT in plugins.

This commit is contained in:
jules 2015-06-15 10:10:39 -05:00
parent a52ed14607
commit 3236bdca6a

View file

@ -51,22 +51,36 @@ private:
{
stopTimer();
Array<Component*> alreadyDone;
for (int i = TopLevelWindow::getNumTopLevelWindows(); --i >= 0;)
if (Component* c = TopLevelWindow::getTopLevelWindow(i))
repaintAndResizeAllComps (c);
repaintAndResizeAllComps (c, alreadyDone);
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
if (Component* c = Desktop::getInstance().getComponent(i))
repaintAndResizeAllComps (c, alreadyDone);
}
static void repaintAndResizeAllComps (Component::SafePointer<Component> c)
static void repaintAndResizeAllComps (Component::SafePointer<Component> c,
Array<Component*>& alreadyDone)
{
if (c->isVisible())
if (c->isVisible() && ! alreadyDone.contains (c))
{
c->repaint();
c->resized();
for (int i = c->getNumChildComponents(); --i >= 0;)
if (c != nullptr)
if (Component* child = c->getChildComponent(i))
repaintAndResizeAllComps (child);
{
if (Component* child = c->getChildComponent(i))
{
repaintAndResizeAllComps (child, alreadyDone);
alreadyDone.add (child);
}
if (c == nullptr)
break;
}
}
}
};