Skip to content
Merged
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
10 changes: 6 additions & 4 deletions anylabeling/views/labeling/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,12 +632,14 @@ def bounded_move_shapes(self, shapes, pos):
return False # No need to move
o1 = pos + self.offsets[0]
if self.out_off_pixmap(o1):
pos -= QtCore.QPoint(min(0, int(o1.x())), min(0, int(o1.y())))
pos -= QtCore.QPointF(
float(min(0, int(o1.x()))), float(min(0, int(o1.y())))
)
Comment on lines +635 to +637
o2 = pos + self.offsets[1]
if self.out_off_pixmap(o2):
pos += QtCore.QPoint(
min(0, int(self.pixmap.width() - o2.x())),
min(0, int(self.pixmap.height() - o2.y())),
pos += QtCore.QPointF(
float(min(0, int(self.pixmap.width() - o2.x()))),
float(min(0, int(self.pixmap.height() - o2.y()))),
)
Comment on lines +640 to 643
# XXX: The next line tracks the new position of the cursor
# relative to the shape, but also results in making it
Expand Down
Loading