X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2283800b2e1c11368062e32e9acc155e7080699d..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 939150a121..375f5c2824 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1333,7 +1333,7 @@ int wxGridSizer::CalcRowsCols(int& nrows, int& ncols) const ncols = m_cols; nrows = m_rows; - wxASSERT_MSG( ncols*nrows <= nitems, "too many items in grid sizer" ); + wxASSERT_MSG( ncols*nrows >= nitems, "too many items in grid sizer" ); } else if ( m_cols ) { @@ -1987,7 +1987,7 @@ void wxBoxSizer::RecalcSizes() } // NB: wxCENTRE is used here only for backwards compatibility, // wxALIGN_CENTRE should be used in new code - else if ( flag & (wxCENTER | wxALIGN_CENTRE) ) + else if ( flag & (wxCENTER | (IsVertical() ? wxALIGN_CENTRE_HORIZONTAL : wxALIGN_CENTRE_VERTICAL))) { PosInMinorDir(posChild) += (totalMinorSize - minorSize) / 2; }