sync selection state

closes #39