fix crash after radio button fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -292,10 +292,10 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
wxWindow *child = node->GetData();
|
||||
|
||||
#ifdef __WXMSW__
|
||||
bool is_not_msw_rb = ! wxIsKindOf(m_winLastFocused,wxRadioButton);
|
||||
bool is_not_msw_rb = !m_winLastFocused ||
|
||||
!wxIsKindOf(m_winLastFocused,wxRadioButton);
|
||||
#else
|
||||
bool is_not_msw_rb = true;
|
||||
|
||||
static const bool is_not_msw_rb = true;
|
||||
#endif
|
||||
|
||||
if ( child->AcceptsFocusFromKeyboard() && is_not_msw_rb )
|
||||
@@ -322,15 +322,19 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
node = node->GetNext();
|
||||
else
|
||||
node = node->GetPrevious();
|
||||
if (!node) return; // this would probably an error
|
||||
if (!node)
|
||||
return; // this would probably an error
|
||||
child = node->GetData();
|
||||
if (!wxIsKindOf(child,wxRadioButton)) continue;
|
||||
if (!wxIsKindOf(child,wxRadioButton))
|
||||
continue;
|
||||
rb = (wxRadioButton*) child;
|
||||
if (rb->GetValue()) break;
|
||||
if (rb->GetValue())
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // __WXMSW__
|
||||
|
||||
// disable propagation for this call as otherwise the event might
|
||||
// bounce back to us.
|
||||
wxPropagationDisabler disableProp(event);
|
||||
|
Reference in New Issue
Block a user