]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't recurse into top level children when validating recursively.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Feb 2013 12:48:12 +0000 (12:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 6 Feb 2013 12:48:12 +0000 (12:48 +0000)
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

src/common/wincmn.cpp

index e0bd24bcc9964cc5bd66271e278356c865b0b7ec..ff653cb8309226b19215708bde9456183bde331a 100644 (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;
             }