X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10e07c70d8161058e55d722686edbafb4688d243..ccdcde00d9ae27ca20ff6c3c9495918a0ec725aa:/wxPython/demo/wxDragImage.py diff --git a/wxPython/demo/wxDragImage.py b/wxPython/demo/wxDragImage.py index d4124ae7fd..d53fb4c67b 100644 --- a/wxPython/demo/wxDragImage.py +++ b/wxPython/demo/wxDragImage.py @@ -138,12 +138,12 @@ class DragCanvas(wxScrolledWindow): dc.DestroyClippingRegion() - - def OnEraseBackground(self, evt): dc = evt.GetDC() if not dc: dc = wxClientDC(self) + rect = self.GetUpdateRegion().GetBox() + dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height) self.TileBackground(dc)