X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b218dfaf47dc47705f6d6cba9408fa9f9cca70e..ec5d85fbd58bf6ef774e3d93b9e38d9f90b42d40:/src/common/layout.cpp diff --git a/src/common/layout.cpp b/src/common/layout.cpp index 517d626892..305ef6f966 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -22,8 +22,6 @@ #include "wx/defs.h" -#if wxUSE_CONSTRAINTS - #ifndef WX_PRECOMP #include "wx/window.h" #include "wx/utils.h" @@ -1275,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) @@ -1365,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) { @@ -1376,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()); @@ -1502,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; @@ -1562,7 +1557,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges) int currentY = borderY; int maxX = currentX; int maxY = currentY; - + wxNode *node = GetChildren().First(); while (node) { @@ -1727,6 +1722,3 @@ wxSpacingSizer::~wxSpacingSizer() { } - - -#endif