PhysicalPrinterDialog: MSW specific: Add missed Refresh on update

This commit is contained in:
YuSanka 2023-02-07 11:00:21 +01:00
parent 0295af2ada
commit 3ebaf8d73d

View File

@ -241,9 +241,7 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent, wxString printer_
m_printer_name->SelectAll(); m_printer_name->SelectAll();
} }
const wxSize& bestsize = this->GetBestSize(); this->Fit();
const wxSize& size = wxSize(bestsize.x, 1.1f * bestsize.y);
this->SetSize(size);
this->Layout(); this->Layout();
this->CenterOnScreen(); this->CenterOnScreen();
@ -532,10 +530,11 @@ void PhysicalPrinterDialog::update(bool printer_change)
update_printhost_buttons(); update_printhost_buttons();
const wxSize& bestsize= this->GetBestSize(); this->Fit();
const wxSize& size = wxSize( bestsize.x, 1.1f * bestsize.y);
this->SetSize(size);
this->Layout(); this->Layout();
#ifdef __WXMSW__
this->Refresh();
#endif
} }
void PhysicalPrinterDialog::update_host_type(bool printer_change) void PhysicalPrinterDialog::update_host_type(bool printer_change)