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.
This commit is contained in:
Vadim Zeitlin 2017-12-17 16:13:06 +01:00
parent b7051a9adb
commit f66fb07ce7

View File

@ -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,