]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/gbsizer.cpp
documented return value of Find[Absolute]ValidPath() correctly
[wxWidgets.git] / src / common / gbsizer.cpp
index 85653bc76d3faec6c08f5dbea8e350f21c978a88..2dde7a8410faf469a56d6759fffabd8ffd68963d 100644 (file)
@@ -494,7 +494,8 @@ wxSize wxGridBagSizer::CalcMin()
     for (idx=0; idx < m_rows; idx++)
         height += m_rowHeights[idx] + ( idx == m_rows-1 ? 0 : m_vgap );
 
     for (idx=0; idx < m_rows; idx++)
         height += m_rowHeights[idx] + ( idx == m_rows-1 ? 0 : m_vgap );
 
-    return wxSize(width, height);   
+    m_calculatedMinSize = wxSize(width, height);
+    return m_calculatedMinSize;
 }
 
 
 }
 
 
@@ -504,9 +505,6 @@ void wxGridBagSizer::RecalcSizes()
     if (m_children.GetCount() == 0)
         return;
 
     if (m_children.GetCount() == 0)
         return;
 
-    // Calculates minsize and populates m_rowHeights and m_colWidths
-    wxSize  minsz( CalcMin() ); 
-
     wxPoint pt( GetPosition() );
     wxSize  sz( GetSize() );
    
     wxPoint pt( GetPosition() );
     wxSize  sz( GetSize() );
    
@@ -514,7 +512,7 @@ void wxGridBagSizer::RecalcSizes()
     m_cols = m_colWidths.GetCount();
     int idx, width, height;
 
     m_cols = m_colWidths.GetCount();
     int idx, width, height;
 
-    AdjustForGrowables(sz, minsz, m_rows, m_cols);
+    AdjustForGrowables(sz, m_calculatedMinSize, m_rows, m_cols);
 
     // Find the start positions on the window of the rows and columns
     wxArrayInt rowpos;
 
     // Find the start positions on the window of the rows and columns
     wxArrayInt rowpos;