diff --git a/CHANGES.rst b/CHANGES.rst index b75b8d7a..2d79c07c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -167,6 +167,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) + diff --git a/etg/auibook.py b/etg/auibook.py index c29946bb..f9e8e1e3 100644 --- a/etg/auibook.py +++ b/etg/auibook.py @@ -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) diff --git a/unittests/test_auibook.py b/unittests/test_auibook.py index d2908752..5f4b1d3c 100644 --- a/unittests/test_auibook.py +++ b/unittests/test_auibook.py @@ -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()) + #---------------------------------------------------------------------------