is there a way to avoid that a completly covered Component may lead to a call to paintEntireComponent?
For example if we take the juce demo plugin and put a Component (let’s name it fillComp) on top of the others, which only fills the complete parent area with black colour and setOpaque is true. Now if the infoLabel of the demo changes because of new values, it results in a call to paintEntireComponent even if it is covered by our fillComp. That makes the fillComp beeing repainted within the bounds of the infoLabel. This seems unnecessary because the fillComp on top of the others hasn’t changed.
What I described is not a big problem when the Components are that simple. But in my case I have a base Component with many children that are repainted in different intervalls (meters, fft displays, labels…). Now I need to open a new Component on top of these children, which itself has a lot of children. Everytime one of the covered children behind the new Component changes, paintEntireComponent is called and the new top Component and all of it’s children are repainted (or at least the parts that are over a changed covered Component). This is not necessary because the top Component itself hasn’t changed and therefore it should not be repainted and its children shouldn’t be repainted, too.
Since my covering top Component is quite a bit expensive regarding the painting and because it doesn’t need to be repainted that often, I need a way to avoid this repainting caused by Components in that back, that aren’t visible at all.
Any ideas how do this?
Thanks in advance.