Simplify use of MacIsWindowScrollbar

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-09-09 18:12:59 +00:00
parent ef78ec37f2
commit 31e1bd370d
2 changed files with 5 additions and 8 deletions

View File

@@ -71,11 +71,9 @@ bool wxControlContainer::AcceptsFocus() const
node = node->GetNext();
#ifdef __WXMAC__
wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
if ( sb == NULL || !m_winParent->MacIsWindowScrollbar( sb ) )
hasRealChildren = true ;
if ( sb && m_winParent->MacIsWindowScrollbar( sb ) )
if ( m_winParent->MacIsWindowScrollbar( child ) )
continue;
hasRealChildren = true ;
#endif
if ( child->AcceptsFocus() )
{
@@ -641,8 +639,7 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused)
node = node->GetNext();
#ifdef __WXMAC__
wxScrollBar *sb = wxDynamicCast( child , wxScrollBar ) ;
if ( sb && child->GetParent()->MacIsWindowScrollbar( sb ) )
if ( child->GetParent()->MacIsWindowScrollbar( child ) )
continue;
#endif