To delete a layer by selecting an object on that layer
All objects on the selected layer and the layer itself are deleted.