mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
PhysicalPrinterDialog : fixed layout in update()
This commit is contained in:
parent
36527cbaf2
commit
0a3109030e
1 changed files with 8 additions and 1 deletions
|
@ -433,6 +433,7 @@ void PhysicalPrinterDialog::update()
|
||||||
if (tech == ptFFF) {
|
if (tech == ptFFF) {
|
||||||
m_optgroup->show_field("host_type");
|
m_optgroup->show_field("host_type");
|
||||||
m_optgroup->hide_field("printhost_authorization_type");
|
m_optgroup->hide_field("printhost_authorization_type");
|
||||||
|
m_optgroup->show_field("printhost_apikey", true);
|
||||||
for (const std::string& opt_key : std::vector<std::string>{ "printhost_user", "printhost_password" })
|
for (const std::string& opt_key : std::vector<std::string>{ "printhost_user", "printhost_password" })
|
||||||
m_optgroup->hide_field(opt_key);
|
m_optgroup->hide_field(opt_key);
|
||||||
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type");
|
const auto opt = m_config->option<ConfigOptionEnum<PrintHostType>>("host_type");
|
||||||
|
@ -453,6 +454,12 @@ void PhysicalPrinterDialog::update()
|
||||||
|
|
||||||
m_optgroup->show_field("printhost_port", supports_multiple_printers);
|
m_optgroup->show_field("printhost_port", supports_multiple_printers);
|
||||||
m_printhost_port_browse_btn->Show(supports_multiple_printers);
|
m_printhost_port_browse_btn->Show(supports_multiple_printers);
|
||||||
|
|
||||||
|
std::unique_ptr<PrintHost> host(PrintHost::get_print_host(m_config));
|
||||||
|
m_printhost_test_btn->Enable(!m_config->opt_string("print_host").empty() && host->can_test());
|
||||||
|
m_printhost_browse_btn->Enable(host->has_auto_discovery());
|
||||||
|
|
||||||
|
this->SetSize(this->GetBestSize());
|
||||||
this->Layout();
|
this->Layout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue