X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cd389869043087202581d00677256e20b4123ac..b166c70307f14952b3844837c98602425020e1c5:/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)