- // Transfer only those rows into temp which exist in the sizer
- // ignoring the superflouus ones. This prevents a segfault when
- // calling AddGrowableRow( 3 ) if the sizer only has 2 rows.
- for (idx = 0; idx < m_growableRows.GetCount(); idx++)
- if (m_growableRows[idx] < nrows)
- temp.Add( m_growableRows[idx] );
- num = temp.GetCount();
+ // what to do with the rows? by default, resize them proportionally
+ if ( (m_flexDirection & wxVERTICAL) ||
+ (m_growMode == wxFLEX_GROWMODE_SPECIFIED) )
+ {
+ // Transfer only those rows into temp which exist in the sizer
+ // ignoring the superfluous ones. This prevents a segfault when
+ // calling AddGrowableRow( 3 ) if the sizer only has 2 rows.
+ for (idx = 0; idx < m_growableRows.GetCount(); idx++)
+ {
+ if (m_growableRows[idx] < nrows)
+ {
+ temp.Add( m_growableRows[idx] );
+ temp_proportions.Add( m_growableRowsProportions[idx] );
+ sum_proportions += m_growableRowsProportions[idx];
+ growable_space += m_rowHeights[ temp[idx] ];
+ }
+ }