]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't take hidden wxGrid row/columns into account when auto-sizing.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:15 +0000 (00:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 4 Sep 2013 00:14:15 +0000 (00:14 +0000)
The contents not shown to the user shouldn't affect the fitting width/height
of the columns/rows that are shown.

See #15464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/grid.cpp

index c7a062946d920b3a2864cbd5aa1b6fe1d2074d10..31f9297c63ae8deb62c0bd9a136a99a0851342b9 100644 (file)
@@ -8398,11 +8398,17 @@ wxGrid::AutoSizeColOrRow(int colOrRow, bool setAsMin, wxGridDirection direction)
     {
         if ( column )
         {
+            if ( !IsRowShown(rowOrCol) )
+                continue;
+
             row = rowOrCol;
             col = colOrRow;
         }
         else
         {
+            if ( !IsColShown(rowOrCol) )
+                continue;
+
             row = colOrRow;
             col = rowOrCol;
         }