]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
suppress (harmless) unused parameter warnings
[wxWidgets.git] / src / common / gbsizer.cpp
index 7d1faa5fe49fc9fec99232b6b07f4622c0e56c87..bb4f660670886f2433e2c40f770f7fede4834f87 100644 (file)
@@ -572,15 +572,15 @@ void wxGridBagSizer::AdjustForOverflow()
 {
     int row, col;
     
-    for (row=0; row<m_rowHeights.GetCount(); row++)
+    for (row=0; row<(int)m_rowHeights.GetCount(); row++)
     {
         int rowExtra=INT_MAX;
         int rowHeight = m_rowHeights[row];
-        for (col=0; col<m_colWidths.GetCount(); col++)
+        for (col=0; col<(int)m_colWidths.GetCount(); col++)
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->IsShown() )
                 continue;
 
             int endrow, endcol;
@@ -590,7 +590,7 @@ void wxGridBagSizer::AdjustForOverflow()
             // 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;
             }
@@ -599,7 +599,7 @@ void wxGridBagSizer::AdjustForOverflow()
             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());
 
@@ -615,15 +615,15 @@ void wxGridBagSizer::AdjustForOverflow()
     }
 
     // Now do the same thing for columns
-    for (col=0; col<m_colWidths.GetCount(); col++)
+    for (col=0; col<(int)m_colWidths.GetCount(); col++)
     {
         int colExtra=INT_MAX;
         int colWidth = m_colWidths[col];
-        for (row=0; row<m_rowHeights.GetCount(); row++)
+        for (row=0; row<(int)m_rowHeights.GetCount(); row++)
         {
             wxGBPosition pos(row,col);
             wxGBSizerItem* item = FindItemAtPosition(pos);
-            if ( !item )
+            if ( !item || !item->IsShown() )
                 continue;
 
             int endrow, endcol;
@@ -631,14 +631,14 @@ void wxGridBagSizer::AdjustForOverflow()
             
             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 )
             {
-                int itemWidth = item->GetSize().GetWidth();
+                int itemWidth = item->CalcMin().GetWidth();
                 for (int c=item->GetPos().GetCol(); c<col; c++)
                     itemWidth -= (m_colWidths[c] + GetVGap());