diff --git a/CHANGES.rst b/CHANGES.rst index 76ff0d21..6db16f50 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -40,6 +40,10 @@ Changes in this release include the following: * Added wx.Treebook.GetTreeCtrl and wx.Choicebook.GetChoiceCtrl. (#918) +* Removed the wx.BookCtrlBase.RemovePage workaround as it was causing problems + and doesn't seem to be necessary any more. The wxWidgets assertions are catching + the out of range error just fine. (#888) + diff --git a/demo/ColorPanel.py b/demo/ColorPanel.py index 8a4a7e6a..f91c97c0 100644 --- a/demo/ColorPanel.py +++ b/demo/ColorPanel.py @@ -13,8 +13,6 @@ class ColoredPanel(wx.Window): def __init__(self, parent, color): wx.Window.__init__(self, parent, -1, style = wx.SIMPLE_BORDER) self.SetBackgroundColour(color) - if wx.Platform == '__WXGTK__': - self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) #--------------------------------------------------------------------------- diff --git a/etg/bookctrl.py b/etg/bookctrl.py index 7c56a74f..5948e2c9 100644 --- a/etg/bookctrl.py +++ b/etg/bookctrl.py @@ -42,21 +42,6 @@ def run(): c.find('HitTest.flags').out = True - # Workaround the lack of checking valid page numbers in wxGTK. - c.addPyCode("""\ - def _checkBookPageCount(f): - import functools - @functools.wraps(f) - def wrapper(self, page): - if page >= self.GetPageCount(): - raise wx.PyAssertionError("invalid notebook page") - return f(self, page) - return wrapper - - BookCtrlBase.RemovePage = _checkBookPageCount(BookCtrlBase.RemovePage) - BookCtrlBase.GetPage = _checkBookPageCount(BookCtrlBase.GetPage) - """) - #----------------------------------------------------------------- tools.doCommonTweaks(module)