Skip to content

Commit

Permalink
Fix index error due to missing previously selected shapes in current …
Browse files Browse the repository at this point in the history
…image
  • Loading branch information
Ynjxsjmh committed Sep 29, 2024
1 parent e6fd024 commit 22eb226
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,11 @@ def keyReleaseEvent(self, ev):
if int(modifiers) == 0:
self.snapping = True
elif self.editing():
if self.movingShape and self.selectedShapes:
if (
self.movingShape
and self.selectedShapes
and self.selectedShapes[0] in self.shapes
):
index = self.shapes.index(self.selectedShapes[0])
if self.shapesBackups[-1][index].points != self.shapes[index].points:
self.storeShapes()
Expand Down

0 comments on commit 22eb226

Please sign in to comment.