Don't recurse into top level children when validating recursively.

Even with wxWS_EX_VALIDATE_RECURSIVELY flag, we should never validate the top
level children (e.g. dialogs) when validating the parent window. This is never
useful and can be completely unexpected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-02-06 12:48:12 +00:00
parent 5abc0d2197
commit e949d38c4e

View File

@@ -2026,7 +2026,10 @@ public:
return false;
}
if ( recurse && !OnRecurse(child) )
// Notice that validation should never recurse into top level
// children, e.g. some other dialog which might happen to be
// currently shown.
if ( recurse && !child->IsTopLevel() && !OnRecurse(child) )
{
return false;
}