wxWindow::Fit() infinite loop bug fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-06-13 22:10:16 +00:00
parent 5c47e84eb6
commit bfac849985

View File

@ -350,8 +350,9 @@ void wxWindowBase::Fit()
int maxX = 0,
maxY = 0;
wxWindowList::Node *node = GetChildren().GetFirst();
while ( node )
for ( wxWindowList::Node *node = GetChildren().GetFirst();
node;
node = node->GetNext() )
{
wxWindow *win = node->GetData();
if ( win->IsTopLevel() )
@ -368,8 +369,6 @@ void wxWindowBase::Fit()
maxX = wx + ww;
if ( wy + wh > maxY )
maxY = wy + wh;
node = node->GetNext();
}
// leave a margin