]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix exception when there are no items in the sizer yet
authorRobin Dunn <robin@alldunn.com>
Mon, 27 May 2002 17:54:45 +0000 (17:54 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 27 May 2002 17:54:45 +0000 (17:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15685 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wxPython/lib/rcsizer.py

index 06c5c29ad097b77c905e85060fceabcd6235f422..482e4a706610f219c4a84bc7fed12b6bf79a3075 100644 (file)
@@ -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() )