Fixed crash when starting the application on a secondary monitor

This commit is contained in:
enricoturri1966 2020-09-15 15:23:39 +02:00
parent 7f1bea1dc8
commit 5fc82cecfe

View File

@ -140,8 +140,6 @@ PrintHostQueueDialog::PrintHostQueueDialog(wxWindow *parent)
{
const auto em = GetTextExtent("m").x;
SetSize(wxSize(HEIGHT * em, WIDTH * em));
auto *topsizer = new wxBoxSizer(wxVERTICAL);
job_list = new wxDataViewListCtrl(this, wxID_ANY);
@ -168,6 +166,8 @@ PrintHostQueueDialog::PrintHostQueueDialog(wxWindow *parent)
topsizer->Add(btnsizer, 0, wxEXPAND);
SetSizer(topsizer);
SetSize(wxSize(HEIGHT * em, WIDTH * em));
job_list->Bind(wxEVT_DATAVIEW_SELECTION_CHANGED, [this](wxDataViewEvent&) { on_list_select(); });
btn_cancel->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {