X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c25f90f60ceb17d33900f6a94f7f4ff2a009c584..24e9f36bccb720dc7b8abd6187d9427fecbc75c9:/wxPython/src/mac/_gdi.py diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index b6b3a2fcfe..68a5b6d2c4 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -4729,7 +4729,11 @@ class BufferedDC(MemoryDC): Constructs a buffered DC. """ _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args)) - self.__dc = args[0] # save a ref so the other dc will not be deleted before self + # save a ref so the other dc will not be deleted before self + self.__dc = args[0] + # also save a ref to the bitmap + if len(args) > 1: self.__bmp = args[1] + __swig_destroy__ = _gdi_.delete_BufferedDC __del__ = lambda self : None; @@ -4786,6 +4790,8 @@ class BufferedPaintDC(BufferedDC): window is automatically used). """ _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs)) + if len(args) > 1: self.__bmp = args[1] + _gdi_.BufferedPaintDC_swigregister(BufferedPaintDC) #---------------------------------------------------------------------------