Not that I know of. To do it I'd want to attach a callback to a layer exit signal.