I would like to call repaint() on a Component without the automatic repaint on the parent Component.
One way is setting the parent component with setOpaque but it is not an option in this case.
The parent Component in this page is not opaque but opaque enough where this child component is to be drawed.
Can I achieve this in some way? The only hack I can think of would be adding another layer of Component where the middle layer is opaque and so don't trigger repaint() upwards...but it feels like it could be handled smarter.
I've already tried that. It didn't do much difference. The problem is that the parent has many children and all other children are repainted when parent is.
If your component is transparent then you'll have to repaint the parent or it won't know how to compositie the child's background. If the background of the child doesn't change can you set the child to opaque and simply fill it with the same colour as the parent?
I got the same issue. I need to redraw one component and it draws all the window. The JUCE_ENABLE_REPAINT_DEBUGGING only show this single component flashing, but by breaking on other paint methods I see they are called as well.
Still beware that on OSX, if you get two different child like one on top left and one on bottom right, then everything gets repainted because the redraw surface is a rectangle not a rectangle list.
Relevant for the above issue you mention, could be this commit: (also pasted here for future reference to anyone hitting the same issue with opaque components)