X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8c7e3f14fb2ef30a9876e940ef0f44891254886c..d1a6e2b7a103d761fbc15e0e9c1c20ab53a849d9:/contrib/src/gizmos/multicell.cpp?ds=sidebyside diff --git a/contrib/src/gizmos/multicell.cpp b/contrib/src/gizmos/multicell.cpp index 39bd0d1548..d50fd58826 100644 --- a/contrib/src/gizmos/multicell.cpp +++ b/contrib/src/gizmos/multicell.cpp @@ -380,12 +380,9 @@ wxSize wxMultiCellSizer::CalcMin() if (m_children.GetCount() == 0) return wxSize(10,10); - int m_minWidth = 0; - int m_minHeight = 0; - GetMinimums(); - m_minWidth = Sum(m_maxWidth, m_cell_count.GetWidth()); - m_minHeight = Sum(m_maxHeight, m_cell_count.GetHeight()); + int m_minWidth = Sum(m_maxWidth, m_cell_count.GetWidth()); + int m_minHeight = Sum(m_maxHeight, m_cell_count.GetHeight()); return wxSize( m_minWidth, m_minHeight ); } //--------------------------------------------------------------------------- @@ -634,9 +631,10 @@ wxMultiCellCanvas :: wxMultiCellCanvas(wxWindow *par, int numRows, int numCols) //--------------------------------------------------------------------------- void wxMultiCellCanvas :: Add(wxWindow *win, unsigned int row, unsigned int col) { - wxASSERT_MSG(row >= 0 && row < m_maxRows, + // thanks to unsigned data row and col are always >= 0 + wxASSERT_MSG( /* row >= 0 && */ row < m_maxRows, wxString::Format(_T("Row %d out of bounds (0..%d)"), row, m_maxRows) ); - wxASSERT_MSG(col >= 0 && col < m_maxCols, + wxASSERT_MSG( /* col >= 0 && */ col < m_maxCols, wxString::Format(_T("Column %d out of bounds (0..%d)"), col, m_maxCols) ); wxASSERT_MSG(m_cells[CELL_LOC(row, col)] == NULL, wxT("Cell already occupied"));