Editor: fix error when selecting a sprite animation direction. fix #545.