Fix row extraction from selection
scroll to line when a row is selected
Merge duplicated code
Merge pull request #687 from nicolas-f/fix/selection

Fix offset in TableEditor selection and automatically scroll to selected row.