Transfer ownership of the wx.aui.AuiNotbook.SetArtProvider art parameter.

This commit is contained in:
Robin Dunn
2018-10-29 20:02:10 -07:00
parent 17f52dfd14
commit 6865d2ea69
3 changed files with 11 additions and 0 deletions

View File

@@ -138,6 +138,10 @@ Changes in this release include the following:
* Fix wx.html.HtmlPrintout to not be seen as an abstract class, so it can be
instantiated. (#1060)
* Fix wx.aui.AuiNotbook.SetArtProvider to properly transfer ownership of the art
object from Python to C++. This possible double-deletion and related crashing
problems. (#1061)

View File

@@ -43,6 +43,8 @@ def run():
assert isinstance(c, etgtools.ClassDef)
tools.fixWindowClass(c)
tools.fixBookctrlClass(c)
c.find('SetArtProvider.art').transfer = True
c = module.find('wxAuiTabContainer')
tools.ignoreConstOverloads(c)

View File

@@ -97,6 +97,11 @@ class auibook_Tests(wtc.WidgetTestCase):
wx.aui.EVT_AUINOTEBOOK_BG_DCLICK
def test_auibook11(self):
nb = wx.aui.AuiNotebook(self.frame)
nb.AddPage(wx.Panel(nb), "Page")
nb.SetArtProvider(wx.aui.AuiDefaultTabArt())
#---------------------------------------------------------------------------