]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
move ScrollWindow() implementation to the base class and call private DoScrollHorz...
[wxWidgets.git] / src / common / gbsizer.cpp
index 55a7226fc655c7b5e4cbbacb01cce76dac077d10..bb4f660670886f2433e2c40f770f7fede4834f87 100644 (file)
@@ -580,7 +580,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->IsShown() )
                 continue;
 
             int endrow, endcol;
                 continue;
 
             int endrow, endcol;
@@ -590,7 +590,7 @@ void wxGridBagSizer::AdjustForOverflow()
             // just look at the whole item height
             if ( item->GetPos() == pos && endrow == row )
             {
             // just look at the whole item height
             if ( item->GetPos() == pos && endrow == row )
             {
-                int itemHeight = item->GetSize().GetHeight();
+                int itemHeight = item->CalcMin().GetHeight();
                 rowExtra = wxMin(rowExtra, rowHeight - itemHeight);
                 continue;
             }
                 rowExtra = wxMin(rowExtra, rowHeight - itemHeight);
                 continue;
             }
@@ -599,7 +599,7 @@ void wxGridBagSizer::AdjustForOverflow()
             if ( endrow == row )
             {
                 // first deduct the portions of the item that are on prior rows
             if ( endrow == row )
             {
                 // first deduct the portions of the item that are on prior rows
-                int itemHeight = item->GetSize().GetHeight();
+                int itemHeight = item->CalcMin().GetHeight();
                 for (int r=item->GetPos().GetRow(); r<row; r++)
                     itemHeight -= (m_rowHeights[r] + GetHGap());
 
                 for (int r=item->GetPos().GetRow(); r<row; r++)
                     itemHeight -= (m_rowHeights[r] + GetHGap());
 
@@ -623,7 +623,7 @@ void wxGridBagSizer::AdjustForOverflow()
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->IsShown() )
                 continue;
 
             int endrow, endcol;
                 continue;
 
             int endrow, endcol;
@@ -631,14 +631,14 @@ void wxGridBagSizer::AdjustForOverflow()
             
             if ( item->GetPos() == pos && endcol == col )
             {
             
             if ( item->GetPos() == pos && endcol == col )
             {
-                int itemWidth = item->GetSize().GetWidth();
+                int itemWidth = item->CalcMin().GetWidth();
                 colExtra = wxMin(colExtra, colWidth - itemWidth);
                 continue;
             }
 
             if ( endcol == col )
             {
                 colExtra = wxMin(colExtra, colWidth - itemWidth);
                 continue;
             }
 
             if ( endcol == col )
             {
-                int itemWidth = item->GetSize().GetWidth();
+                int itemWidth = item->CalcMin().GetWidth();
                 for (int c=item->GetPos().GetCol(); c<col; c++)
                     itemWidth -= (m_colWidths[c] + GetVGap());
 
                 for (int c=item->GetPos().GetCol(); c<col; c++)
                     itemWidth -= (m_colWidths[c] + GetVGap());