]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/containr.cpp
DoGetBestSize fix, the lbWidth was not getting updated because of a
[wxWidgets.git] / src / common / containr.cpp
index 4f05ea60f21daa85073a1d12608426c69fc5c9dc..d465bc0511ad076e86368d72f78fa0d319500b66 100644 (file)
@@ -68,18 +68,17 @@ bool wxControlContainer::AcceptsFocus() const
         while ( node )
         {
             wxWindow *child = node->GetData();
+            node = node->GetNext();
 
+#ifdef __WXMAC__
+            if ( m_winParent->MacIsWindowScrollbar( child ) )
+                continue;
+            hasRealChildren = true ;
+#endif
             if ( child->AcceptsFocus() )
             {
                 return true;
             }
-
-#ifdef __WXMAC__
-            wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
-            if ( sb == NULL || !m_winParent->MacIsWindowScrollbar( sb ) )
-                hasRealChildren = true ;
-#endif
-            node = node->GetNext();
         }
 
 #ifdef __WXMAC__
@@ -637,7 +636,13 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
     while ( node )
     {
         wxWindow *child = node->GetData();
+        node = node->GetNext();
 
+#ifdef __WXMAC__
+        if ( child->GetParent()->MacIsWindowScrollbar( child ) )
+            continue;
+#endif
+        
         if ( child->AcceptsFocusFromKeyboard() && !child->IsTopLevel() )
         {
 #ifdef __WXMSW__
@@ -660,8 +665,6 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
             child->SetFocusFromKbd();
             return true;
         }
-
-        node = node->GetNext();
     }
 
     return false;