X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f4e928794167715f19a3021d62b7c4f77611694..b0abe9eeec1e08f5e236d209428e521debb6544e:/wxPython/contrib/ogl/oglshapes.py diff --git a/wxPython/contrib/ogl/oglshapes.py b/wxPython/contrib/ogl/oglshapes.py index 8732f72cad..4090867d08 100644 --- a/wxPython/contrib/ogl/oglshapes.py +++ b/wxPython/contrib/ogl/oglshapes.py @@ -9,6 +9,8 @@ from windows import * from gdi import * +from fonts import * + from clip_dnd import * from events import * @@ -47,18 +49,15 @@ class wxPseudoMetaFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,oglshapesc=oglshapesc): - if self.thisown == 1 : - oglshapesc.delete_wxPseudoMetaFile(self) + def __del__(self, delfunc=oglshapesc.delete_wxPseudoMetaFile): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Draw(self, *_args, **_kwargs): val = apply(oglshapesc.wxPseudoMetaFile_Draw,(self,) + _args, _kwargs) return val - def WriteAttributes(self, *_args, **_kwargs): - val = apply(oglshapesc.wxPseudoMetaFile_WriteAttributes,(self,) + _args, _kwargs) - return val - def ReadAttributes(self, *_args, **_kwargs): - val = apply(oglshapesc.wxPseudoMetaFile_ReadAttributes,(self,) + _args, _kwargs) - return val def Clear(self, *_args, **_kwargs): val = apply(oglshapesc.wxPseudoMetaFile_Clear,(self,) + _args, _kwargs) return val