X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10e07c70d8161058e55d722686edbafb4688d243..9df06f5b696cde13b1220ae6ec60dc6f32d2ab6f:/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)