]> git.saurik.com Git - wxWidgets.git/commitdiff
no changes, just do the case of m_winLastFocused to wxRadioButton once instead of...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Feb 2008 00:14:54 +0000 (00:14 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 11 Feb 2008 00:14:54 +0000 (00:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/containr.cpp

index c0156165dda141bc564a1709e9240b391561d08b..43de0255b06a98d0b881e65a8649f950c7ec4a82 100644 (file)
@@ -532,24 +532,27 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
                   wxIsKindOf(m_winLastFocused, wxRadioButton) &&
                   !m_winLastFocused->HasFlag(wxRB_SINGLE) )
         {
+            wxRadioButton * const
+                lastBtn = wx_static_cast(wxRadioButton *, m_winLastFocused);
+
             // cursor keys don't navigate out of a radio button group so
             // find the correct radio button to focus
             if ( forward )
             {
-                child = wxGetNextButtonInGroup((wxRadioButton*)m_winLastFocused);
+                child = wxGetNextButtonInGroup(lastBtn);
                 if ( !child )
                 {
                     // no next button in group, set it to the first button
-                    child = wxGetFirstButtonInGroup((wxRadioButton*)m_winLastFocused);
+                    child = wxGetFirstButtonInGroup(lastBtn);
                 }
             }
             else
             {
-                child = wxGetPreviousButtonInGroup((wxRadioButton*)m_winLastFocused);
+                child = wxGetPreviousButtonInGroup(lastBtn);
                 if ( !child )
                 {
                     // no previous button in group, set it to the last button
-                    child = wxGetLastButtonInGroup((wxRadioButton*)m_winLastFocused);
+                    child = wxGetLastButtonInGroup(lastBtn);
                 }
             }