Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def __init__(

self.canvas.newShape.connect(self.newShape)
self.canvas.shapeMoved.connect(self.setDirty)
self.canvas.selectionChanged.connect(self.shapeSelectionChanged)
self.canvas.selectionchanged.connect(self.shapeSelectionChanged)
self.canvas.drawingPolygon.connect(self.toggleDrawingSensitive)

self.setCentralWidget(scrollArea)
Expand Down
2 changes: 1 addition & 1 deletion labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ def offsetToCenter(self):
aw, ah = area.width(), area.height()
x = (aw - w) / (2 * s) if aw > w else 0
y = (ah - h) / (2 * s) if ah > h else 0
return QtCore.QPointF(x, y)
return QtCore.QPointF(int(x), int(y))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QPointF should support float, so seems something else is wrong.


def outOfPixmap(self, p):
w, h = self.pixmap.width(), self.pixmap.height()
Expand Down