mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 07:16:38 +00:00
libgui/GuiCanvasPanel.py:{onPanelScroll,__init__}(): reset cursor on EVT_SCROLLWIN_LINE{DOWN,UP}.
This commit is contained in:
parent
c2f8fb272e
commit
bfd8e17b2b
@ -131,6 +131,15 @@ class GuiCanvasPanel(wx.ScrolledWindow):
|
|||||||
def onPanelSize(self, event):
|
def onPanelSize(self, event):
|
||||||
self._updateScrollBars(); event.Skip();
|
self._updateScrollBars(); event.Skip();
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ onPanelScroll(self, event)
|
||||||
|
def onPanelScroll(self, event):
|
||||||
|
if self.canvas.dirtyCursor:
|
||||||
|
viewRect = self.GetViewStart()
|
||||||
|
eventDc = self.backend.getDeviceContext(self, viewRect)
|
||||||
|
self.backend.drawCursorMaskWithJournal(self.canvas.journal, eventDc, viewRect)
|
||||||
|
self.canvas.dirtyCursor = False
|
||||||
|
event.Skip()
|
||||||
|
# }}}
|
||||||
|
|
||||||
#
|
#
|
||||||
# __init__(self, parent, parentFrame, backend, canvas, defaultCanvasPos, defaultCanvasSize, defaultCellSize, interface): initialisation method
|
# __init__(self, parent, parentFrame, backend, canvas, defaultCanvasPos, defaultCanvasSize, defaultCellSize, interface): initialisation method
|
||||||
@ -149,6 +158,8 @@ class GuiCanvasPanel(wx.ScrolledWindow):
|
|||||||
for eventType in (wx.EVT_LEFT_DOWN, wx.EVT_MOTION, wx.EVT_RIGHT_DOWN):
|
for eventType in (wx.EVT_LEFT_DOWN, wx.EVT_MOTION, wx.EVT_RIGHT_DOWN):
|
||||||
self.Bind(eventType, self.onPanelInput)
|
self.Bind(eventType, self.onPanelInput)
|
||||||
self.Bind(wx.EVT_PAINT, self.onPanelPaint)
|
self.Bind(wx.EVT_PAINT, self.onPanelPaint)
|
||||||
|
self.Bind(wx.EVT_SCROLLWIN_LINEDOWN, self.onPanelScroll)
|
||||||
|
self.Bind(wx.EVT_SCROLLWIN_LINEUP, self.onPanelScroll)
|
||||||
self.Bind(wx.EVT_SIZE, self.onPanelSize)
|
self.Bind(wx.EVT_SIZE, self.onPanelSize)
|
||||||
|
|
||||||
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
# vim:expandtab foldmethod=marker sw=4 ts=4 tw=120
|
||||||
|
Loading…
Reference in New Issue
Block a user