From: Robin Dunn <robin@alldunn.com>
Date: Thu, 10 Jul 2008 01:32:06 +0000 (+0000)
Subject: If an item is hidden, don't check it for overflows.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1eebb103c737c550dc865b418113454ecc5bc40e

If an item is hidden, don't check it for overflows.


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

diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp
index 81c88b1d3c..2a6db88756 100644
--- a/src/common/gbsizer.cpp
+++ b/src/common/gbsizer.cpp
@@ -580,7 +580,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->ShouldAccountFor() )
                 continue;
 
             int endrow, endcol;
@@ -623,7 +623,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->ShouldAccountFor() )
                 continue;
 
             int endrow, endcol;