Reset the cursor selection type back to text after adding an annotation

If an annotation is created while the user has selected an image, the selection type was not being correctly reset back to text range. This prevents the caret from displaying properly and disables typing commands.

Fixes #634.