From e608d2285cd20c592239994ebe5a29ca265892bf Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 17 Feb 2004 16:00:03 +0000 Subject: [PATCH 1/1] corrected %addtofunc for BufferedDC constructor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/_dc.i | 8 +++++--- wxPython/src/gtk/gdi.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/wxPython/src/_dc.i b/wxPython/src/_dc.i index edfe3a45e8..964766e014 100644 --- a/wxPython/src/_dc.i +++ b/wxPython/src/_dc.i @@ -585,10 +585,8 @@ enum class wxBufferedDC : public wxMemoryDC { public: - %pythonAppend wxBufferedDC( wxDC *dc, const wxBitmap &buffer ) + %pythonAppend wxBufferedDC "self._dc = args[0] # save a ref so the other dc will not be deleted before self"; - %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT ) - "val._dc = args[0] # save a ref so the other dc will not be deleted before self"; %nokwargs wxBufferedDC; @@ -600,9 +598,13 @@ public: // being buffered) wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT ); + // TODO: Keep this one too? + %pythonAppend wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT ) + "val._dc = args[0] # save a ref so the other dc will not be deleted before self"; %name(BufferedDCInternalBuffer) wxBufferedDC( wxDC *dc, const wxSize &area, int flags = wxBUFFER_DC_DEFAULT ); + // Blits the buffer to the dc, and detaches the dc from // the buffer. Usually called in the dtor or by the dtor // of derived classes if the BufferedDC must blit before diff --git a/wxPython/src/gtk/gdi.py b/wxPython/src/gtk/gdi.py index 2760ba5c36..47fa49fde8 100644 --- a/wxPython/src/gtk/gdi.py +++ b/wxPython/src/gtk/gdi.py @@ -2829,7 +2829,7 @@ class BufferedDC(MemoryDC): self.this = newobj.this self.thisown = 1 del newobj.thisown - val._dc = args[0] # save a ref so the other dc will not be deleted before self + self._dc = args[0] # save a ref so the other dc will not be deleted before self def UnMask(*args, **kwargs): """UnMask()""" -- 2.45.2