From f24fd27a8ebc2be3558902d2ddb8177c76197d9b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 8 May 2007 17:50:15 +0000 Subject: [PATCH] Workaround corner case where a widget can have a containing sizer, but no sizer item. (The static box in a StaticBoxSizer) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45884 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/inspection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wxPython/wx/lib/inspection.py b/wxPython/wx/lib/inspection.py index 38137ea606..f0ba5bcdb5 100644 --- a/wxPython/wx/lib/inspection.py +++ b/wxPython/wx/lib/inspection.py @@ -533,6 +533,9 @@ class InspectionInfoPanel(wx.stc.StyledTextCtrl): def FmtSizerItem(self, obj): + if obj is None: + return ['SizerItem: None'] + st = ['SizerItem:'] st.append(self.Fmt('proportion', obj.GetProportion())) st.append(self.Fmt('flag',