mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 05:45:52 +08:00
fix repetier
This commit is contained in:
parent
732a441b84
commit
fbcc656937
@ -2890,7 +2890,7 @@ void GCode::append_full_config(const Print &print, std::string &str)
|
||||
"print_host",
|
||||
"printhost_apikey",
|
||||
"printhost_cafile",
|
||||
"printhost_slug"
|
||||
"printhost_port"
|
||||
};
|
||||
assert(std::is_sorted(banned_keys.begin(), banned_keys.end()));
|
||||
auto is_banned = [banned_keys](const std::string &key) {
|
||||
|
@ -1596,7 +1596,7 @@ bool PhysicalPrinter::has_empty_config() const
|
||||
config.opt_string("printhost_port" ).empty() &&
|
||||
config.opt_string("printhost_user" ).empty() &&
|
||||
config.opt_string("printhost_password").empty() &&
|
||||
config.opt_string("printhost_slug" ).empty();
|
||||
config.opt_string("printhost_port" ).empty();
|
||||
}
|
||||
|
||||
void PhysicalPrinter::update_preset_names_in_config()
|
||||
|
@ -500,7 +500,7 @@ DynamicPrintConfig PresetBundle::full_config_secure() const
|
||||
config.erase("print_host");
|
||||
config.erase("printhost_apikey");
|
||||
config.erase("printhost_cafile");
|
||||
config.erase("printhost_slug");
|
||||
config.erase("printhost_port");
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ void PhysicalPrinterDialog::update_printers()
|
||||
std::unique_ptr<PrintHost> host(PrintHost::get_print_host(m_config));
|
||||
|
||||
wxArrayString printers;
|
||||
Field* rs = m_optgroup->get_field("printhost_slug");
|
||||
Field* rs = m_optgroup->get_field("printhost_port");
|
||||
if (!host->get_printers(printers)) {
|
||||
std::vector<std::string> slugs;
|
||||
|
||||
@ -288,12 +288,12 @@ void PhysicalPrinterDialog::update_printers()
|
||||
choice->set_values(slugs);
|
||||
boost::any val = choice->get_value();
|
||||
boost::any any_string_type = std::string("");
|
||||
auto value_idx = std::find(slugs.begin(), slugs.end(), m_config->opt<ConfigOptionString>("printhost_slug")->value);
|
||||
auto value_idx = std::find(slugs.begin(), slugs.end(), m_config->opt<ConfigOptionString>("printhost_port")->value);
|
||||
if ((val.empty() || (any_string_type.type() == val.type() && boost::any_cast<std::string>(val) == "")) && !slugs.empty() && value_idx == slugs.end()) {
|
||||
change_opt_value(*m_config, "printhost_slug", slugs[0]);
|
||||
change_opt_value(*m_config, "printhost_port", slugs[0]);
|
||||
choice->set_value(slugs[0],false);
|
||||
} else if(value_idx != slugs.end() ){
|
||||
choice->set_value(m_config->option<ConfigOptionString>("printhost_slug")->value, false);
|
||||
choice->set_value(m_config->option<ConfigOptionString>("printhost_port")->value, false);
|
||||
}
|
||||
rs->enable();
|
||||
}
|
||||
@ -495,7 +495,7 @@ void PhysicalPrinterDialog::update()
|
||||
if (m_printhost_browse_btn)
|
||||
m_printhost_browse_btn->Enable(host->has_auto_discovery());
|
||||
|
||||
m_printhost_slug_browse_btn->Enable(supports_multiple_printers);
|
||||
m_printhost_port_browse_btn->Enable(supports_multiple_printers);
|
||||
|
||||
m_optgroup->show_field("printhost_port", supports_multiple_printers);
|
||||
}
|
||||
|
@ -72,7 +72,6 @@ class PhysicalPrinterDialog : public DPIDialog
|
||||
ScalableButton* m_add_preset_btn {nullptr};
|
||||
ScalableButton* m_printhost_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_test_btn {nullptr};
|
||||
ScalableButton* m_printhost_slug_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_cafile_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_port_browse_btn {nullptr};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user