Reordering sources updates UI

This also fixed a bug where precedence order could not be saved.