diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 4e8f7685f8..d0cd188fa1 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -3243,14 +3243,12 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event ) break; case WXK_RIGHT: - // this works the same as the down arrow except that we - // also expand the item if it wasn't expanded yet + // right arrow just expand the item will be fine if (m_current != GetRootItem().m_pItem || !HasFlag(wxTR_HIDE_ROOT)) Expand(m_current); //else: don't try to expand hidden root item (which can be the // current one when the tree is empty) - - wxFALLTHROUGH; + break; case WXK_DOWN: { diff --git a/tests/controls/treectrltest.cpp b/tests/controls/treectrltest.cpp index 6752af7d2f..d383016045 100644 --- a/tests/controls/treectrltest.cpp +++ b/tests/controls/treectrltest.cpp @@ -587,7 +587,7 @@ void TreeCtrlTestCase::KeyNavigation() CPPUNIT_ASSERT(m_tree->IsExpanded(m_root)); - sim.Char(WXK_LEFT); + sim.Char('-'); wxYield(); CPPUNIT_ASSERT(!m_tree->IsExpanded(m_root));