Fixed painting of the selection so only the selected points were drawn