mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:01:46 +08:00
Fixed a regression bug that device URL was not reset when changing to a machine don't have connection info
This commit is contained in:
parent
6689087e6f
commit
f83a3377ab
Binary file not shown.
Before Width: | Height: | Size: 738 KiB After Width: | Height: | Size: 716 KiB |
@ -1147,18 +1147,20 @@ void Sidebar::update_all_preset_comboboxes()
|
|||||||
ams_btn->Hide();
|
ams_btn->Hide();
|
||||||
auto print_btn_type = MainFrame::PrintSelectType::eExportGcode;
|
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");
|
wxString url = cfg.opt_string("print_host_webui").empty() ? cfg.opt_string("print_host") : cfg.opt_string("print_host_webui");
|
||||||
if(!url.empty())
|
wxString apikey;
|
||||||
{
|
if(url.empty())
|
||||||
if(!url.Lower().starts_with("http"))
|
url = wxString::Format("file://%s/web/orca/missing_connection.html", from_u8(resources_dir()));
|
||||||
url = wxString::Format("http://%s",url);
|
else {
|
||||||
|
if (!url.Lower().starts_with("http"))
|
||||||
wxString apikey;
|
url = wxString::Format("http://%s", url);
|
||||||
if (cfg.has("printhost_apikey"))
|
if (cfg.has("printhost_apikey"))
|
||||||
apikey = cfg.opt_string("printhost_apikey");
|
apikey = cfg.opt_string("printhost_apikey");
|
||||||
p_mainframe->load_printer_url(url, apikey);
|
|
||||||
|
|
||||||
print_btn_type = MainFrame::PrintSelectType::eSendGcode;
|
print_btn_type = MainFrame::PrintSelectType::eSendGcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p_mainframe->load_printer_url(url, apikey);
|
||||||
|
|
||||||
|
|
||||||
p_mainframe->set_print_button_to_default(print_btn_type);
|
p_mainframe->set_print_button_to_default(print_btn_type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user