fix to correctly adjust growable bits of FlexGridSizer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2000-05-01 13:08:11 +00:00
parent efe67f809f
commit 4401790cca

View File

@@ -675,22 +675,21 @@ void wxFlexGridSizer::RecalcSizes()
wxSize sz( GetSize() );
wxSize minsz( CalcMin() );
wxPoint pt( GetPosition() );
int delta;
int row;
int col;
int delta;
size_t idx;
if ((m_growableRows.GetCount() > 0) && (sz.y > minsz.y))
{
delta = (sz.y - minsz.y) / m_growableRows.GetCount();
for (row = 0; row < nrows; row++)
m_rowHeights[ row ] = m_rowHeights[ row ] + delta;
for (idx = 0; idx < m_growableRows.GetCount(); idx++)
m_rowHeights[ m_growableRows[idx] ] += delta;
}
if ((m_growableCols.GetCount() > 0) && (sz.x > minsz.x))
{
delta = (sz.x - minsz.x) / m_growableCols.GetCount();
for (col = 0; col < ncols; col++)
m_colWidths[ col ] = m_colWidths[ col ] + delta;
for (idx = 0; idx < m_growableCols.GetCount(); idx++)
m_colWidths[ m_growableCols[idx] ] += delta;
}
sz = wxSize( pt.x + sz.x, pt.y + sz.y );