Apply alg to group2

This needs cleaning up before merging but I pushed it for reference and checking.  Allows for application of algorithm to all of the selected lines (this could be a group or individually selected lines) and sets the line to final (pre/post) for each survey line it acts on.