Hiding legend until a layer is selected