]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
fix crashes due to missing npos handling in several wxString methods in STL build...
[wxWidgets.git] / src / common / gbsizer.cpp
index 55a7226fc655c7b5e4cbbacb01cce76dac077d10..81c88b1d3cc3eb515b7bf4fe79d974468de77e5e 100644 (file)
@@ -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());
 
@@ -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());