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
This commit is contained in:
@@ -111,13 +111,13 @@ class RowColSizer(wxPySizer):
|
|||||||
|
|
||||||
#--------------------------------------------------
|
#--------------------------------------------------
|
||||||
def CalcMin( self ):
|
def CalcMin( self ):
|
||||||
|
self.rowHeights = []
|
||||||
|
self.colWidths = []
|
||||||
|
|
||||||
items = self.GetChildren()
|
items = self.GetChildren()
|
||||||
if not items:
|
if not items:
|
||||||
return wxSize(10, 10)
|
return wxSize(10, 10)
|
||||||
|
|
||||||
self.rowHeights = []
|
|
||||||
self.colWidths = []
|
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
self._add( item.CalcMin(), item.GetUserData() )
|
self._add( item.CalcMin(), item.GetUserData() )
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user