labelme
labelme copied to clipboard
Fix index error due to missing previously selected shapes in current image
The problem (#1396) can be reproduced by selecting a shape in current image a, and go on next image b then press backspace to delete point. self.selectedShapes is in image a thus it doesn't exist in any shapes in image b.
Another possible solution is to clear selected shapes after loading a new image, but user may want to go back to original image and use those selected shapes.