From 46258cde3263c208dc40f76329e7b9b93f1261cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Thu, 11 Jan 2018 02:10:33 +0100 Subject: [PATCH] MiRCARTCanvas.py:MiRCARTCanvas.onPanelInput(): clip mapPoint to canvasSize. --- MiRCARTCanvas.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MiRCARTCanvas.py b/MiRCARTCanvas.py index 90df9d3..0d5912c 100644 --- a/MiRCARTCanvas.py +++ b/MiRCARTCanvas.py @@ -93,6 +93,9 @@ class MiRCARTCanvas(wx.Panel): event.Skip(); return; else: mapPoint = self.canvasBackend.xlateEventPoint(event, eventDc) + if mapPoint[0] >= self.canvasSize[0] \ + or mapPoint[1] >= self.canvasSize[1]: + return self.brushPos = mapPoint tool.onMouseEvent( \ event, mapPoint, self.brushColours, self.brushSize, \