X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ac57418f39e9671c18b99942180563146625d3ae..aeab10d07c1f4ef78c0c9152de115fa216922e6c:/src/common/layout.cpp?ds=sidebyside diff --git a/src/common/layout.cpp b/src/common/layout.cpp index b98de42ee5..305ef6f966 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -1273,7 +1273,7 @@ void wxSizer::RemoveSizerChild(wxWindow *child) GetChildren().DeleteObject(child); } -void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags)) +void wxSizer::DoSetSize(int x, int y, int w, int h, int WXUNUSED(flags)) { wxLayoutConstraints *constr = GetConstraints(); if (x != -1) @@ -1363,6 +1363,7 @@ bool wxSizer::LayoutPhase1(int *noChanges) // Find the bounding box and set own size int maxX = 0; int maxY = 0; + wxNode *node = GetChildren().First(); while (node) { @@ -1374,10 +1375,11 @@ bool wxSizer::LayoutPhase1(int *noChanges) maxX = (x + width); if ((y+height) > maxY) maxY = (y + height); + node = node->Next(); } SetSize(GetBorderX(), GetBorderY(), maxX, maxY); - + // If this is the only sizer for the parent, size the parent to this sizer. if ( m_sizerParent && (m_sizerParent->GetSizer() == this) ) m_sizerParent->SetClientSize(maxX + 2*GetBorderX(), maxY + 2*GetBorderY()); @@ -1500,11 +1502,6 @@ wxRowColSizer::~wxRowColSizer() { } -void wxRowColSizer::SetSize(int x, int y, int w, int h, int flags) -{ - wxSizer::SetSize(x, y, w, h, flags); -} - bool wxRowColSizer::LayoutPhase1(int *noChanges) { *noChanges = 0; @@ -1560,7 +1557,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges) int currentY = borderY; int maxX = currentX; int maxY = currentY; - + wxNode *node = GetChildren().First(); while (node) {