X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10e07c70d8161058e55d722686edbafb4688d243..9fd9e47a93dfcdd99c2722e288a0f28a51ce6f5f:/wxPython/demo/wxDragImage.py?ds=inline 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)