From 6fbc7ea6ca576b0571fe4768becf0b582c72011a Mon Sep 17 00:00:00 2001 From: ali kettab Date: Mon, 12 Sep 2022 21:51:01 +0100 Subject: [PATCH] Fix testing range-selection The previous commit reveals a bug in the grid test where the wxEVT_GRID_RANGE_SELECTED detected is not really comming from range selection action, but from the grid cursor changing its position For unknown reasons, range selection in the test doesn't really starts off unless we move the mouse first while still inside the first selected cell --- tests/controls/gridtest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index d99e5eec58..779d47067f 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -674,6 +674,11 @@ TEST_CASE_METHOD(GridTestCase, "Grid::RangeSelect", "[grid]") sim.MouseDown(); wxYield(); + // Move the mouse a bit while staying inside the first cell of the range + // so that the range selection really starts off by the next move. + sim.MouseMove(pt.x + 5, pt.y + 5); + wxYield(); + sim.MouseMove(pt.x + 50, pt.y + 50); wxYield();