mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Merge pull request #858 from RobinD42/fix-issue856
Transfer ownership of clientData objects in wx.dataview.DataViewTreeCtrl
This commit is contained in:
@@ -97,6 +97,9 @@ Changes in this release include the following:
|
||||
|
||||
* Use BufferedDC in Repaint() to mitigate flicker (wx.lib.agw.aui). (#686)
|
||||
|
||||
* Fixed crashing bug when using client data with items in
|
||||
wx.dataview.DataViewTreeCtrl. (#856)
|
||||
|
||||
|
||||
4.0.1 "Lemonade"
|
||||
----------------
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
from etgtools import PyFunctionDef, PyCodeDef, PyPropertyDef
|
||||
from etgtools import PyFunctionDef, ParamDef
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_dataview"
|
||||
@@ -525,14 +525,20 @@ def run():
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
def _setClientDataTrasfer(klass):
|
||||
for item in klass.allItems():
|
||||
if isinstance(item, ParamDef) and item.type == 'wxClientData *':
|
||||
item.transfer = True
|
||||
|
||||
c = module.find('wxDataViewTreeCtrl')
|
||||
tools.fixWindowClass(c)
|
||||
_setClientDataTrasfer(c)
|
||||
c.find('GetStore').overloads = []
|
||||
|
||||
|
||||
c = module.find('wxDataViewTreeStore')
|
||||
c.addAutoProperties()
|
||||
tools.fixRefCountedClass(c)
|
||||
_setClientDataTrasfer(c)
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user