static void repaintAndResizeAllComps (Component::SafePointer<Component> c) { if (c->isVisible()) { c->repaint(); c->resized(); for (int i = c->getNumChildComponents(); --i >= 0;) if (c != nullptr) if (Component* child = c->getChildComponent(i)) repaintAndResizeAllComps (child); } }
static void repaintAndResizeAllComps (Component::SafePointer<Component> c, Array<Component*>& alreadyDone) { if (c->isVisible() && ! alreadyDone.contains (c)) { c->repaint(); c->resized(); for (int i = c->getNumChildComponents(); --i >= 0;) { if (Component* child = c->getChildComponent(i)) { repaintAndResizeAllComps (child, alreadyDone); alreadyDone.add (child); } if (c == nullptr) break; } } }