Select the option Polygon from the Type dropdown list and mark the Magic Selection box (figure no. 3). If this box is marked while performing a selection (Free or Polygon), the selection's lines will fix themselves automatically upon the borderlines (line edges) (figure no. 4)