From: Robin Dunn Date: Sun, 21 Nov 1999 03:37:01 +0000 (+0000) Subject: Fixed bug in DnD. wxDragSource will now delete itself when done. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dafb483b3a1f273e79bae8cbc7eb0bab2387239b Fixed bug in DnD. wxDragSource will now delete itself when done. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/wxPython/demo/CustomDragAndDrop.py b/utils/wxPython/demo/CustomDragAndDrop.py index 31391b8edb..974bcdffa8 100644 --- a/utils/wxPython/demo/CustomDragAndDrop.py +++ b/utils/wxPython/demo/CustomDragAndDrop.py @@ -232,7 +232,7 @@ def runTest(frame, nb, log): overview = """\ -This demo shows Drand and Drop using a custom data type and a custom data object. A type called "DoodleLines" is created and a Python Pickle of a list is actually transfered in the drag and drop opperation. +This demo shows Drag and Drop using a custom data type and a custom data object. A type called "DoodleLines" is created and a Python Pickle of a list is actually transfered in the drag and drop opperation. A second data object is also created containing a bitmap of the image and is made available to any drop target that accepts bitmaps, such as MS Word. diff --git a/utils/wxPython/src/clip_dnd.i b/utils/wxPython/src/clip_dnd.i index ea9e5c0eb3..7b43ef7fb2 100644 --- a/utils/wxPython/src/clip_dnd.i +++ b/utils/wxPython/src/clip_dnd.i @@ -411,6 +411,8 @@ public: const wxIcon &go = wxNullIcon) : wxDropSource(win, go) {} #endif + ~wxPyDropSource() { printf("dtor\n"); } + DEC_PYCALLBACK_BOOL_DR(GiveFeedback); PYPRIVATE; }; @@ -432,8 +434,8 @@ public: const wxIcon &go = wxNullIcon); #endif - void _setSelf(PyObject* self); - %pragma(python) addtomethod = "__init__:self._setSelf(self)" + void _setSelf(PyObject* self, int incref); + %pragma(python) addtomethod = "__init__:self._setSelf(self, 0)" ~wxPyDropSource(); void SetData(wxDataObject& data);