Editor: fix opening an empty sprite. Fix #581.