DrawableComposite::addAndMakeVisible (background)

When I create my DrawableComposite (with the background from another DrawableComposite) via its copy constructor

DrawableComposite::DrawableComposite (background)

it seems to be created correctly and I can add other controls and receive events.

 


Unfortunately I can't always use the copy constructor. Now I thought I should be able to achieve the same results by instead

addAndMakeVisible (background->createCopy());

But then later added controls have wrong positions and I don't receive (mouse) events anymore.

resetContentAreaAndBoundingBoxToFitChildren();

doesn't seem to help. What do I miss here?

 

Thanks,

raketa