]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow hiding rows in wxGrid with HideRow().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Mar 2012 18:24:19 +0000 (18:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Mar 2012 18:24:19 +0000 (18:24 +0000)
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

src/generic/grid.cpp

index a199b556e532f931d9f9bdde83646640303519c4..494b74f2cc6bb7e4261dabac74aea6cb09cd6d5a 100644 (file)
@@ -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 )