mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
Display export gcode btn if pinter don't network setup
This commit is contained in:
parent
e95ec070c1
commit
165a183c1f
2 changed files with 12 additions and 2 deletions
|
@ -1059,8 +1059,8 @@ void Sidebar::update_all_preset_comboboxes()
|
|||
} else {
|
||||
connection_btn->Show();
|
||||
ams_btn->Hide();
|
||||
p_mainframe->set_print_button_to_default(MainFrame::PrintSelectType::eSendGcode);
|
||||
auto cfg = preset_bundle.printers.get_edited_preset().config;
|
||||
auto print_btn_type = MainFrame::PrintSelectType::eExportGcode;
|
||||
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||
if(!url.empty())
|
||||
{
|
||||
|
@ -1071,7 +1071,10 @@ void Sidebar::update_all_preset_comboboxes()
|
|||
if (cfg.has("printhost_apikey"))
|
||||
apikey = cfg.opt_string("printhost_apikey");
|
||||
p_mainframe->load_printer_url(url, apikey);
|
||||
|
||||
print_btn_type = MainFrame::PrintSelectType::eSendGcode;
|
||||
}
|
||||
p_mainframe->set_print_button_to_default(print_btn_type);
|
||||
|
||||
m_bed_type_list->SelectAndNotify(btPEI-1);
|
||||
m_bed_type_list->Disable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue