correct the check added in r57175 to use dynamically computed numbers of rows/columns
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1830,7 +1830,10 @@ bool wxFlexGridSizer::IsColGrowable( size_t idx )
|
|||||||
|
|
||||||
void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion )
|
void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( idx < (size_t)GetRows(), "invalid row index" );
|
int nrows, ncols;
|
||||||
|
CalcRowsCols(nrows, ncols);
|
||||||
|
wxCHECK_RET( idx < (size_t)nrows, "invalid row index" );
|
||||||
|
|
||||||
wxASSERT_MSG( !IsRowGrowable( idx ),
|
wxASSERT_MSG( !IsRowGrowable( idx ),
|
||||||
"AddGrowableRow() called for growable row" );
|
"AddGrowableRow() called for growable row" );
|
||||||
m_growableRows.Add( idx );
|
m_growableRows.Add( idx );
|
||||||
@@ -1839,7 +1842,10 @@ void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion )
|
|||||||
|
|
||||||
void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion )
|
void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( idx < (size_t)GetCols(), "invalid column index" );
|
int nrows, ncols;
|
||||||
|
CalcRowsCols(nrows, ncols);
|
||||||
|
wxCHECK_RET( idx < (size_t)ncols, "invalid column index" );
|
||||||
|
|
||||||
wxASSERT_MSG( !IsColGrowable( idx ),
|
wxASSERT_MSG( !IsColGrowable( idx ),
|
||||||
"AddGrowableCol() called for growable column" );
|
"AddGrowableCol() called for growable column" );
|
||||||
m_growableCols.Add( idx );
|
m_growableCols.Add( idx );
|
||||||
|
Reference in New Issue
Block a user