]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Add wxDataViewRendererBase::GetEffectiveAlignment() and use it.
[wxWidgets.git] / src / common / wincmn.cpp
index ebee014cd98ea94a00f09814a6b5b9c1c407baf2..ad4887093bfde750c559657f53c9189170704fd2 100644 (file)
@@ -1840,6 +1840,12 @@ wxWindow *wxWindowBase::FindWindow(long id) const
     for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() )
     {
         wxWindowBase *child = node->GetData();
+
+        // As usual, don't recurse into child dialogs, finding a button in a
+        // child dialog when looking in this window would be unexpected.
+        if ( child->IsTopLevel() )
+            continue;
+
         res = child->FindWindow( id );
     }
 
@@ -1856,6 +1862,11 @@ wxWindow *wxWindowBase::FindWindow(const wxString& name) const
     for ( node = m_children.GetFirst(); node && !res; node = node->GetNext() )
     {
         wxWindow *child = node->GetData();
+
+        // As in FindWindow() overload above, never recurse into child dialogs.
+        if ( child->IsTopLevel() )
+            continue;
+
         res = child->FindWindow(name);
     }