X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/49dcc246bfddae204903a19181597ccd5bec3901..4b5d2be39657bb364c9111c4d13b1eecb8f3b69f:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 5a300a0f9f..071ee21039 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1820,15 +1820,28 @@ void wxFlexGridSizer::AdjustForGrowables(const wxSize& sz) } } +bool wxFlexGridSizer::IsRowGrowable( size_t idx ) +{ + return m_growableRows.Index( idx ) != wxNOT_FOUND; +} + +bool wxFlexGridSizer::IsColGrowable( size_t idx ) +{ + return m_growableCols.Index( idx ) != wxNOT_FOUND; +} void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion ) { + wxASSERT_MSG( !IsRowGrowable( idx ), + "AddGrowableRow() called for growable row" ); m_growableRows.Add( idx ); m_growableRowsProportions.Add( proportion ); } void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion ) { + wxASSERT_MSG( !IsColGrowable( idx ), + "AddGrowableCol() called for growable column" ); m_growableCols.Add( idx ); m_growableColsProportions.Add( proportion ); }