X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/faec5a4383bb54f846c1eae142353804eb88d956..54921697ae6cb35c5865620dce494227b0df5e02:/src/generic/grid.cpp diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 5d70eacf51..c47d42f9c8 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3718,7 +3718,7 @@ void wxGrid::CalcDimensions() // do set scrollbar parameters SetScrollbars( GRID_SCROLL_LINE, GRID_SCROLL_LINE, - w, h, x, y, GetBatchCount() ); + w, h, x, y, (GetBatchCount() != 0)); } @@ -6043,7 +6043,7 @@ void wxGrid::DrawHighlight(wxDC& dc) // This is used to redraw all grid lines e.g. when the grid line colour // has been changed // -void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED_GTK(reg) ) +void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) ) { if ( !m_gridLinesEnabled || !m_numRows || @@ -8345,7 +8345,8 @@ void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol, void wxGrid::SelectAll() { - m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); + if ( m_numRows > 0 && m_numCols > 0 ) + m_selection->SelectBlock( 0, 0, m_numRows-1, m_numCols-1 ); } //