Don't enter delete or edit modes if no layers are available

I thought it was a bit odd that you could enter the delete and edit modes and see the tooltip+save/cancel buttons, even if there was nothing available to use them on. This prevents that.