X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/733f486aac7f5d92f902d6041338cd6e1bc7d99d..59678f3fae7d537003fe1dbd0d0049694ec946c1:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 8fb7e5197b..3601bf69d6 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2717,7 +2717,7 @@ int wxGridCellAttrData::FindIndex(int row, int col) const wxGridRowOrColAttrData::~wxGridRowOrColAttrData() { - size_t count = m_attrs.Count(); + size_t count = m_attrs.GetCount(); for ( size_t n = 0; n < count; n++ ) { m_attrs[n]->DecRef(); @@ -2958,7 +2958,7 @@ void wxGridCellAttrProvider::UpdateAttrCols( size_t pos, int numCols ) wxGridTypeRegistry::~wxGridTypeRegistry() { - size_t count = m_typeinfo.Count(); + size_t count = m_typeinfo.GetCount(); for ( size_t i = 0; i < count; i++ ) delete m_typeinfo[i]; } @@ -8120,7 +8120,7 @@ void wxGrid::DrawTextRectangle(wxDC& dc, continue; } - long lineWidth = 0, + wxCoord lineWidth = 0, lineHeight = 0; dc.GetTextExtent(line, &lineWidth, &lineHeight); @@ -8201,9 +8201,9 @@ void wxGrid::GetTextBoxSize( const wxDC& dc, const wxArrayString& lines, long *width, long *height ) const { - long w = 0; - long h = 0; - long lineW = 0, lineH = 0; + wxCoord w = 0; + wxCoord h = 0; + wxCoord lineW = 0, lineH = 0; size_t i; for ( i = 0; i < lines.GetCount(); i++ ) @@ -9662,7 +9662,7 @@ void wxGrid::SetCellHighlightPenWidth(int width) // make any visible change if the the thickness is getting smaller. int row = m_currentCellCoords.GetRow(); int col = m_currentCellCoords.GetCol(); - if ( GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) + if ( row == -1 || col == -1 || GetColWidth(col) <= 0 || GetRowHeight(row) <= 0 ) return; wxRect rect = CellToRect(row, col); @@ -10629,9 +10629,10 @@ wxCoord wxGrid::CalcColOrRowLabelAreaMinSize(wxGridDirection direction) for ( int rowOrCol = 0; rowOrCol < numRowsOrCols; rowOrCol++ ) { lines.Clear(); - StringToLines(calcRows ? GetRowLabelValue(rowOrCol) - : GetColLabelValue(rowOrCol), - lines); + + wxString label = calcRows ? GetRowLabelValue(rowOrCol) + : GetColLabelValue(rowOrCol); + StringToLines(label, lines); long w, h; GetTextBoxSize(dc, lines, &w, &h);