Wait for wxDataViewCtrl relayout under GTK in the unit test
A single wxYield() doesn't seem to be enough, at least not when running in GitHub Actions environment, so wait for a longer time.
This commit is contained in:
@@ -329,9 +329,18 @@ TEST_CASE_METHOD(SingleSelectDataViewCtrlTestCase,
|
|||||||
m_dvc->EnsureVisible(last);
|
m_dvc->EnsureVisible(last);
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
// And again to let it scroll the correct items into view.
|
// Wait for the list control to be relaid out.
|
||||||
|
wxStopWatch sw;
|
||||||
|
while ( m_dvc->GetTopItem() == m_root )
|
||||||
|
{
|
||||||
|
if ( sw.Time() > 500 )
|
||||||
|
{
|
||||||
|
WARN("Timed out waiting for wxDataViewCtrl layout");
|
||||||
|
break;
|
||||||
|
}
|
||||||
wxYield();
|
wxYield();
|
||||||
#endif
|
}
|
||||||
|
#endif // __WXGTK__
|
||||||
|
|
||||||
// Check that this was indeed the case.
|
// Check that this was indeed the case.
|
||||||
const wxDataViewItem top = m_dvc->GetTopItem();
|
const wxDataViewItem top = m_dvc->GetTopItem();
|
||||||
|
Reference in New Issue
Block a user