git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15685 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 
     #--------------------------------------------------
     def CalcMin( self ):
 
     #--------------------------------------------------
     def CalcMin( self ):
+        self.rowHeights = []
+        self.colWidths = []
+
         items = self.GetChildren()
         if not items:
             return wxSize(10, 10)
 
         items = self.GetChildren()
         if not items:
             return wxSize(10, 10)
 
-        self.rowHeights = []
-        self.colWidths = []
-
         for item in items:
             self._add( item.CalcMin(), item.GetUserData() )
 
         for item in items:
             self._add( item.CalcMin(), item.GetUserData() )