update slic3r

This commit is contained in:
QIDI TECH
2025-09-17 12:32:36 +08:00
parent 0c78224f1a
commit 5cdfef9f9e
199 changed files with 14601 additions and 7804 deletions

View File

@@ -77,6 +77,7 @@ PhysicalPrinterDialog::PhysicalPrinterDialog(wxWindow* parent) :
input_sizer->Add(m_valid_label, 0, wxEXPAND | wxLEFT | wxRIGHT, BORDER_W);
m_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
m_optgroup = new ConfigOptionsGroup(this, _L("Print Host upload"), m_config);
check_host_key_valid();
build_printhost_settings(m_optgroup);
auto button_sizer = new wxBoxSizer(wxHORIZONTAL);
StateColor btn_bg_blue(std::pair<wxColour, int>(wxColour(95, 82, 253), StateColor::Pressed), std::pair<wxColour, int>(wxColour(129, 150, 255), StateColor::Hovered),
@@ -533,6 +534,16 @@ void PhysicalPrinterDialog::on_dpi_changed(const wxRect& suggested_rect)
Refresh();
}
void PhysicalPrinterDialog::check_host_key_valid()
{
std::vector<std::string> keys = {"print_host", "print_host_webui", "printhost_apikey", "printhost_cafile", "printhost_user", "printhost_password", "printhost_port"};
for (auto &key : keys) {
auto it = m_config->option<ConfigOptionString>(key);
if (!it) m_config->set_key_value(key, new ConfigOptionString(""));
}
return;
}
void PhysicalPrinterDialog::OnOK(wxMouseEvent& event)
{
wxGetApp().get_tab(Preset::TYPE_PRINTER)->save_preset("", false, false, true, m_preset_name );