Unnecessary paints

I have a component A.

A has two child components AA and AB, which are both set to visible and have the same bounds. AB is on top of AA and AB is set to opaque.

AA has a child component AAA which is smaller than AA. A timer is constantly calling AAA::repaint().

AAA::paint is not called. Which is great.

But AB::paint is called continuously. It repaints everything within the bounds of AAA. Why so? AB is set to opaque and fully covers AAA, so calling AB::paint seems unnecessary.

Tested with Windows 10.

Similar questions had been asked before, but for me they all seemed a bit different. Please excuse if this question is an unnecessary repetition.

ohh lordie here we go again lol

1 Like

You are right. If a component is fully covered by another opaque component, i think it should not repainted, even when its repaint method is called. I think you are right.

But (by experience) if you really want to gets this fixed, you need to invest time, post an example code, and a possible fix.

PS: there is one exception, if the underlying components border shares the exact same border with its overlaying component and both are transformed with a fractional number