Keep toolbar in sync with selection