diff --git a/src/slic3r/GUI/PhysicalPrinterDialog.cpp b/src/slic3r/GUI/PhysicalPrinterDialog.cpp index 5998b1b10..b92613670 100644 --- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp +++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp @@ -46,6 +46,7 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) : DPIDialog(parent, wxID_ANY, _L("Physical Printer"), wxDefaultPosition, wxSize(45 * wxGetApp().em_unit(), -1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) { SetFont(wxGetApp().normal_font()); + SetBackgroundColour(*wxWHITE); // input the preset name Tab *tab = wxGetApp().get_tab(Preset::TYPE_PRINTER); @@ -84,8 +85,7 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) : input_sizer->Add(m_input_area, 0, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, BORDER_W); input_sizer->Add(m_valid_label, 0, wxEXPAND | wxLEFT | wxRIGHT, BORDER_W); - SetBackgroundColour(*wxWHITE); - + m_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config; m_optgroup = new ConfigOptionsGroup(this, _L("Print Host upload"), m_config); build_printhost_settings(m_optgroup); @@ -105,6 +105,8 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) : topSizer->Add(m_optgroup->sizer , 1, wxEXPAND | wxLEFT | wxTOP | wxRIGHT, BORDER_W); topSizer->Add(btns , 0, wxEXPAND | wxALL, BORDER_W); + Bind(wxEVT_CLOSE_WINDOW, [this](auto& e) {this->EndModal(wxID_NO);}); + SetSizer(topSizer); topSizer->SetSizeHints(this); this->CenterOnParent();