From: Vadim Zeitlin Date: Sat, 24 Mar 2012 18:24:19 +0000 (+0000) Subject: Allow hiding rows in wxGrid with HideRow(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ce84ef6a7f0c16ff3553ab08dc1b560a51d3c65a?ds=inline Allow hiding rows in wxGrid with HideRow(). HideRow() was simply ignored as SetRowSize(row, 0) didn't do anything. Check for the special value of 0 and allow it, just as it was done for the columns since r57336. See #14133. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index a199b556e5..494b74f2cc 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7682,7 +7682,7 @@ void wxGrid::SetRowSize( int row, int height ) } // See comment in SetColSize - if ( height < GetRowMinimalAcceptableHeight()) + if ( height > 0 && height < GetRowMinimalAcceptableHeight()) return; if ( m_rowHeights.IsEmpty() ) @@ -7701,7 +7701,10 @@ void wxGrid::SetRowSize( int row, int height ) } if ( !GetBatchCount() ) + { CalcDimensions(); + Refresh(); + } } void wxGrid::SetDefaultColSize( int width, bool resizeExistingCols )