MiRCARTCanvas.py:MiRCARTCanvas.onPanelInput(): clip mapPoint to canvasSize.

This commit is contained in:
Lucio Andrés Illanes Albornoz 2018-01-11 02:10:33 +01:00
parent 0342f6626d
commit fe5e453187

View File

@ -93,6 +93,9 @@ class MiRCARTCanvas(wx.Panel):
event.Skip(); return; event.Skip(); return;
else: else:
mapPoint = self.canvasBackend.xlateEventPoint(event, eventDc) mapPoint = self.canvasBackend.xlateEventPoint(event, eventDc)
if mapPoint[0] >= self.canvasSize[0] \
or mapPoint[1] >= self.canvasSize[1]:
return
self.brushPos = mapPoint self.brushPos = mapPoint
tool.onMouseEvent( \ tool.onMouseEvent( \
event, mapPoint, self.brushColours, self.brushSize, \ event, mapPoint, self.brushColours, self.brushSize, \