From: Vadim Zeitlin Date: Mon, 24 Jul 2006 18:20:18 +0000 (+0000) Subject: documentation for wxAppTraits (patch 1518295 from Francesco) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ce6b371d148acc73fa3516f4f75a9c7a362f3144 documentation for wxAppTraits (patch 1518295 from Francesco) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/DragImage.py b/wxPython/demo/DragImage.py index cb9156bd47..2592c97728 100644 --- a/wxPython/demo/DragImage.py +++ b/wxPython/demo/DragImage.py @@ -150,7 +150,7 @@ class DragCanvas(wx.ScrolledWindow): dc = evt.GetDC() if not dc: - dc = wxClientDC(self) + dc = wx.ClientDC(self) rect = self.GetUpdateRegion().GetBox() dc.SetClippingRect(rect) self.TileBackground(dc) @@ -185,10 +185,8 @@ class DragCanvas(wx.ScrolledWindow): self.dragImage.EndDrag() self.dragImage = None - dc = wx.ClientDC(self) - if self.hiliteShape: - self.hiliteShape.Draw(dc) + self.RefreshRect(self.hiliteShape.GetRect()) self.hiliteShape = None # reposition and draw the shape @@ -212,9 +210,10 @@ class DragCanvas(wx.ScrolledWindow): ) self.dragShape.shown = True - self.dragShape.Draw(dc) + self.RefreshRect(self.dragShape.GetRect()) self.dragShape = None + # The mouse is moving def OnMotion(self, evt): # Ignore mouse movement if we're not dragging.