From 48cdb90341ecc974409bce2e6b0ce9758d2c5d50 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 6 Dec 2013 14:49:17 +0000 Subject: [PATCH] Made the live constant editor call resize on all visible components. --- .../misc/juce_LiveConstantEditor.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) 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); } } };