Stop calling prepareForDraw twice

Bug introduced when enter/leaveDocument was implemented.