From: Robin Dunn Date: Mon, 27 May 2002 17:54:45 +0000 (+0000) Subject: Fix exception when there are no items in the sizer yet X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/47feb54b6b1d9225664cdf29eded39897cb3a9db Fix exception when there are no items in the sizer yet git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/wxPython/lib/rcsizer.py b/wxPython/wxPython/lib/rcsizer.py index 06c5c29ad0..482e4a7066 100644 --- a/wxPython/wxPython/lib/rcsizer.py +++ b/wxPython/wxPython/lib/rcsizer.py @@ -111,13 +111,13 @@ class RowColSizer(wxPySizer): #-------------------------------------------------- def CalcMin( self ): + self.rowHeights = [] + self.colWidths = [] + items = self.GetChildren() if not items: return wxSize(10, 10) - self.rowHeights = [] - self.colWidths = [] - for item in items: self._add( item.CalcMin(), item.GetUserData() )