]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglcanvas.py
Don't create a bitmap with dimensions <= 0...
[wxWidgets.git] / wxPython / contrib / ogl / oglcanvas.py
index 2467d6f08de7f667e3005e9a5d1a97ea8cb31cca..b80e23933a845b6dc20a97fe243c2203bc677fb8 100644 (file)
@@ -40,14 +40,13 @@ from sizers import *
 from filesys import *
 
 from utils import *
+
+from oglbasic import *
 import wx
-class wxDiagramPtr :
+class wxDiagramPtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def __del__(self,oglcanvasc=oglcanvasc):
-        if self.thisown == 1 :
-            oglcanvasc.delete_wxDiagram(self)
     def AddShape(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxDiagram_AddShape,(self,) + _args, _kwargs)
         return val
@@ -62,11 +61,9 @@ class wxDiagramPtr :
         return val
     def FindShape(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxDiagram_FindShape,(self,) + _args, _kwargs)
-        if val: val = wxPyShapePtr(val) 
         return val
     def GetCanvas(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxDiagram_GetCanvas,(self,) + _args, _kwargs)
-        if val: val = wxPyShapeCanvasPtr(val) 
         return val
     def GetCount(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxDiagram_GetCount,(self,) + _args, _kwargs)
@@ -165,7 +162,6 @@ class wxPyShapeCanvasPtr(wxScrolledWindowPtr):
         return val
     def GetDiagram(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxPyShapeCanvas_GetDiagram,(self,) + _args, _kwargs)
-        if val: val = wxDiagramPtr(val) 
         return val
     def GetQuickEditMode(self, *_args, **_kwargs):
         val = apply(oglcanvasc.wxPyShapeCanvas_GetQuickEditMode,(self,) + _args, _kwargs)