after analisys the behaviour of treectrl in GTK and Qt, right arrow should not move down. Expand the current item will be fine
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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:
|
||||
{
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user