From bc19f463a2828cb60768d6d591fece95c597bc77 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:41:06 +0000 Subject: [PATCH] add wxYield() after SetFocus(), set focus event needs to be processed before the control can accept input git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/controls/spinctrldbltest.cpp | 2 ++ tests/controls/spinctrltest.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/controls/spinctrldbltest.cpp b/tests/controls/spinctrldbltest.cpp index 4406fa5ae2..dcc6d09e08 100644 --- a/tests/controls/spinctrldbltest.cpp +++ b/tests/controls/spinctrldbltest.cpp @@ -123,6 +123,7 @@ void SpinCtrlDoubleTestCase::Wrap() wxUIActionSimulator sim; m_spin->SetFocus(); + wxYield(); sim.Char(WXK_DOWN); @@ -203,6 +204,7 @@ void SpinCtrlDoubleTestCase::Increment() wxUIActionSimulator sim; m_spin->SetFocus(); + wxYield(); sim.Char(WXK_UP); diff --git a/tests/controls/spinctrltest.cpp b/tests/controls/spinctrltest.cpp index 1ef3068a14..037a46918a 100644 --- a/tests/controls/spinctrltest.cpp +++ b/tests/controls/spinctrltest.cpp @@ -125,6 +125,7 @@ void SpinCtrlTestCase::Arrows() wxUIActionSimulator sim; m_spin->SetFocus(); + wxYield(); sim.Char(WXK_UP); @@ -154,6 +155,7 @@ void SpinCtrlTestCase::Wrap() wxUIActionSimulator sim; m_spin->SetFocus(); + wxYield(); sim.Char(WXK_DOWN);