|
@@ -556,10 +556,10 @@ class Canvas(QtWidgets.QWidget):
|
|
return False # No need to move
|
|
return False # No need to move
|
|
o1 = pos + self.offsets[0]
|
|
o1 = pos + self.offsets[0]
|
|
if self.outOfPixmap(o1):
|
|
if self.outOfPixmap(o1):
|
|
- pos -= QtCore.QPoint(min(0, o1.x()), min(0, o1.y()))
|
|
|
|
|
|
+ pos -= QtCore.QPointF(min(0, o1.x()), min(0, o1.y()))
|
|
o2 = pos + self.offsets[1]
|
|
o2 = pos + self.offsets[1]
|
|
if self.outOfPixmap(o2):
|
|
if self.outOfPixmap(o2):
|
|
- pos += QtCore.QPoint(
|
|
|
|
|
|
+ pos += QtCore.QPointF(
|
|
min(0, self.pixmap.width() - o2.x()),
|
|
min(0, self.pixmap.width() - o2.x()),
|
|
min(0, self.pixmap.height() - o2.y()),
|
|
min(0, self.pixmap.height() - o2.y()),
|
|
)
|
|
)
|