]> git.saurik.com Git - wxWidgets.git/commitdiff
Add an explicit SetFocus() call to fix wxTreeCtrl unit test.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 16 Nov 2010 22:38:19 +0000 (22:38 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 16 Nov 2010 22:38:19 +0000 (22:38 +0000)
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

index 0335aa80ebf8c34377baef4329cd2eac71e9f617..5c59c627b95a26b0890757b7803acf2ee6c14511 100644 (file)
@@ -595,6 +595,7 @@ void TreeCtrlTestCase::KeyNavigation()
 
     m_tree->SelectItem(m_root);
 
+    m_tree->SetFocus();
     sim.Char(WXK_RIGHT);
     wxYield();