From: Vadim Zeitlin Date: Wed, 6 Feb 2013 12:48:12 +0000 (+0000) Subject: Don't recurse into top level children when validating recursively. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e949d38c4e59441c90c1332889005b46b2d36f63 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 --- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index e0bd24bcc9..ff653cb830 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -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; }