From f66fb07ce7cb257d2575157813136f80e304ec81 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 17 Dec 2017 16:13:06 +0100 Subject: [PATCH] Resize wxDataViewCtrl to fix persistence test with wxGTK Setting the column sizes fails with wxGTK implementation of wxDataViewCtrl if the control is not wide enough, apparently, so make sure it's sufficiently big when creating it to fix the unit test failures on wxGTK build bot slaves. --- tests/persistence/dataview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/persistence/dataview.cpp b/tests/persistence/dataview.cpp index 9701bef6c8..ae89b23cbb 100644 --- a/tests/persistence/dataview.cpp +++ b/tests/persistence/dataview.cpp @@ -47,6 +47,11 @@ static wxDataViewCtrl* CreatePersistenceTestDVC() wxDataViewListCtrl* const list = new wxDataViewListCtrl(parent, wxID_ANY); list->SetName("dvc"); + // Ensure the control is big enough to allow making its columns as wide as + // we need them to be. + parent->SetSize(parent->GetParent()->GetClientSize()); + list->SetSize(parent->GetClientSize()); + // Add some columns to the DVC. list->AppendTextColumn(DVC_COL "1", wxDATAVIEW_CELL_INERT, -1, wxALIGN_LEFT,