Weight paint locked

I was doing a shape-key and had just painted some weights on my mesh, when upon a sudden wasn’t able to paint the weights no longer, but the paints were still there fortunately. The colors of the paint became different aswell, more gaudy and the blue became purple. What could be that? I don’t think it’s the brush. Plz Help!

I solved that by selecting all in edit mode before going to weight paint mode. Doesn’t make sense to me, probably a glitch.