Skip to content

Commit

Permalink
Load points as float values
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed May 16, 2019
1 parent 48542a6 commit df0e439
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ def loadLabels(self, shapes):
for label, points, line_color, fill_color, shape_type, flags in shapes:
shape = Shape(label=label, shape_type=shape_type)
for x, y in points:
shape.addPoint(QtCore.QPoint(x, y))
shape.addPoint(QtCore.QPointF(x, y))
shape.close()

if line_color:
Expand Down
2 changes: 1 addition & 1 deletion labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def mouseMoveEvent(self, ev):
"""Update line with last point and current coordinates."""
try:
if QT5:
pos = self.transformPos(ev.pos())
pos = self.transformPos(ev.localPos())
else:
pos = self.transformPos(ev.posF())
except AttributeError:
Expand Down

0 comments on commit df0e439

Please sign in to comment.