提交 68a800e1 编写于 作者: K Kentaro Wada

Fix outOfPixmap to solve crashing when outside of the pixmap

上级 3285c9e6
......@@ -532,7 +532,7 @@ class Canvas(QtWidgets.QWidget):
def outOfPixmap(self, p):
w, h = self.pixmap.width(), self.pixmap.height()
return not (0 <= p.x() < w and 0 <= p.y() < h)
return not (0 <= p.x() <= w - 1 and 0 <= p.y() <= h - 1)
def finalise(self):
assert self.current
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册