Correctly reset croptype to valid value.
In my previous merge I typo-ed || instead of &&. This caused croptype to always be reset to image when selecting a vector layer, but if croptype was canvas it shouldn't be reset.
I also noticed that croptype was not reset properly when opening the crop tool while a vector layer is selected, So I added that too.
Edited by Daniel Doran