mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 12:41:10 +02:00
Merge pull request #939 from RobinD42/fix-issue888
Removed the wx.BookCtrlBase.RemovePage workaround
(cherry picked from commit 11cc4d5c25
)
This commit is contained in:
@@ -69,6 +69,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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user