mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-26 16:56:37 +00:00
MiRCARTCanvas.py:MiRCARTCanvas.onPanelInput(): clip mapPoint to canvasSize.
This commit is contained in:
parent
0342f6626d
commit
fe5e453187
@ -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, \
|
||||||
|
Loading…
Reference in New Issue
Block a user