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