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

Save line (rebased onto develop)