Make the check for whether the reference line should be redrawn on mouse move more explicit.