Fix issue when turning line into polyline.
Merge pull request #2616 from jburel/save-line

Save line