]> git.saurik.com Git - wxWidgets.git/commitdiff
Save a reference to the DC
authorRobin Dunn <robin@alldunn.com>
Wed, 4 Oct 2006 03:28:49 +0000 (03:28 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 4 Oct 2006 03:28:49 +0000 (03:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/src/_graphics.i

index 848dc43bde468bfbe44dd20b238358ad1b4e8047..a0bb9caade97f4c5e25339c3e3beb458fb7f4c11 100644 (file)
@@ -230,6 +230,8 @@ public:
     // wxGraphicsContext()         This is also an ABC, use Create to make an instance...
     virtual ~wxGraphicsContext();
     
+    %pythonAppend Create
+        "val.__dc = args[0] # save a ref so the other dc will not be deleted before self";
     static wxGraphicsContext* Create( const wxWindowDC& dc);
 
     // creates a path instance that corresponds to the type of graphics context, ie GDIPlus, cairo, CoreGraphics ...
@@ -437,6 +439,8 @@ public:
 class wxGCDC: public wxDC
 {
 public:
+    %pythonAppend wxGCDC
+        "self.__dc = args[0] # save a ref so the other dc will not be deleted before self";
     wxGCDC(const wxWindowDC& dc);
     //wxGCDC();
     virtual ~wxGCDC();