mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-18 21:36:38 +00:00
MiRCARTCanvas.py:MiRCARTCanvas.onPanelInput(): clip mapPoint to canvasSize.
This commit is contained in:
parent
508a3cd489
commit
46258cde32
@ -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