Browse Source

Fix for JUCE_LIVE_CONSTANT in plugins.

tags/2021-05-28
jules 10 years ago
parent
commit
3236bdca6a
1 changed files with 20 additions and 6 deletions
  1. +20
    -6
      modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp

+ 20
- 6
modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp 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;
}
}
}
};


Loading…
Cancel
Save