diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index 6db6e17d2d..78d6445370 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -58,16 +58,15 @@ private: static void repaintAndResizeAllComps (Component::SafePointer c) { - for (int i = c->getNumChildComponents(); --i >= 0;) + if (c->isVisible()) { - if (c != nullptr) - { - if (Component* child = c->getChildComponent(i)) - { - child->repaint(); - child->resized(); - } - } + c->repaint(); + c->resized(); + + for (int i = c->getNumChildComponents(); --i >= 0;) + if (c != nullptr) + if (Component* child = c->getChildComponent(i)) + repaintAndResizeAllComps (child); } } };