From a7dc53953b7329d6e8b4a6b003f878aab0bdd1cd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 16 Nov 2010 22:38:19 +0000 Subject: [PATCH] Add an explicit SetFocus() call to fix wxTreeCtrl unit test. Fixing the implicit focus grabbing by wxTreeCtrl::SelectItem() in r65905 broke its unit test case as the simulated key event was not delivered to wxTreeCtrl itself any more. Fix this by simply setting the focus to the tree explicitly before sending it any key strokes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/controls/treectrltest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/controls/treectrltest.cpp b/tests/controls/treectrltest.cpp index 0335aa80eb..5c59c627b9 100644 --- a/tests/controls/treectrltest.cpp +++ b/tests/controls/treectrltest.cpp @@ -595,6 +595,7 @@ void TreeCtrlTestCase::KeyNavigation() m_tree->SelectItem(m_root); + m_tree->SetFocus(); sim.Char(WXK_RIGHT); wxYield();