Skip to content

Commit

Permalink
Fix Shape.copy
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed May 16, 2019
1 parent df0e439 commit d857209
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions labelme/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,7 @@ def highlightClear(self):
self._highlightIndex = None

def copy(self):
shape = Shape(label=self.label, shape_type=self.shape_type)
shape.points = [copy.deepcopy(p) for p in self.points]
shape.fill = self.fill
shape.selected = self.selected
shape._closed = self._closed
shape.line_color = copy.deepcopy(self.line_color)
shape.fill_color = copy.deepcopy(self.fill_color)
return shape
return copy.deepcopy(self)

def __len__(self):
return len(self.points)
Expand Down

0 comments on commit d857209

Please sign in to comment.