New callback when adding a layer