diff --git a/tests/controls/buttontest.cpp b/tests/controls/buttontest.cpp index 4f84523828..ffc4480f8c 100644 --- a/tests/controls/buttontest.cpp +++ b/tests/controls/buttontest.cpp @@ -98,8 +98,6 @@ void ButtonTestCase::Click() void ButtonTestCase::Disabled() { - EventCounter clicked(m_button, wxEVT_BUTTON); - wxUIActionSimulator sim; // In this test we disable the button and check events are not sent and we @@ -118,6 +116,8 @@ void ButtonTestCase::Disabled() m_button->Create(wxTheApp->GetTopWindow(), wxID_ANY, "wxButton"); } + EventCounter clicked(m_button, wxEVT_BUTTON); + sim.MouseMove(m_button->GetScreenPosition() + wxPoint(10, 10)); wxYield();