From 96810ea9943f85e07466607479696db40001883b Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 26 Oct 2022 12:45:16 +0800 Subject: [PATCH] handle url --- src/slic3r/GUI/Plater.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 78e22ac8fa..7e5221d96c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -928,7 +928,15 @@ void Sidebar::update_all_preset_comboboxes() connection_btn->Show(); ams_btn->Hide(); p_mainframe->set_print_button_to_default(MainFrame::PrintSelectType::eSendGcode); - p_mainframe->load_printer_url(wxString::Format("http://%s",preset_bundle.printers.get_edited_preset().config.opt_string("print_host"))); + wxString host_url = preset_bundle.printers.get_edited_preset().config.opt_string("print_host"); + if(!host_url.empty()) + { + if(!host_url.Lower().starts_with("http")) + host_url = wxString::Format("http://%s",host_url); + + p_mainframe->load_printer_url(host_url); + } + m_bed_type_list->SelectAndNotify(btPEI); m_bed_type_list->Disable(); }