Sprite editor: fix wrong index when cloning a direction.
Sprite editor: scroll the tree to show the selected node.